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

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

Overview

One suggestion result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SuggestResult

Returns a new instance of SuggestResult.



7707
7708
7709
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7707

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

Instance Attribute Details

#people_suggestionGoogle::Apis::CloudsearchV1::PeopleSuggestion

This field contains information about the person being suggested. Corresponds to the JSON property peopleSuggestion



7689
7690
7691
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7689

def people_suggestion
  @people_suggestion
end

#query_suggestionGoogle::Apis::CloudsearchV1::QuerySuggestion

This field will be present if the suggested query is a word/phrase completion. Corresponds to the JSON property querySuggestion



7694
7695
7696
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7694

def query_suggestion
  @query_suggestion
end

#sourceGoogle::Apis::CloudsearchV1::Source

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



7699
7700
7701
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7699

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)


7705
7706
7707
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7705

def suggested_query
  @suggested_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7712
7713
7714
7715
7716
7717
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7712

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