# 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
    #
    # Query result.
    #
    class QueryResponse

      include MsRestAzure

      # @return [Integer] Number of total records matching the query.
      attr_accessor :total_records

      # @return [Integer] Number of records returned in the current response.
      # In the case of paging, this is the number of records in the current
      # page.
      attr_accessor :count

      # @return [ResultTruncated] Indicates whether the query results are
      # truncated. Possible values include: 'true', 'false'
      attr_accessor :result_truncated

      # @return [String] When present, the value can be passed to a subsequent
      # query call (together with the same query and subscriptions used in the
      # current request) to retrieve the next page of data.
      attr_accessor :skip_token

      # @return Query output in tabular format.
      attr_accessor :data

      # @return [Array<Facet>] Query facets.
      attr_accessor :facets


      #
      # Mapper for QueryResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'QueryResponse',
          type: {
            name: 'Composite',
            class_name: 'QueryResponse',
            model_properties: {
              total_records: {
                client_side_validation: true,
                required: true,
                serialized_name: 'totalRecords',
                type: {
                  name: 'Number'
                }
              },
              count: {
                client_side_validation: true,
                required: true,
                serialized_name: 'count',
                type: {
                  name: 'Number'
                }
              },
              result_truncated: {
                client_side_validation: true,
                required: true,
                serialized_name: 'resultTruncated',
                type: {
                  name: 'Enum',
                  module: 'ResultTruncated'
                }
              },
              skip_token: {
                client_side_validation: true,
                required: false,
                serialized_name: '$skipToken',
                type: {
                  name: 'String'
                }
              },
              data: {
                client_side_validation: true,
                required: true,
                serialized_name: 'data',
                type: {
                  name: 'Object'
                }
              },
              facets: {
                client_side_validation: true,
                required: false,
                serialized_name: 'facets',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FacetElementType',
                      type: {
                        name: 'Composite',
                        polymorphic_discriminator: 'resultType',
                        uber_parent: 'Facet',
                        class_name: 'Facet'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
