# 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
    #
    # Sampling settings for Diagnostic.
    #
    class SamplingSettings

      include MsRestAzure

      # @return [SamplingType] Sampling type. Possible values include: 'fixed'
      attr_accessor :sampling_type

      # @return [Float] Rate of sampling for fixed-rate sampling.
      attr_accessor :percentage


      #
      # Mapper for SamplingSettings class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SamplingSettings',
          type: {
            name: 'Composite',
            class_name: 'SamplingSettings',
            model_properties: {
              sampling_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'samplingType',
                type: {
                  name: 'String'
                }
              },
              percentage: {
                client_side_validation: true,
                required: false,
                serialized_name: 'percentage',
                constraints: {
                  InclusiveMaximum: 100,
                  InclusiveMinimum: 0
                },
                type: {
                  name: 'Double'
                }
              }
            }
          }
        }
      end
    end
  end
end
