# 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
    #
    # Successfully executed facet containing additional statistics on the
    # response of a query.
    #
    class FacetResult < Facet

      include MsRestAzure


      def initialize
        @resultType = "FacetResult"
      end

      attr_accessor :resultType

      # @return [Integer] Number of total records in the facet results.
      attr_accessor :total_records

      # @return [Integer] Number of records returned in the facet response.
      attr_accessor :count

      # @return A table containing the desired facets. Only present if the
      # facet is valid.
      attr_accessor :data


      #
      # Mapper for FacetResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'FacetResult',
          type: {
            name: 'Composite',
            class_name: 'FacetResult',
            model_properties: {
              expression: {
                client_side_validation: true,
                required: true,
                serialized_name: 'expression',
                type: {
                  name: 'String'
                }
              },
              resultType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'resultType',
                type: {
                  name: 'String'
                }
              },
              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'
                }
              },
              data: {
                client_side_validation: true,
                required: true,
                serialized_name: 'data',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
