public sealed class CompleteQueryRequest : IMessage<CompleteQueryRequest>, IEquatable<CompleteQueryRequest>, IDeepCloneable<CompleteQueryRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class CompleteQueryRequest.
Request message for
[CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]
method.
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.
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.
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][google.cloud.discoveryengine.v1beta.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.
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][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
and
[SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e class is used to request query completions from the Discovery Engine v1beta API, specifically for the \u003ccode\u003eCompletionService.CompleteQuery\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing methods for message handling, equality checks, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties like \u003ccode\u003eDataStore\u003c/code\u003e and \u003ccode\u003eDataStoreAsDataStoreName\u003c/code\u003e to specify the target data store, \u003ccode\u003eQuery\u003c/code\u003e for the input text, \u003ccode\u003eIncludeTailSuggestions\u003c/code\u003e to include suggestions that do not fully match the query, \u003ccode\u003eQueryModel\u003c/code\u003e to define the autocomplete model used and \u003ccode\u003eUserPseudoId\u003c/code\u003e to track a unique visitor.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e class is \u003ccode\u003e1.0.0-beta18\u003c/code\u003e, with a previous version being \u003ccode\u003e1.0.0-beta17\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe namespace for the \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e class is \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta\u003c/code\u003e, found within the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class CompleteQueryRequest (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest) \n\n public sealed class CompleteQueryRequest : IMessage\u003cCompleteQueryRequest\u003e, IEquatable\u003cCompleteQueryRequest\u003e, IDeepCloneable\u003cCompleteQueryRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class CompleteQueryRequest.\n\nRequest message for\n\\[CompletionService.CompleteQuery\\]\\[google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery\\]\nmethod. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CompleteQueryRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### CompleteQueryRequest()\n\n public CompleteQueryRequest()\n\n### CompleteQueryRequest(CompleteQueryRequest)\n\n public CompleteQueryRequest(CompleteQueryRequest other)\n\nProperties\n----------\n\n### DataStore\n\n public string DataStore { get; set; }\n\nRequired. The parent data store resource name for which the completion is\nperformed, such as\n`projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.\n\n### DataStoreAsDataStoreName\n\n public DataStoreName DataStoreAsDataStoreName { get; set; }\n\n[DataStoreName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.DataStoreName)-typed view over the [DataStore](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CompleteQueryRequest#Google_Cloud_DiscoveryEngine_V1Beta_CompleteQueryRequest_DataStore) resource name property.\n\n### IncludeTailSuggestions\n\n public bool IncludeTailSuggestions { get; set; }\n\nIndicates if tail suggestions should be returned if there are no\nsuggestions that match the full query. Even if set to true, if there are\nsuggestions that match the full query, those are returned and no\ntail suggestions are returned.\n\n### Query\n\n public string Query { get; set; }\n\nRequired. The typeahead input used to fetch suggestions. Maximum length is\n128 characters.\n\n### QueryModel\n\n public string QueryModel { get; set; }\n\nSpecifies the autocomplete data model. This overrides any model specified\nin the Configuration \\\u003e Autocomplete section of the Cloud console. Currently\nsupported values:\n\n- `document` - Using suggestions generated from user-imported documents.\n- `search-history` - Using suggestions generated from the past history of \\[SearchService.Search\\]\\[google.cloud.discoveryengine.v1beta.SearchService.Search\\] API calls. Do not use it when there is no traffic for Search API.\n- `user-event` - Using suggestions generated from user-imported search events.\n- `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable.\n\nDefault values:\n\n- `document` is the default model for regular dataStores.\n- `search-history` is the default model for site search dataStores.\n\n### UserPseudoId\n\n public string UserPseudoId { get; set; }\n\nA unique identifier for tracking visitors. For example, this could be\nimplemented with an HTTP cookie, which should be able to uniquely identify\na visitor on a single device. This unique identifier should not change if\nthe visitor logs in or out of the website.\n\nThis field should NOT have a fixed value such as `unknown_visitor`.\n\nThis should be the same identifier as\n\\[UserEvent.user_pseudo_id\\]\\[google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id\\]\nand\n\\[SearchRequest.user_pseudo_id\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id\\].\n\nThe field must be a UTF-8 encoded string with a length limit of 128\ncharacters. Otherwise, an `INVALID_ARGUMENT` error is returned."]]