# 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_04_16
  module Models
    #
    # Specify action need to be taken when rule type is converting log to
    # metric
    #
    class LogToMetricAction < Action

      include MsRestAzure


      def initialize
        @odatatype = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"
      end

      attr_accessor :odatatype

      # @return [Array<Criteria>] Criteria of Metric
      attr_accessor :criteria


      #
      # Mapper for LogToMetricAction class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction',
          type: {
            name: 'Composite',
            class_name: 'LogToMetricAction',
            model_properties: {
              odatatype: {
                client_side_validation: true,
                required: true,
                serialized_name: 'odata\\.type',
                type: {
                  name: 'String'
                }
              },
              criteria: {
                client_side_validation: true,
                required: true,
                serialized_name: 'criteria',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'CriteriaElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Criteria'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
