# 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::V2016_03_01
  module Models
    #
    # A rule metric data source. The discriminator value is always
    # RuleMetricDataSource in this case.
    #
    class RuleMetricDataSource < RuleDataSource

      include MsRestAzure


      def initialize
        @odatatype = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"
      end

      attr_accessor :odatatype

      # @return [String] the name of the metric that defines what the rule
      # monitors.
      attr_accessor :metric_name


      #
      # Mapper for RuleMetricDataSource class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource',
          type: {
            name: 'Composite',
            class_name: 'RuleMetricDataSource',
            model_properties: {
              resource_uri: {
                client_side_validation: true,
                required: false,
                serialized_name: 'resourceUri',
                type: {
                  name: 'String'
                }
              },
              odatatype: {
                client_side_validation: true,
                required: true,
                serialized_name: 'odata\\.type',
                type: {
                  name: 'String'
                }
              },
              metric_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'metricName',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
