# 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
    #
    # The condition that results in the Log Search rule.
    #
    class TriggerCondition

      include MsRestAzure

      # @return [ConditionalOperator] Evaluation operation for rule -
      # 'GreaterThan' or 'LessThan. Possible values include: 'GreaterThan',
      # 'LessThan', 'Equal'
      attr_accessor :threshold_operator

      # @return [Float] Result or count threshold based on which rule should be
      # triggered.
      attr_accessor :threshold

      # @return [LogMetricTrigger] Trigger condition for metric query rule
      attr_accessor :metric_trigger


      #
      # Mapper for TriggerCondition class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TriggerCondition',
          type: {
            name: 'Composite',
            class_name: 'TriggerCondition',
            model_properties: {
              threshold_operator: {
                client_side_validation: true,
                required: true,
                serialized_name: 'thresholdOperator',
                type: {
                  name: 'String'
                }
              },
              threshold: {
                client_side_validation: true,
                required: true,
                serialized_name: 'threshold',
                type: {
                  name: 'Double'
                }
              },
              metric_trigger: {
                client_side_validation: true,
                required: false,
                serialized_name: 'metricTrigger',
                type: {
                  name: 'Composite',
                  class_name: 'LogMetricTrigger'
                }
              }
            }
          }
        }
      end
    end
  end
end
