public sealed class CompleteQueryRequest : IMessage<CompleteQueryRequest>, IEquatable<CompleteQueryRequest>, IDeepCloneable<CompleteQueryRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class CompleteQueryRequest.
Request message for
[CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.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.v1.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.v1.UserEvent.user_pseudo_id]
and
[SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.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 part of the Google Cloud Discovery Engine v1 API, facilitating request message creation for the \u003ccode\u003eCompletionService.CompleteQuery\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing for various operations such as message comparison, deep cloning, and handling of message buffers.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e include \u003ccode\u003eDataStore\u003c/code\u003e (specifying the data store for completion), \u003ccode\u003eQuery\u003c/code\u003e (the input for fetching suggestions), \u003ccode\u003eQueryModel\u003c/code\u003e (defining the data model for suggestions), and \u003ccode\u003eUserPseudoId\u003c/code\u003e (a unique identifier for tracking visitors).\u003c/p\u003e\n"],["\u003cp\u003eSeveral version of the \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e are available, ranging from version 1.0.0-beta06 to the latest version 1.6.0, each with its own documentation link.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides constructors for creating new instances, including a parameterless constructor and one that accepts another \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e object for cloning.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class CompleteQueryRequest (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.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 v1 API class CompleteQueryRequest.\n\nRequest message for\n\\[CompletionService.CompleteQuery\\]\\[google.cloud.discoveryengine.v1.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.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CompleteQueryRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.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.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.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.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreName)-typed view over the [DataStore](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest#Google_Cloud_DiscoveryEngine_V1_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.v1.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.v1.UserEvent.user_pseudo_id\\]\nand\n\\[SearchRequest.user_pseudo_id\\]\\[google.cloud.discoveryengine.v1.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."]]