Service Client: Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompletionServiceClient
Client stub representing the remote CompletionService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to discoveryengine.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Discoveryengine::V1alpha::CompletionService - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1alpha/completion_service.proto
SYNOPSIS
use Google::Cloud::Discoveryengine::V1alpha::CompletionService;
my $msg = Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompleteQueryRequest->new({
data_store => $data_store,
query => $query,
query_model => $query_model,
user_pseudo_id => $user_pseudo_id,
});
# Read or update a field
my $val = $msg->data_store();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompleteQueryRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1alpha/completion_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompleteQueryRequest
Request message for [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] method.
Inherits from Protobuf::Message.
Accessors
$msg->data_store()/$msg->data_store($value)Type:
StringRequired. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
$msg->query()/$msg->query($value)Type:
StringRequired. The typeahead input used to fetch suggestions. Maximum length is 128 characters.
$msg->query_model()/$msg->query_model($value)Type:
StringSpecifies 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][google.cloud.discoveryengine.v1alpha.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.
$msg->user_pseudo_id()/$msg->user_pseudo_id($value)Type:
StringA 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][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] and [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.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.
$msg->include_tail_suggestions()/$msg->include_tail_suggestions($value)Type:
BoolIndicates 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.
Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompleteQueryResponse
Response message for [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] method.
Inherits from Protobuf::Message.
Accessors
$msg->query_suggestions()/$msg->query_suggestions($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::CompletionService::CompleteQueryResponse::QuerySuggestion)Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.
$msg->tail_match_triggered()/$msg->tail_match_triggered($value)Type:
BoolTrue if the returned suggestions are all tail suggestions.
For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1alpha::CompletionService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.