# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Web module Models # # Model object. # class SiteLogsConfigProperties include MsRestAzure # @return [ApplicationLogsConfig] Application logs configuration attr_accessor :application_logs # @return [HttpLogsConfig] Http logs configuration attr_accessor :http_logs # @return [EnabledConfig] Failed requests tracing configuration attr_accessor :failed_requests_tracing # @return [EnabledConfig] Detailed error messages configuration attr_accessor :detailed_error_messages # # Validate the object. Throws ValidationError if validation fails. # def validate @application_logs.validate unless @application_logs.nil? @http_logs.validate unless @http_logs.nil? @failed_requests_tracing.validate unless @failed_requests_tracing.nil? @detailed_error_messages.validate unless @detailed_error_messages.nil? end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.application_logs unless serialized_property.nil? serialized_property = ApplicationLogsConfig.serialize_object(serialized_property) end output_object['applicationLogs'] = serialized_property unless serialized_property.nil? serialized_property = object.http_logs unless serialized_property.nil? serialized_property = HttpLogsConfig.serialize_object(serialized_property) end output_object['httpLogs'] = serialized_property unless serialized_property.nil? serialized_property = object.failed_requests_tracing unless serialized_property.nil? serialized_property = EnabledConfig.serialize_object(serialized_property) end output_object['failedRequestsTracing'] = serialized_property unless serialized_property.nil? serialized_property = object.detailed_error_messages unless serialized_property.nil? serialized_property = EnabledConfig.serialize_object(serialized_property) end output_object['detailedErrorMessages'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [SiteLogsConfigProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = SiteLogsConfigProperties.new deserialized_property = object['applicationLogs'] unless deserialized_property.nil? deserialized_property = ApplicationLogsConfig.deserialize_object(deserialized_property) end output_object.application_logs = deserialized_property deserialized_property = object['httpLogs'] unless deserialized_property.nil? deserialized_property = HttpLogsConfig.deserialize_object(deserialized_property) end output_object.http_logs = deserialized_property deserialized_property = object['failedRequestsTracing'] unless deserialized_property.nil? deserialized_property = EnabledConfig.deserialize_object(deserialized_property) end output_object.failed_requests_tracing = deserialized_property deserialized_property = object['detailedErrorMessages'] unless deserialized_property.nil? deserialized_property = EnabledConfig.deserialize_object(deserialized_property) end output_object.detailed_error_messages = deserialized_property output_object end end end end