Class SearchResponse.ConversationalSearchResult (2.57.0)

public static final class SearchResponse.ConversationalSearchResult extends GeneratedMessageV3 implements SearchResponse.ConversationalSearchResultOrBuilder

This field specifies all related information that is needed on client side for UI rendering of conversational retail search.

Protobuf type google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > SearchResponse.ConversationalSearchResult

Static Fields

ADDITIONAL_FILTERS_FIELD_NUMBER

public static final int ADDITIONAL_FILTERS_FIELD_NUMBER
Field Value
Type Description
int

ADDITIONAL_FILTER_FIELD_NUMBER

public static final int ADDITIONAL_FILTER_FIELD_NUMBER
Field Value
Type Description
int

CONVERSATION_ID_FIELD_NUMBER

public static final int CONVERSATION_ID_FIELD_NUMBER
Field Value
Type Description
int

FOLLOWUP_QUESTION_FIELD_NUMBER

public static final int FOLLOWUP_QUESTION_FIELD_NUMBER
Field Value
Type Description
int

REFINED_QUERY_FIELD_NUMBER

public static final int REFINED_QUERY_FIELD_NUMBER
Field Value
Type Description
int

SUGGESTED_ANSWERS_FIELD_NUMBER

public static final int SUGGESTED_ANSWERS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SearchResponse.ConversationalSearchResult getDefaultInstance()
Returns
Type Description
SearchResponse.ConversationalSearchResult

getDescriptor()

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

newBuilder()

public static SearchResponse.ConversationalSearchResult.Builder newBuilder()
Returns
Type Description
SearchResponse.ConversationalSearchResult.Builder

newBuilder(SearchResponse.ConversationalSearchResult prototype)

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

parseDelimitedFrom(InputStream input)

public static SearchResponse.ConversationalSearchResult parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchResponse.ConversationalSearchResult
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static SearchResponse.ConversationalSearchResult parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SearchResponse.ConversationalSearchResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static SearchResponse.ConversationalSearchResult parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SearchResponse.ConversationalSearchResult
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static SearchResponse.ConversationalSearchResult parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SearchResponse.ConversationalSearchResult
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static SearchResponse.ConversationalSearchResult parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SearchResponse.ConversationalSearchResult
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<SearchResponse.ConversationalSearchResult> parser()
Returns
Type Description
Parser<ConversationalSearchResult>

Methods

equals(Object obj)

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

getAdditionalFilter()

public SearchResponse.ConversationalSearchResult.AdditionalFilter getAdditionalFilter()

This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request.

.google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filter = 6;

Returns
Type Description
SearchResponse.ConversationalSearchResult.AdditionalFilter

The additionalFilter.

getAdditionalFilterOrBuilder()

public SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder getAdditionalFilterOrBuilder()

This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request.

.google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filter = 6;

Returns
Type Description
SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder

getAdditionalFilters(int index) (deprecated)

public SearchResponse.ConversationalSearchResult.AdditionalFilter getAdditionalFilters(int index)

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filters = 3 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.ConversationalSearchResult.AdditionalFilter

getAdditionalFiltersCount() (deprecated)

public int getAdditionalFiltersCount()

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filters = 3 [deprecated = true];

Returns
Type Description
int

getAdditionalFiltersList() (deprecated)

public List<SearchResponse.ConversationalSearchResult.AdditionalFilter> getAdditionalFiltersList()

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filters = 3 [deprecated = true];

Returns
Type Description
List<AdditionalFilter>

getAdditionalFiltersOrBuilder(int index) (deprecated)

public SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder getAdditionalFiltersOrBuilder(int index)

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filters = 3 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder

getAdditionalFiltersOrBuilderList() (deprecated)

public List<? extends SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder> getAdditionalFiltersOrBuilderList()

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filters = 3 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilterOrBuilder>

getConversationId()

public String getConversationId()

Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.

string conversation_id = 1;

Returns
Type Description
String

The conversationId.

getConversationIdBytes()

public ByteString getConversationIdBytes()

Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.

string conversation_id = 1;

Returns
Type Description
ByteString

The bytes for conversationId.

getDefaultInstanceForType()

public SearchResponse.ConversationalSearchResult getDefaultInstanceForType()
Returns
Type Description
SearchResponse.ConversationalSearchResult

getFollowupQuestion()

public String getFollowupQuestion()

The follow-up question. e.g., What is the color?

string followup_question = 4;

Returns
Type Description
String

The followupQuestion.

getFollowupQuestionBytes()

public ByteString getFollowupQuestionBytes()

The follow-up question. e.g., What is the color?

string followup_question = 4;

Returns
Type Description
ByteString

The bytes for followupQuestion.

getParserForType()

public Parser<SearchResponse.ConversationalSearchResult> getParserForType()
Returns
Type Description
Parser<ConversationalSearchResult>
Overrides

getRefinedQuery()

public String getRefinedQuery()

The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is dress and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is red color, which does not match any product attribute value filters, the refined query will be dress, red color.

string refined_query = 2;

Returns
Type Description
String

The refinedQuery.

getRefinedQueryBytes()

public ByteString getRefinedQueryBytes()

The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is dress and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is red color, which does not match any product attribute value filters, the refined query will be dress, red color.

string refined_query = 2;

Returns
Type Description
ByteString

The bytes for refinedQuery.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSuggestedAnswers(int index)

public SearchResponse.ConversationalSearchResult.SuggestedAnswer getSuggestedAnswers(int index)

The answer options provided to client for the follow-up question.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswer suggested_answers = 5;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.ConversationalSearchResult.SuggestedAnswer

getSuggestedAnswersCount()

public int getSuggestedAnswersCount()

The answer options provided to client for the follow-up question.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswer suggested_answers = 5;

Returns
Type Description
int

getSuggestedAnswersList()

public List<SearchResponse.ConversationalSearchResult.SuggestedAnswer> getSuggestedAnswersList()

The answer options provided to client for the follow-up question.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswer suggested_answers = 5;

Returns
Type Description
List<SuggestedAnswer>

getSuggestedAnswersOrBuilder(int index)

public SearchResponse.ConversationalSearchResult.SuggestedAnswerOrBuilder getSuggestedAnswersOrBuilder(int index)

The answer options provided to client for the follow-up question.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswer suggested_answers = 5;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.ConversationalSearchResult.SuggestedAnswerOrBuilder

getSuggestedAnswersOrBuilderList()

public List<? extends SearchResponse.ConversationalSearchResult.SuggestedAnswerOrBuilder> getSuggestedAnswersOrBuilderList()

The answer options provided to client for the follow-up question.

repeated .google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswer suggested_answers = 5;

Returns
Type Description
List<? extends com.google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.SuggestedAnswerOrBuilder>

hasAdditionalFilter()

public boolean hasAdditionalFilter()

This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request.

.google.cloud.retail.v2alpha.SearchResponse.ConversationalSearchResult.AdditionalFilter additional_filter = 6;

Returns
Type Description
boolean

Whether the additionalFilter 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 SearchResponse.ConversationalSearchResult.Builder newBuilderForType()
Returns
Type Description
SearchResponse.ConversationalSearchResult.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public SearchResponse.ConversationalSearchResult.Builder toBuilder()
Returns
Type Description
SearchResponse.ConversationalSearchResult.Builder

writeTo(CodedOutputStream output)

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