class Azure::CognitiveServices::CustomSearch::V1_0::Models::SearchResponse

Defines the top-level object that the response includes when the request succeeds.

Attributes

_type[RW]
query_context[RW]

@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.

web_pages[RW]

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

Private Class Methods

mapper() click to toggle source

Mapper for SearchResponse class as Ruby Hash. This will be used for serialization/deserialization.

# File lib/1.0/generated/azure_cognitiveservices_customsearch/models/search_response.rb, line 39
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'
          }
        }
      }
    }
  }
end
new() click to toggle source
# File lib/1.0/generated/azure_cognitiveservices_customsearch/models/search_response.rb, line 17
def initialize
  @_type = "SearchResponse"
end