Class: Google::Apis::CloudsearchV1::SuggestRequest

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

Request of suggest API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SuggestRequest

Returns a new instance of SuggestRequest.



5470
5471
5472
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 5470

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

Instance Attribute Details

#data_source_restrictionsArray<Google::Apis::CloudsearchV1::DataSourceRestriction>

The sources to use for suggestions. If not specified, the data sources are taken from the current search application. NOTE: Suggestions are only supported for the following sources: * Third-party data sources * PredefinedSource.PERSON * PredefinedSource.GOOGLE_DRIVE Corresponds to the JSON property dataSourceRestrictions



5456
5457
5458
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 5456

def data_source_restrictions
  @data_source_restrictions
end

#queryString

Partial query for which autocomplete suggestions will be shown. For example, if the query is "sea", then the server might return "season", "search", " seagull" and so on. Corresponds to the JSON property query

Returns:

  • (String)


5463
5464
5465
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 5463

def query
  @query
end

#request_optionsGoogle::Apis::CloudsearchV1::RequestOptions

Shared request options for all RPC methods. Corresponds to the JSON property requestOptions



5468
5469
5470
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 5468

def request_options
  @request_options
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5475
5476
5477
5478
5479
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 5475

def update!(**args)
  @data_source_restrictions = args[:data_source_restrictions] if args.key?(:data_source_restrictions)
  @query = args[:query] if args.key?(:query)
  @request_options = args[:request_options] if args.key?(:request_options)
end