Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest

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

Overview

Request message for CompletionService.CompleteQuery method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest

Returns a new instance of GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest.



1725
1726
1727
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1725

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

Instance Attribute Details

#data_storeString

Required. The parent data store resource name for which the completion is performed, such as projects/*/locations/global/collections/default_collection/ dataStores/default_data_store. Corresponds to the JSON property dataStore

Returns:

  • (String)


1683
1684
1685
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1683

def data_store
  @data_store
end

#include_tail_suggestionsBoolean Also known as: include_tail_suggestions?

Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned. Corresponds to the JSON property includeTailSuggestions

Returns:

  • (Boolean)


1690
1691
1692
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1690

def include_tail_suggestions
  @include_tail_suggestions
end

#queryString

Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. Corresponds to the JSON property query

Returns:

  • (String)


1697
1698
1699
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1697

def query
  @query
end

#query_modelString

Specifies the autocomplete data model. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values: * document - Using suggestions generated from user- imported documents. * search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * user-event - Using suggestions generated from user- imported search events. * document-completable - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * document is the default model for regular dataStores. * search- history is the default model for site search dataStores. Corresponds to the JSON property queryModel

Returns:

  • (String)


1711
1712
1713
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1711

def query_model
  @query_model
end

#user_pseudo_idString

A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as unknown_visitor. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property userPseudoId

Returns:

  • (String)


1723
1724
1725
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1723

def user_pseudo_id
  @user_pseudo_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1730
1731
1732
1733
1734
1735
1736
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1730

def update!(**args)
  @data_store = args[:data_store] if args.key?(:data_store)
  @include_tail_suggestions = args[:include_tail_suggestions] if args.key?(:include_tail_suggestions)
  @query = args[:query] if args.key?(:query)
  @query_model = args[:query_model] if args.key?(:query_model)
  @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
end