Package com.google.cloud.retail.v2
Class CompleteQueryRequest
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.retail.v2.CompleteQueryRequest
-
- All Implemented Interfaces:
CompleteQueryRequestOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class CompleteQueryRequest extends com.google.protobuf.GeneratedMessageV3 implements CompleteQueryRequestOrBuilder
Autocomplete parameters.
Protobuf typegoogle.cloud.retail.v2.CompleteQueryRequest- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompleteQueryRequest.BuilderAutocomplete parameters.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCATALOG_FIELD_NUMBERstatic intDATASET_FIELD_NUMBERstatic intDEVICE_TYPE_FIELD_NUMBERstatic intENTITY_FIELD_NUMBERstatic intLANGUAGE_CODES_FIELD_NUMBERstatic intMAX_SUGGESTIONS_FIELD_NUMBERstatic intQUERY_FIELD_NUMBERstatic intVISITOR_ID_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetCatalog()Required.com.google.protobuf.ByteStringgetCatalogBytes()Required.StringgetDataset()Determines which dataset to use for fetching completion.com.google.protobuf.ByteStringgetDatasetBytes()Determines which dataset to use for fetching completion.static CompleteQueryRequestgetDefaultInstance()CompleteQueryRequestgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetDeviceType()The device type context for completion suggestions.com.google.protobuf.ByteStringgetDeviceTypeBytes()The device type context for completion suggestions.StringgetEntity()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.com.google.protobuf.ByteStringgetEntityBytes()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.StringgetLanguageCodes(int index)Note that this field applies for `user-data` dataset only.com.google.protobuf.ByteStringgetLanguageCodesBytes(int index)Note that this field applies for `user-data` dataset only.intgetLanguageCodesCount()Note that this field applies for `user-data` dataset only.com.google.protobuf.ProtocolStringListgetLanguageCodesList()Note that this field applies for `user-data` dataset only.intgetMaxSuggestions()Completion max suggestions.com.google.protobuf.Parser<CompleteQueryRequest>getParserForType()StringgetQuery()Required.com.google.protobuf.ByteStringgetQueryBytes()Required.intgetSerializedSize()StringgetVisitorId()Required field.com.google.protobuf.ByteStringgetVisitorIdBytes()Required field.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static CompleteQueryRequest.BuildernewBuilder()static CompleteQueryRequest.BuildernewBuilder(CompleteQueryRequest prototype)CompleteQueryRequest.BuildernewBuilderForType()protected CompleteQueryRequest.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static CompleteQueryRequestparseDelimitedFrom(InputStream input)static CompleteQueryRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CompleteQueryRequestparseFrom(byte[] data)static CompleteQueryRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CompleteQueryRequestparseFrom(com.google.protobuf.ByteString data)static CompleteQueryRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CompleteQueryRequestparseFrom(com.google.protobuf.CodedInputStream input)static CompleteQueryRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CompleteQueryRequestparseFrom(InputStream input)static CompleteQueryRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CompleteQueryRequestparseFrom(ByteBuffer data)static CompleteQueryRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<CompleteQueryRequest>parser()CompleteQueryRequest.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CATALOG_FIELD_NUMBER
public static final int CATALOG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VISITOR_ID_FIELD_NUMBER
public static final int VISITOR_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LANGUAGE_CODES_FIELD_NUMBER
public static final int LANGUAGE_CODES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DEVICE_TYPE_FIELD_NUMBER
public static final int DEVICE_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DATASET_FIELD_NUMBER
public static final int DATASET_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MAX_SUGGESTIONS_FIELD_NUMBER
public static final int MAX_SUGGESTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENTITY_FIELD_NUMBER
public static final int ENTITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
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) = { ... }- Specified by:
getCatalogin interfaceCompleteQueryRequestOrBuilder- Returns:
- The catalog.
-
getCatalogBytes
public com.google.protobuf.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) = { ... }- Specified by:
getCatalogBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- The bytes for catalog.
-
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];- Specified by:
getQueryin interfaceCompleteQueryRequestOrBuilder- Returns:
- The query.
-
getQueryBytes
public com.google.protobuf.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];- Specified by:
getQueryBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- 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;- Specified by:
getVisitorIdin interfaceCompleteQueryRequestOrBuilder- Returns:
- The visitorId.
-
getVisitorIdBytes
public com.google.protobuf.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;- Specified by:
getVisitorIdBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- The bytes for visitorId.
-
getLanguageCodesList
public com.google.protobuf.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](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.
repeated string language_codes = 3;- Specified by:
getLanguageCodesListin interfaceCompleteQueryRequestOrBuilder- Returns:
- A list containing the languageCodes.
-
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](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.
repeated string language_codes = 3;- Specified by:
getLanguageCodesCountin interfaceCompleteQueryRequestOrBuilder- Returns:
- The count of languageCodes.
-
getLanguageCodes
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](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.
repeated string language_codes = 3;- Specified by:
getLanguageCodesin interfaceCompleteQueryRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The languageCodes at the given index.
-
getLanguageCodesBytes
public com.google.protobuf.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](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.
repeated string language_codes = 3;- Specified by:
getLanguageCodesBytesin interfaceCompleteQueryRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the languageCodes at the given index.
-
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;- Specified by:
getDeviceTypein interfaceCompleteQueryRequestOrBuilder- Returns:
- The deviceType.
-
getDeviceTypeBytes
public com.google.protobuf.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;- Specified by:
getDeviceTypeBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- The bytes for deviceType.
-
getDataset
public String getDataset()
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through [CompletionService.ImportCompletionData][google.cloud.retail.v2.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](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
string dataset = 6;- Specified by:
getDatasetin interfaceCompleteQueryRequestOrBuilder- Returns:
- The dataset.
-
getDatasetBytes
public com.google.protobuf.ByteString getDatasetBytes()
Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through [CompletionService.ImportCompletionData][google.cloud.retail.v2.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](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
string dataset = 6;- Specified by:
getDatasetBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- The bytes for dataset.
-
getMaxSuggestions
public int getMaxSuggestions()
Completion max suggestions. If left unset or set to 0, then will fallback to the configured value [CompletionConfig.max_suggestions][google.cloud.retail.v2.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;- Specified by:
getMaxSuggestionsin interfaceCompleteQueryRequestOrBuilder- Returns:
- The maxSuggestions.
-
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][google.cloud.retail.v2.UserEvent.entity] to get per-entity autocomplete results.
string entity = 10;- Specified by:
getEntityin interfaceCompleteQueryRequestOrBuilder- Returns:
- The entity.
-
getEntityBytes
public com.google.protobuf.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][google.cloud.retail.v2.UserEvent.entity] to get per-entity autocomplete results.
string entity = 10;- Specified by:
getEntityBytesin interfaceCompleteQueryRequestOrBuilder- Returns:
- The bytes for entity.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CompleteQueryRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompleteQueryRequest parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CompleteQueryRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CompleteQueryRequest parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CompleteQueryRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static CompleteQueryRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CompleteQueryRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public CompleteQueryRequest.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CompleteQueryRequest.Builder newBuilder()
-
newBuilder
public static CompleteQueryRequest.Builder newBuilder(CompleteQueryRequest prototype)
-
toBuilder
public CompleteQueryRequest.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CompleteQueryRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CompleteQueryRequest getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CompleteQueryRequest> parser()
-
getParserForType
public com.google.protobuf.Parser<CompleteQueryRequest> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CompleteQueryRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-