# 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 Alert
    #
    class AlertingAction < Action

      include MsRestAzure


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

      attr_accessor :odatatype

      # @return [AlertSeverity] Severity of the alert. Possible values include:
      # '0', '1', '2', '3', '4'
      attr_accessor :severity

      # @return [AzNsActionGroup] Azure action group reference.
      attr_accessor :azns_action

      # @return [Integer] time (in minutes) for which Alerts should be
      # throttled or suppressed.
      attr_accessor :throttling_in_min

      # @return [TriggerCondition] The trigger condition that results in the
      # alert rule being.
      attr_accessor :trigger


      #
      # Mapper for AlertingAction 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.AlertingAction',
          type: {
            name: 'Composite',
            class_name: 'AlertingAction',
            model_properties: {
              odatatype: {
                client_side_validation: true,
                required: true,
                serialized_name: 'odata\\.type',
                type: {
                  name: 'String'
                }
              },
              severity: {
                client_side_validation: true,
                required: true,
                serialized_name: 'severity',
                type: {
                  name: 'String'
                }
              },
              azns_action: {
                client_side_validation: true,
                required: false,
                serialized_name: 'aznsAction',
                type: {
                  name: 'Composite',
                  class_name: 'AzNsActionGroup'
                }
              },
              throttling_in_min: {
                client_side_validation: true,
                required: false,
                serialized_name: 'throttlingInMin',
                type: {
                  name: 'Number'
                }
              },
              trigger: {
                client_side_validation: true,
                required: true,
                serialized_name: 'trigger',
                type: {
                  name: 'Composite',
                  class_name: 'TriggerCondition'
                }
              }
            }
          }
        }
      end
    end
  end
end
