Class SearchRequest.ConversationalSearchSpec.Builder (2.56.0)

public static final class SearchRequest.ConversationalSearchSpec.Builder extends GeneratedMessageV3.Builder<SearchRequest.ConversationalSearchSpec.Builder> implements SearchRequest.ConversationalSearchSpecOrBuilder

This field specifies all conversational related parameters addition to traditional retail search.

Protobuf type google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchRequest.ConversationalSearchSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

build()

public SearchRequest.ConversationalSearchSpec build()
Returns
Type Description
SearchRequest.ConversationalSearchSpec

buildPartial()

public SearchRequest.ConversationalSearchSpec buildPartial()
Returns
Type Description
SearchRequest.ConversationalSearchSpec

clear()

public SearchRequest.ConversationalSearchSpec.Builder clear()
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

clearConversationId()

public SearchRequest.ConversationalSearchSpec.Builder clearConversationId()

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 [ConversationalSearchResult.conversation_id][]. For the initial request, this should be empty.

string conversation_id = 2;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SearchRequest.ConversationalSearchSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

clearFollowupConversationRequested()

public SearchRequest.ConversationalSearchSpec.Builder clearFollowupConversationRequested()

This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.

bool followup_conversation_requested = 1;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchRequest.ConversationalSearchSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

clearUserAnswer()

public SearchRequest.ConversationalSearchSpec.Builder clearUserAnswer()

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

clone()

public SearchRequest.ConversationalSearchSpec.Builder clone()
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

getConversationId()

public String getConversationId()

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 [ConversationalSearchResult.conversation_id][]. For the initial request, this should be empty.

string conversation_id = 2;

Returns
Type Description
String

The conversationId.

getConversationIdBytes()

public ByteString getConversationIdBytes()

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 [ConversationalSearchResult.conversation_id][]. For the initial request, this should be empty.

string conversation_id = 2;

Returns
Type Description
ByteString

The bytes for conversationId.

getDefaultInstanceForType()

public SearchRequest.ConversationalSearchSpec getDefaultInstanceForType()
Returns
Type Description
SearchRequest.ConversationalSearchSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFollowupConversationRequested()

public boolean getFollowupConversationRequested()

This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.

bool followup_conversation_requested = 1;

Returns
Type Description
boolean

The followupConversationRequested.

getUserAnswer()

public SearchRequest.ConversationalSearchSpec.UserAnswer getUserAnswer()

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.UserAnswer

The userAnswer.

getUserAnswerBuilder()

public SearchRequest.ConversationalSearchSpec.UserAnswer.Builder getUserAnswerBuilder()

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.UserAnswer.Builder

getUserAnswerOrBuilder()

public SearchRequest.ConversationalSearchSpec.UserAnswerOrBuilder getUserAnswerOrBuilder()

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Returns
Type Description
SearchRequest.ConversationalSearchSpec.UserAnswerOrBuilder

hasUserAnswer()

public boolean hasUserAnswer()

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Returns
Type Description
boolean

Whether the userAnswer field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchRequest.ConversationalSearchSpec other)

public SearchRequest.ConversationalSearchSpec.Builder mergeFrom(SearchRequest.ConversationalSearchSpec other)
Parameter
Name Description
other SearchRequest.ConversationalSearchSpec
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchRequest.ConversationalSearchSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SearchRequest.ConversationalSearchSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchRequest.ConversationalSearchSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

mergeUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer value)

public SearchRequest.ConversationalSearchSpec.Builder mergeUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer value)

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Parameter
Name Description
value SearchRequest.ConversationalSearchSpec.UserAnswer
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

setConversationId(String value)

public SearchRequest.ConversationalSearchSpec.Builder setConversationId(String value)

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 [ConversationalSearchResult.conversation_id][]. For the initial request, this should be empty.

string conversation_id = 2;

Parameter
Name Description
value String

The conversationId to set.

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

This builder for chaining.

setConversationIdBytes(ByteString value)

public SearchRequest.ConversationalSearchSpec.Builder setConversationIdBytes(ByteString value)

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 [ConversationalSearchResult.conversation_id][]. For the initial request, this should be empty.

string conversation_id = 2;

Parameter
Name Description
value ByteString

The bytes for conversationId to set.

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SearchRequest.ConversationalSearchSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

setFollowupConversationRequested(boolean value)

public SearchRequest.ConversationalSearchSpec.Builder setFollowupConversationRequested(boolean value)

This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.

bool followup_conversation_requested = 1;

Parameter
Name Description
value boolean

The followupConversationRequested to set.

Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SearchRequest.ConversationalSearchSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchRequest.ConversationalSearchSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder
Overrides

setUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer value)

public SearchRequest.ConversationalSearchSpec.Builder setUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer value)

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Parameter
Name Description
value SearchRequest.ConversationalSearchSpec.UserAnswer
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder

setUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer.Builder builderForValue)

public SearchRequest.ConversationalSearchSpec.Builder setUserAnswer(SearchRequest.ConversationalSearchSpec.UserAnswer.Builder builderForValue)

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.

.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer user_answer = 3;

Parameter
Name Description
builderForValue SearchRequest.ConversationalSearchSpec.UserAnswer.Builder
Returns
Type Description
SearchRequest.ConversationalSearchSpec.Builder