# 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::ResourceGraph::Mgmt::V2019_04_01
  module Models
    #
    # Describes a query to be executed.
    #
    class QueryRequest

      include MsRestAzure

      # @return [Array<String>] Azure subscriptions against which to execute
      # the query.
      attr_accessor :subscriptions

      # @return [String] The resources query.
      attr_accessor :query

      # @return [QueryRequestOptions] The query evaluation options
      attr_accessor :options

      # @return [Array<FacetRequest>] An array of facet requests to be computed
      # against the query result.
      attr_accessor :facets


      #
      # Mapper for QueryRequest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'QueryRequest',
          type: {
            name: 'Composite',
            class_name: 'QueryRequest',
            model_properties: {
              subscriptions: {
                client_side_validation: true,
                required: true,
                serialized_name: 'subscriptions',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              query: {
                client_side_validation: true,
                required: true,
                serialized_name: 'query',
                type: {
                  name: 'String'
                }
              },
              options: {
                client_side_validation: true,
                required: false,
                serialized_name: 'options',
                type: {
                  name: 'Composite',
                  class_name: 'QueryRequestOptions'
                }
              },
              facets: {
                client_side_validation: true,
                required: false,
                serialized_name: 'facets',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FacetRequestElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'FacetRequest'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
