Class ConversationalSearchRequest (2.64.0)

public final class ConversationalSearchRequest extends GeneratedMessageV3 implements ConversationalSearchRequestOrBuilder

Request message for ConversationalSearchService.ConversationalSearch method.

Protobuf type google.cloud.retail.v2alpha.ConversationalSearchRequest

Static Fields

BRANCH_FIELD_NUMBER

public static final int BRANCH_FIELD_NUMBER
Field Value
Type Description
int

CONVERSATIONAL_FILTERING_SPEC_FIELD_NUMBER

public static final int CONVERSATIONAL_FILTERING_SPEC_FIELD_NUMBER
Field Value
Type Description
int

CONVERSATION_ID_FIELD_NUMBER

public static final int CONVERSATION_ID_FIELD_NUMBER
Field Value
Type Description
int

PAGE_CATEGORIES_FIELD_NUMBER

public static final int PAGE_CATEGORIES_FIELD_NUMBER
Field Value
Type Description
int

PLACEMENT_FIELD_NUMBER

public static final int PLACEMENT_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

SEARCH_PARAMS_FIELD_NUMBER

public static final int SEARCH_PARAMS_FIELD_NUMBER
Field Value
Type Description
int

USER_INFO_FIELD_NUMBER

public static final int USER_INFO_FIELD_NUMBER
Field Value
Type Description
int

VISITOR_ID_FIELD_NUMBER

public static final int VISITOR_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ConversationalSearchRequest getDefaultInstance()
Returns
Type Description
ConversationalSearchRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ConversationalSearchRequest.Builder newBuilder()
Returns
Type Description
ConversationalSearchRequest.Builder

newBuilder(ConversationalSearchRequest prototype)

public static ConversationalSearchRequest.Builder newBuilder(ConversationalSearchRequest prototype)
Parameter
Name Description
prototype ConversationalSearchRequest
Returns
Type Description
ConversationalSearchRequest.Builder

parseDelimitedFrom(InputStream input)

public static ConversationalSearchRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ConversationalSearchRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ConversationalSearchRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ConversationalSearchRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ConversationalSearchRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ConversationalSearchRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ConversationalSearchRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConversationalSearchRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ConversationalSearchRequest> parser()
Returns
Type Description
Parser<ConversationalSearchRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBranch()

public String getBranch()

Required. The branch resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/0.

Use "default_branch" as the branch ID or leave this field empty, to search products under the default branch.

string branch = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The branch.

getBranchBytes()

public ByteString getBranchBytes()

Required. The branch resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/0.

Use "default_branch" as the branch ID or leave this field empty, to search products under the default branch.

string branch = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for branch.

getConversationId()

public String getConversationId()

Optional. This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResponse.conversation_id. For the initial request, this should be empty.

string conversation_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The conversationId.

getConversationIdBytes()

public ByteString getConversationIdBytes()

Optional. This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResponse.conversation_id. For the initial request, this should be empty.

string conversation_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for conversationId.

getConversationalFilteringSpec()

public ConversationalSearchRequest.ConversationalFilteringSpec getConversationalFilteringSpec()

Optional. This field specifies all conversational filtering related parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.ConversationalFilteringSpec conversational_filtering_spec = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationalSearchRequest.ConversationalFilteringSpec

The conversationalFilteringSpec.

getConversationalFilteringSpecOrBuilder()

public ConversationalSearchRequest.ConversationalFilteringSpecOrBuilder getConversationalFilteringSpecOrBuilder()

Optional. This field specifies all conversational filtering related parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.ConversationalFilteringSpec conversational_filtering_spec = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationalSearchRequest.ConversationalFilteringSpecOrBuilder

getDefaultInstanceForType()

public ConversationalSearchRequest getDefaultInstanceForType()
Returns
Type Description
ConversationalSearchRequest

getPageCategories(int index)

public String getPageCategories(int index)

Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories;

To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s).

Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].

repeated string page_categories = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The pageCategories at the given index.

getPageCategoriesBytes(int index)

public ByteString getPageCategoriesBytes(int index)

Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories;

To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s).

Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].

repeated string page_categories = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the pageCategories at the given index.

getPageCategoriesCount()

public int getPageCategoriesCount()

Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories;

To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s).

Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].

repeated string page_categories = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of pageCategories.

getPageCategoriesList()

public ProtocolStringList getPageCategoriesList()

Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories;

To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s).

Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].

repeated string page_categories = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the pageCategories.

getParserForType()

public Parser<ConversationalSearchRequest> getParserForType()
Returns
Type Description
Parser<ConversationalSearchRequest>
Overrides

getPlacement()

public String getPlacement()

Required. The resource name of the search engine placement, such as projects/*/locations/global/catalogs/default_catalog/placements/default_search or projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config This field is used to identify the serving config name and the set of models that will be used to make the search.

string placement = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The placement.

getPlacementBytes()

public ByteString getPlacementBytes()

Required. The resource name of the search engine placement, such as projects/*/locations/global/catalogs/default_catalog/placements/default_search or projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config This field is used to identify the serving config name and the set of models that will be used to make the search.

string placement = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for placement.

getQuery()

public String getQuery()

Optional. Raw search query to be searched for.

If this field is empty, the request is considered a category browsing request.

string query = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Optional. Raw search query to be searched for.

If this field is empty, the request is considered a category browsing request.

string query = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for query.

getSearchParams()

public ConversationalSearchRequest.SearchParams getSearchParams()

Optional. Search parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.SearchParams search_params = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationalSearchRequest.SearchParams

The searchParams.

getSearchParamsOrBuilder()

public ConversationalSearchRequest.SearchParamsOrBuilder getSearchParamsOrBuilder()

Optional. Search parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.SearchParams search_params = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationalSearchRequest.SearchParamsOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUserInfo()

public UserInfo getUserInfo()

Optional. User information.

.google.cloud.retail.v2alpha.UserInfo user_info = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
UserInfo

The userInfo.

getUserInfoOrBuilder()

public UserInfoOrBuilder getUserInfoOrBuilder()

Optional. User information.

.google.cloud.retail.v2alpha.UserInfo user_info = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
UserInfoOrBuilder

getVisitorId()

public String getVisitorId()

Required. 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 should be the same identifier as UserEvent.visitor_id.

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 = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The visitorId.

getVisitorIdBytes()

public ByteString getVisitorIdBytes()

Required. 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 should be the same identifier as UserEvent.visitor_id.

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 = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for visitorId.

hasConversationalFilteringSpec()

public boolean hasConversationalFilteringSpec()

Optional. This field specifies all conversational filtering related parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.ConversationalFilteringSpec conversational_filtering_spec = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the conversationalFilteringSpec field is set.

hasSearchParams()

public boolean hasSearchParams()

Optional. Search parameters.

.google.cloud.retail.v2alpha.ConversationalSearchRequest.SearchParams search_params = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the searchParams field is set.

hasUserInfo()

public boolean hasUserInfo()

Optional. User information.

.google.cloud.retail.v2alpha.UserInfo user_info = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the userInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ConversationalSearchRequest.Builder newBuilderForType()
Returns
Type Description
ConversationalSearchRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ConversationalSearchRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ConversationalSearchRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ConversationalSearchRequest.Builder toBuilder()
Returns
Type Description
ConversationalSearchRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException