# 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::WebSearch::V1_0
  module Models
    #
    # Defines the top-level object that the response includes when the request
    # succeeds.
    #
    class SearchResponse < Response

      include MsRestAzure


      def initialize
        @_type = "SearchResponse"
      end

      attr_accessor :_type

      # @return [QueryContext] An object that contains the query string that
      # Bing used for the request. This object contains the query string as
      # entered by the user. It may also contain an altered query string that
      # Bing used for the query if the query string contained a spelling
      # mistake.
      attr_accessor :query_context

      # @return [WebWebAnswer] A list of webpages that are relevant to the
      # search query.
      attr_accessor :web_pages

      # @return [Images] A list of images that are relevant to the search
      # query.
      attr_accessor :images

      # @return [News] A list of news articles that are relevant to the search
      # query.
      attr_accessor :news

      # @return [RelatedSearchesRelatedSearchAnswer] A list of related queries
      # made by others.
      attr_accessor :related_searches

      # @return [SpellSuggestions] The query string that likely represents the
      # user's intent.
      attr_accessor :spell_suggestions

      # @return [TimeZone] The date and time of one or more geographic
      # locations.
      attr_accessor :time_zone

      # @return [Videos] A list of videos that are relevant to the search
      # query.
      attr_accessor :videos

      # @return [Computation] The answer to a math expression or units
      # conversion expression.
      attr_accessor :computation

      # @return [RankingRankingResponse] The order that Bing suggests that you
      # display the search results in.
      attr_accessor :ranking_response


      #
      # Mapper for SearchResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SearchResponse',
          type: {
            name: 'Composite',
            class_name: 'SearchResponse',
            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'
                }
              },
              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'
                }
              },
              web_pages: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'webPages',
                type: {
                  name: 'Composite',
                  class_name: 'WebWebAnswer'
                }
              },
              images: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'images',
                type: {
                  name: 'Composite',
                  class_name: 'Images'
                }
              },
              news: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'news',
                type: {
                  name: 'Composite',
                  class_name: 'News'
                }
              },
              related_searches: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'relatedSearches',
                type: {
                  name: 'Composite',
                  class_name: 'RelatedSearchesRelatedSearchAnswer'
                }
              },
              spell_suggestions: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'spellSuggestions',
                type: {
                  name: 'Composite',
                  class_name: 'SpellSuggestions'
                }
              },
              time_zone: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'timeZone',
                type: {
                  name: 'Composite',
                  class_name: 'TimeZone'
                }
              },
              videos: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'videos',
                type: {
                  name: 'Composite',
                  class_name: 'Videos'
                }
              },
              computation: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'computation',
                type: {
                  name: 'Composite',
                  class_name: 'Computation'
                }
              },
              ranking_response: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'rankingResponse',
                type: {
                  name: 'Composite',
                  class_name: 'RankingRankingResponse'
                }
              }
            }
          }
        }
      end
    end
  end
end
