# 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::CognitiveServices::EntitySearch::V1_0
  module Models
    #
    # Defines an entity answer.
    #
    class Entities < SearchResultsAnswer

      include MsRestAzure


      def initialize
        @_type = "Entities"
      end

      attr_accessor :_type

      # @return [EntityQueryScenario] The supported query scenario. This field
      # is set to DominantEntity or DisambiguationItem. The field is set to
      # DominantEntity if Bing determines that only a single entity satisfies
      # the request. For example, a book, movie, person, or attraction. If
      # multiple entities could satisfy the request, the field is set to
      # DisambiguationItem. For example, if the request uses the generic title
      # of a movie franchise, the entity's type would likely be
      # DisambiguationItem. But, if the request specifies a specific title from
      # the franchise, the entity's type would likely be DominantEntity.
      # Possible values include: 'DominantEntity',
      # 'DominantEntityWithDisambiguation', 'Disambiguation', 'List',
      # 'ListWithPivot'. Default value: 'DominantEntity' .
      attr_accessor :query_scenario

      # @return [Array<Thing>] A list of entities.
      attr_accessor :value


      #
      # Mapper for Entities class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Entities',
          type: {
            name: 'Composite',
            class_name: 'Entities',
            model_properties: {
              _type: {
                client_side_validation: true,
                required: true,
                serialized_name: '_type',
                type: {
                  name: 'String'
                }
              },
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              contractual_rules: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'contractualRules',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ContractualRulesContractualRuleElementType',
                      type: {
                        name: 'Composite',
                        polymorphic_discriminator: '_type',
                        uber_parent: 'ContractualRulesContractualRule',
                        class_name: 'ContractualRulesContractualRule'
                      }
                  }
                }
              },
              web_search_url: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'webSearchUrl',
                type: {
                  name: 'String'
                }
              },
              query_context: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'queryContext',
                type: {
                  name: 'Composite',
                  class_name: 'QueryContext'
                }
              },
              query_scenario: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'queryScenario',
                default_value: 'DominantEntity',
                type: {
                  name: 'String'
                }
              },
              value: {
                client_side_validation: true,
                required: true,
                serialized_name: 'value',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ThingElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Thing'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
