# 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
    #
    # How the data that is collected should be combined over time.
    #
    class ManagementEventAggregationCondition

      include MsRestAzure

      # @return [ConditionOperator] the condition operator. Possible values
      # include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
      # 'LessThanOrEqual'
      attr_accessor :operator

      # @return [Float] The threshold value that activates the alert.
      attr_accessor :threshold

      # @return [Duration] the period of time (in ISO 8601 duration format)
      # that is used to monitor alert activity based on the threshold. If
      # specified then it must be between 5 minutes and 1 day.
      attr_accessor :window_size


      #
      # Mapper for ManagementEventAggregationCondition class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ManagementEventAggregationCondition',
          type: {
            name: 'Composite',
            class_name: 'ManagementEventAggregationCondition',
            model_properties: {
              operator: {
                client_side_validation: true,
                required: false,
                serialized_name: 'operator',
                type: {
                  name: 'Enum',
                  module: 'ConditionOperator'
                }
              },
              threshold: {
                client_side_validation: true,
                required: false,
                serialized_name: 'threshold',
                type: {
                  name: 'Double'
                }
              },
              window_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'windowSize',
                type: {
                  name: 'TimeSpan'
                }
              }
            }
          }
        }
      end
    end
  end
end
