- 2.57.0 (latest)
- 2.56.0
- 2.55.0
- 2.54.0
- 2.53.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.1
- 2.4.0
- 2.3.0
- 2.2.3
- 2.1.0
- 2.0.19
public static final class CompleteQueryRequest.Builder extends GeneratedMessageV3.Builder<CompleteQueryRequest.Builder> implements CompleteQueryRequestOrBuilder
Auto-complete parameters.
Protobuf type google.cloud.retail.v2beta.CompleteQueryRequest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CompleteQueryRequest.BuilderImplements
CompleteQueryRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllLanguageCodes(Iterable<String> values)
public CompleteQueryRequest.Builder addAllLanguageCodes(Iterable<String> values)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
values | Iterable<String> The languageCodes to add. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addLanguageCodes(String value)
public CompleteQueryRequest.Builder addLanguageCodes(String value)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
value | String The languageCodes to add. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addLanguageCodesBytes(ByteString value)
public CompleteQueryRequest.Builder addLanguageCodesBytes(ByteString value)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
value | ByteString The bytes of the languageCodes to add. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CompleteQueryRequest.Builder |
build()
public CompleteQueryRequest build()
Type | Description |
CompleteQueryRequest |
buildPartial()
public CompleteQueryRequest buildPartial()
Type | Description |
CompleteQueryRequest |
clear()
public CompleteQueryRequest.Builder clear()
Type | Description |
CompleteQueryRequest.Builder |
clearCatalog()
public CompleteQueryRequest.Builder clearCatalog()
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
string catalog = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearDataset()
public CompleteQueryRequest.Builder clearDataset()
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values:
- user-data
- cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
string dataset = 6;
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearDeviceType()
public CompleteQueryRequest.Builder clearDeviceType()
The device type context for completion suggestions.
It is useful to apply different suggestions on different device types, e.g.
DESKTOP
, MOBILE
. If it is empty, the suggestions are across all device
types.
Supported formats:
UNKNOWN_DEVICE_TYPE
DESKTOP
MOBILE
- A customized string starts with
OTHER_
, e.g.OTHER_IPHONE
.
string device_type = 4;
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public CompleteQueryRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
CompleteQueryRequest.Builder |
clearLanguageCodes()
public CompleteQueryRequest.Builder clearLanguageCodes()
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearMaxSuggestions()
public CompleteQueryRequest.Builder clearMaxSuggestions()
Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.
int32 max_suggestions = 5;
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public CompleteQueryRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
CompleteQueryRequest.Builder |
clearQuery()
public CompleteQueryRequest.Builder clearQuery()
Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
string query = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearVisitorId()
public CompleteQueryRequest.Builder clearVisitorId()
Required field. 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string visitor_id = 7;
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clone()
public CompleteQueryRequest.Builder clone()
Type | Description |
CompleteQueryRequest.Builder |
getCatalog()
public String getCatalog()
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
string catalog = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
String | The catalog. |
getCatalogBytes()
public ByteString getCatalogBytes()
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
string catalog = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
ByteString | The bytes for catalog. |
getDataset()
public String getDataset()
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values:
- user-data
- cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
string dataset = 6;
Type | Description |
String | The dataset. |
getDatasetBytes()
public ByteString getDatasetBytes()
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values:
- user-data
- cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
string dataset = 6;
Type | Description |
ByteString | The bytes for dataset. |
getDefaultInstanceForType()
public CompleteQueryRequest getDefaultInstanceForType()
Type | Description |
CompleteQueryRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getDeviceType()
public String getDeviceType()
The device type context for completion suggestions.
It is useful to apply different suggestions on different device types, e.g.
DESKTOP
, MOBILE
. If it is empty, the suggestions are across all device
types.
Supported formats:
UNKNOWN_DEVICE_TYPE
DESKTOP
MOBILE
- A customized string starts with
OTHER_
, e.g.OTHER_IPHONE
.
string device_type = 4;
Type | Description |
String | The deviceType. |
getDeviceTypeBytes()
public ByteString getDeviceTypeBytes()
The device type context for completion suggestions.
It is useful to apply different suggestions on different device types, e.g.
DESKTOP
, MOBILE
. If it is empty, the suggestions are across all device
types.
Supported formats:
UNKNOWN_DEVICE_TYPE
DESKTOP
MOBILE
- A customized string starts with
OTHER_
, e.g.OTHER_IPHONE
.
string device_type = 4;
Type | Description |
ByteString | The bytes for deviceType. |
getLanguageCodes(int index)
public String getLanguageCodes(int index)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The languageCodes at the given index. |
getLanguageCodesBytes(int index)
public ByteString getLanguageCodesBytes(int index)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the languageCodes at the given index. |
getLanguageCodesCount()
public int getLanguageCodesCount()
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Type | Description |
int | The count of languageCodes. |
getLanguageCodesList()
public ProtocolStringList getLanguageCodesList()
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Type | Description |
ProtocolStringList | A list containing the languageCodes. |
getMaxSuggestions()
public int getMaxSuggestions()
Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.
int32 max_suggestions = 5;
Type | Description |
int | The maxSuggestions. |
getQuery()
public String getQuery()
Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
string query = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
String | The query. |
getQueryBytes()
public ByteString getQueryBytes()
Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
string query = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
ByteString | The bytes for query. |
getVisitorId()
public String getVisitorId()
Required field. 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string visitor_id = 7;
Type | Description |
String | The visitorId. |
getVisitorIdBytes()
public ByteString getVisitorIdBytes()
Required field. 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string visitor_id = 7;
Type | Description |
ByteString | The bytes for visitorId. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CompleteQueryRequest other)
public CompleteQueryRequest.Builder mergeFrom(CompleteQueryRequest other)
Name | Description |
other | CompleteQueryRequest |
Type | Description |
CompleteQueryRequest.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CompleteQueryRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
CompleteQueryRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public CompleteQueryRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
CompleteQueryRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CompleteQueryRequest.Builder |
setCatalog(String value)
public CompleteQueryRequest.Builder setCatalog(String value)
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
string catalog = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Name | Description |
value | String The catalog to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setCatalogBytes(ByteString value)
public CompleteQueryRequest.Builder setCatalogBytes(ByteString value)
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
string catalog = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Name | Description |
value | ByteString The bytes for catalog to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDataset(String value)
public CompleteQueryRequest.Builder setDataset(String value)
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values:
- user-data
- cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
string dataset = 6;
Name | Description |
value | String The dataset to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDatasetBytes(ByteString value)
public CompleteQueryRequest.Builder setDatasetBytes(ByteString value)
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud-retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values:
- user-data
- cloud-retail This option requires additional allowlisting. Before using cloud-retail, contact Cloud Retail support team first.
string dataset = 6;
Name | Description |
value | ByteString The bytes for dataset to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDeviceType(String value)
public CompleteQueryRequest.Builder setDeviceType(String value)
The device type context for completion suggestions.
It is useful to apply different suggestions on different device types, e.g.
DESKTOP
, MOBILE
. If it is empty, the suggestions are across all device
types.
Supported formats:
UNKNOWN_DEVICE_TYPE
DESKTOP
MOBILE
- A customized string starts with
OTHER_
, e.g.OTHER_IPHONE
.
string device_type = 4;
Name | Description |
value | String The deviceType to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDeviceTypeBytes(ByteString value)
public CompleteQueryRequest.Builder setDeviceTypeBytes(ByteString value)
The device type context for completion suggestions.
It is useful to apply different suggestions on different device types, e.g.
DESKTOP
, MOBILE
. If it is empty, the suggestions are across all device
types.
Supported formats:
UNKNOWN_DEVICE_TYPE
DESKTOP
MOBILE
- A customized string starts with
OTHER_
, e.g.OTHER_IPHONE
.
string device_type = 4;
Name | Description |
value | ByteString The bytes for deviceType to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CompleteQueryRequest.Builder |
setLanguageCodes(int index, String value)
public CompleteQueryRequest.Builder setLanguageCodes(int index, String value)
The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.
repeated string language_codes = 3;
Name | Description |
index | int The index to set the value at. |
value | String The languageCodes to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setMaxSuggestions(int value)
public CompleteQueryRequest.Builder setMaxSuggestions(int value)
Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.
int32 max_suggestions = 5;
Name | Description |
value | int The maxSuggestions to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setQuery(String value)
public CompleteQueryRequest.Builder setQuery(String value)
Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
string query = 2 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The query to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setQueryBytes(ByteString value)
public CompleteQueryRequest.Builder setQueryBytes(ByteString value)
Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
string query = 2 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for query to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CompleteQueryRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
CompleteQueryRequest.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CompleteQueryRequest.Builder |
setVisitorId(String value)
public CompleteQueryRequest.Builder setVisitorId(String value)
Required field. 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string visitor_id = 7;
Name | Description |
value | String The visitorId to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setVisitorIdBytes(ByteString value)
public CompleteQueryRequest.Builder setVisitorIdBytes(ByteString value)
Required field. 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string visitor_id = 7;
Name | Description |
value | ByteString The bytes for visitorId to set. |
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |