# 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
    #
    # Specifies the log search query.
    #
    class Source

      include MsRestAzure

      # @return [String] Log search query. Required for action type -
      # AlertingAction
      attr_accessor :query

      # @return [Array<String>] List of  Resource referred into query
      attr_accessor :authorized_resources

      # @return [String] The resource uri over which log search query is to be
      # run.
      attr_accessor :data_source_id

      # @return [QueryType] Set value to 'ResultCount'. Possible values
      # include: 'ResultCount'
      attr_accessor :query_type


      #
      # Mapper for Source class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Source',
          type: {
            name: 'Composite',
            class_name: 'Source',
            model_properties: {
              query: {
                client_side_validation: true,
                required: false,
                serialized_name: 'query',
                type: {
                  name: 'String'
                }
              },
              authorized_resources: {
                client_side_validation: true,
                required: false,
                serialized_name: 'authorizedResources',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              data_source_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'dataSourceId',
                type: {
                  name: 'String'
                }
              },
              query_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'queryType',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
