- 2.55.0 (latest)
- 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
Autocomplete parameters.
Protobuf type google.cloud.retail.v2alpha.CompleteQueryRequest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CompleteQueryRequest.BuilderImplements
CompleteQueryRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllLanguageCodes(Iterable<String> values)
public CompleteQueryRequest.Builder addAllLanguageCodes(Iterable<String> values)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameter | |
---|---|
Name | Description |
values | Iterable<String> The languageCodes to add. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addLanguageCodes(String value)
public CompleteQueryRequest.Builder addLanguageCodes(String value)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameter | |
---|---|
Name | Description |
value | String The languageCodes to add. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addLanguageCodesBytes(ByteString value)
public CompleteQueryRequest.Builder addLanguageCodesBytes(ByteString value)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes of the languageCodes to add. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
build()
public CompleteQueryRequest build()
Returns | |
---|---|
Type | Description |
CompleteQueryRequest |
buildPartial()
public CompleteQueryRequest buildPartial()
Returns | |
---|---|
Type | Description |
CompleteQueryRequest |
clear()
public CompleteQueryRequest.Builder clear()
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
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 enabling auto-learning function first. See guidelines.
string dataset = 6;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearDeviceType()
public CompleteQueryRequest.Builder clearDeviceType()
The device type context for completion suggestions. We recommend that you
leave this field empty.
It can 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;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearEnableAttributeSuggestions()
public CompleteQueryRequest.Builder clearEnableAttributeSuggestions()
If true, attribute suggestions are enabled and provided in response. This field is only available for "cloud-retail" dataset.
bool enable_attribute_suggestions = 9;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearEntity()
public CompleteQueryRequest.Builder clearEntity()
The entity for customers that may run multiple different entities, domains,
sites or regions, for example, Google US
, Google Ads
, Waymo
,
google.com
, youtube.com
, etc.
If this is set, it should be exactly matched with
UserEvent.entity to get
per-entity autocomplete results.
string entity = 10;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public CompleteQueryRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
clearLanguageCodes()
public CompleteQueryRequest.Builder clearLanguageCodes()
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public CompleteQueryRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
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];
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
clone()
public CompleteQueryRequest.Builder clone()
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
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 enabling auto-learning function first. See guidelines.
string dataset = 6;
Returns | |
---|---|
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 enabling auto-learning function first. See guidelines.
string dataset = 6;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for dataset. |
getDefaultInstanceForType()
public CompleteQueryRequest getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
CompleteQueryRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getDeviceType()
public String getDeviceType()
The device type context for completion suggestions. We recommend that you
leave this field empty.
It can 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;
Returns | |
---|---|
Type | Description |
String | The deviceType. |
getDeviceTypeBytes()
public ByteString getDeviceTypeBytes()
The device type context for completion suggestions. We recommend that you
leave this field empty.
It can 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;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for deviceType. |
getEnableAttributeSuggestions()
public boolean getEnableAttributeSuggestions()
If true, attribute suggestions are enabled and provided in response. This field is only available for "cloud-retail" dataset.
bool enable_attribute_suggestions = 9;
Returns | |
---|---|
Type | Description |
boolean | The enableAttributeSuggestions. |
getEntity()
public String getEntity()
The entity for customers that may run multiple different entities, domains,
sites or regions, for example, Google US
, Google Ads
, Waymo
,
google.com
, youtube.com
, etc.
If this is set, it should be exactly matched with
UserEvent.entity to get
per-entity autocomplete results.
string entity = 10;
Returns | |
---|---|
Type | Description |
String | The entity. |
getEntityBytes()
public ByteString getEntityBytes()
The entity for customers that may run multiple different entities, domains,
sites or regions, for example, Google US
, Google Ads
, Waymo
,
google.com
, youtube.com
, etc.
If this is set, it should be exactly matched with
UserEvent.entity to get
per-entity autocomplete results.
string entity = 10;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for entity. |
getLanguageCodes(int index)
public String getLanguageCodes(int index)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The languageCodes at the given index. |
getLanguageCodesBytes(int index)
public ByteString getLanguageCodesBytes(int index)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the languageCodes at the given index. |
getLanguageCodesCount()
public int getLanguageCodesCount()
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Returns | |
---|---|
Type | Description |
int | The count of languageCodes. |
getLanguageCodesList()
public ProtocolStringList getLanguageCodesList()
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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];
Returns | |
---|---|
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];
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for visitorId. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(CompleteQueryRequest other)
public CompleteQueryRequest.Builder mergeFrom(CompleteQueryRequest other)
Parameter | |
---|---|
Name | Description |
other | CompleteQueryRequest |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CompleteQueryRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public CompleteQueryRequest.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
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) = { ... }
Parameter | |
---|---|
Name | Description |
value | String The catalog to set. |
Returns | |
---|---|
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) = { ... }
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for catalog to set. |
Returns | |
---|---|
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 enabling auto-learning function first. See guidelines.
string dataset = 6;
Parameter | |
---|---|
Name | Description |
value | String The dataset to set. |
Returns | |
---|---|
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 enabling auto-learning function first. See guidelines.
string dataset = 6;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for dataset to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDeviceType(String value)
public CompleteQueryRequest.Builder setDeviceType(String value)
The device type context for completion suggestions. We recommend that you
leave this field empty.
It can 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;
Parameter | |
---|---|
Name | Description |
value | String The deviceType to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setDeviceTypeBytes(ByteString value)
public CompleteQueryRequest.Builder setDeviceTypeBytes(ByteString value)
The device type context for completion suggestions. We recommend that you
leave this field empty.
It can 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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for deviceType to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setEnableAttributeSuggestions(boolean value)
public CompleteQueryRequest.Builder setEnableAttributeSuggestions(boolean value)
If true, attribute suggestions are enabled and provided in response. This field is only available for "cloud-retail" dataset.
bool enable_attribute_suggestions = 9;
Parameter | |
---|---|
Name | Description |
value | boolean The enableAttributeSuggestions to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setEntity(String value)
public CompleteQueryRequest.Builder setEntity(String value)
The entity for customers that may run multiple different entities, domains,
sites or regions, for example, Google US
, Google Ads
, Waymo
,
google.com
, youtube.com
, etc.
If this is set, it should be exactly matched with
UserEvent.entity to get
per-entity autocomplete results.
string entity = 10;
Parameter | |
---|---|
Name | Description |
value | String The entity to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setEntityBytes(ByteString value)
public CompleteQueryRequest.Builder setEntityBytes(ByteString value)
The entity for customers that may run multiple different entities, domains,
sites or regions, for example, Google US
, Google Ads
, Waymo
,
google.com
, youtube.com
, etc.
If this is set, it should be exactly matched with
UserEvent.entity to get
per-entity autocomplete results.
string entity = 10;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for entity to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public CompleteQueryRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
setLanguageCodes(int index, String value)
public CompleteQueryRequest.Builder setLanguageCodes(int index, String value)
Note that this field applies for user-data
dataset only. For requests
with cloud-retail
dataset, setting this field has no effect.
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;
Parameters | |
---|---|
Name | Description |
index | int The index to set the value at. |
value | String The languageCodes to set. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | int The maxSuggestions to set. |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value | String The query to set. |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for query to set. |
Returns | |
---|---|
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)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final CompleteQueryRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | String The visitorId to set. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for visitorId to set. |
Returns | |
---|---|
Type | Description |
CompleteQueryRequest.Builder | This builder for chaining. |