Class: Google::Apis::CloudsearchV1::SuggestResult

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/google/apis/cloudsearch_v1/representations.rb

Overview

One suggestion result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SuggestResult

Returns a new instance of SuggestResult



4266
4267
4268
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4266

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#people_suggestionGoogle::Apis::CloudsearchV1::PeopleSuggestion

A people suggestion. Corresponds to the JSON property peopleSuggestion



4248
4249
4250
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4248

def people_suggestion
  @people_suggestion
end

#query_suggestionGoogle::Apis::CloudsearchV1::QuerySuggestion

A completed query suggestion. Corresponds to the JSON property querySuggestion



4253
4254
4255
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4253

def query_suggestion
  @query_suggestion
end

#sourceGoogle::Apis::CloudsearchV1::Source

Defines sources for the suggest/search APIs. Corresponds to the JSON property source



4258
4259
4260
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4258

def source
  @source
end

#suggested_queryString

The suggested query that will be used for search, when the user clicks on the suggestion Corresponds to the JSON property suggestedQuery

Returns:

  • (String)


4264
4265
4266
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4264

def suggested_query
  @suggested_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4271
4272
4273
4274
4275
4276
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4271

def update!(**args)
  @people_suggestion = args[:people_suggestion] if args.key?(:people_suggestion)
  @query_suggestion = args[:query_suggestion] if args.key?(:query_suggestion)
  @source = args[:source] if args.key?(:source)
  @suggested_query = args[:suggested_query] if args.key?(:suggested_query)
end