# 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::Monitor::Mgmt::V2018_03_01
  module Models
    #
    # The rule criteria that defines the conditions of the alert rule.
    #
    class MetricAlertCriteria

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"] = "MetricAlertSingleResourceMultipleMetricCriteria"
      @@discriminatorMap["Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"] = "WebtestLocationAvailabilityCriteria"
      @@discriminatorMap["Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"] = "MetricAlertMultipleResourceMultipleMetricCriteria"

      def initialize
        @odatatype = "MetricAlertCriteria"
      end

      attr_accessor :odatatype

      # @return Unmatched properties from the message are deserialized this
      # collection
      attr_accessor :additional_properties


      #
      # Mapper for MetricAlertCriteria class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'MetricAlertCriteria',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'odata.type',
            uber_parent: 'MetricAlertCriteria',
            class_name: 'MetricAlertCriteria',
            model_properties: {
              additional_properties: {
                client_side_validation: true,
                required: false,
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
