# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ApiManagement::Mgmt::V2018_06_01_preview
  module Models
    #
    # Diagnostic details.
    #
    class DiagnosticContract < Resource

      include MsRestAzure

      # @return [AlwaysLog] Specifies for what type of messages sampling
      # settings should not apply. Possible values include: 'allErrors'
      attr_accessor :always_log

      # @return [String] Resource Id of a target logger.
      attr_accessor :logger_id

      # @return [SamplingSettings] Sampling settings for Diagnostic.
      attr_accessor :sampling

      # @return [PipelineDiagnosticSettings] Diagnostic settings for
      # incoming/outgoing HTTP messages to the Gateway.
      attr_accessor :frontend

      # @return [PipelineDiagnosticSettings] Diagnostic settings for
      # incoming/outgoing HTTP messages to the Backend
      attr_accessor :backend

      # @return [Boolean] Whether to process Correlation Headers coming to Api
      # Management Service. Only applicable to Application Insights
      # diagnostics. Default is true.
      attr_accessor :enable_http_correlation_headers


      #
      # Mapper for DiagnosticContract class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DiagnosticContract',
          type: {
            name: 'Composite',
            class_name: 'DiagnosticContract',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              always_log: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.alwaysLog',
                type: {
                  name: 'String'
                }
              },
              logger_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.loggerId',
                type: {
                  name: 'String'
                }
              },
              sampling: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.sampling',
                type: {
                  name: 'Composite',
                  class_name: 'SamplingSettings'
                }
              },
              frontend: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.frontend',
                type: {
                  name: 'Composite',
                  class_name: 'PipelineDiagnosticSettings'
                }
              },
              backend: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.backend',
                type: {
                  name: 'Composite',
                  class_name: 'PipelineDiagnosticSettings'
                }
              },
              enable_http_correlation_headers: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enableHttpCorrelationHeaders',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
