# 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::V2020_10_01
  module Models
    #
    # An Activity Log Alert rule condition that is met by comparing the field
    # and value of an Activity Log event.
    # This condition must contain 'field' and either 'equals' or 'containsAny'.
    #
    class AlertRuleLeafCondition

      include MsRestAzure

      # @return [String] The name of the Activity Log event's field that this
      # condition will examine.
      # The possible values for this field are (case-insensitive):
      # 'resourceId', 'category', 'caller', 'level', 'operationName',
      # 'resourceGroup', 'resourceProvider', 'status', 'subStatus',
      # 'resourceType', or anything beginning with 'properties'.
      attr_accessor :field

      # @return [String] The value of the event's field will be compared to
      # this value (case-insensitive) to determine if the condition is met.
      attr_accessor :equals

      # @return [Array<String>] The value of the event's field will be compared
      # to the values in this array (case-insensitive) to determine if the
      # condition is met.
      attr_accessor :contains_any


      #
      # Mapper for AlertRuleLeafCondition class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AlertRuleLeafCondition',
          type: {
            name: 'Composite',
            class_name: 'AlertRuleLeafCondition',
            model_properties: {
              field: {
                client_side_validation: true,
                required: false,
                serialized_name: 'field',
                type: {
                  name: 'String'
                }
              },
              equals: {
                client_side_validation: true,
                required: false,
                serialized_name: 'equals',
                type: {
                  name: 'String'
                }
              },
              contains_any: {
                client_side_validation: true,
                required: false,
                serialized_name: 'containsAny',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
