Class AssistantConfirmationRequest.Builder (0.19.0)

public static final class AssistantConfirmationRequest.Builder extends GeneratedMessage.Builder<AssistantConfirmationRequest.Builder> implements AssistantConfirmationRequestOrBuilder

A blocking question or confirmation the assistant needs answered before an agent action can proceed. The requesting agent is paused and resumes only when the answer arrives on a later StreamChatAiAssistantRequest.confirmation_response.

Protobuf type google.cloud.ces.v1beta.AssistantConfirmationRequest

Static Methods

getDescriptor()

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

Methods

addAllQuestions(Iterable<? extends OptionQuestionsChunk.Question> values)

public AssistantConfirmationRequest.Builder addAllQuestions(Iterable<? extends OptionQuestionsChunk.Question> values)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.ces.v1beta.OptionQuestionsChunk.Question>
Returns
Type Description
AssistantConfirmationRequest.Builder

addQuestions(OptionQuestionsChunk.Question value)

public AssistantConfirmationRequest.Builder addQuestions(OptionQuestionsChunk.Question value)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
value OptionQuestionsChunk.Question
Returns
Type Description
AssistantConfirmationRequest.Builder

addQuestions(OptionQuestionsChunk.Question.Builder builderForValue)

public AssistantConfirmationRequest.Builder addQuestions(OptionQuestionsChunk.Question.Builder builderForValue)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
builderForValue OptionQuestionsChunk.Question.Builder
Returns
Type Description
AssistantConfirmationRequest.Builder

addQuestions(int index, OptionQuestionsChunk.Question value)

public AssistantConfirmationRequest.Builder addQuestions(int index, OptionQuestionsChunk.Question value)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameters
Name Description
index int
value OptionQuestionsChunk.Question
Returns
Type Description
AssistantConfirmationRequest.Builder

addQuestions(int index, OptionQuestionsChunk.Question.Builder builderForValue)

public AssistantConfirmationRequest.Builder addQuestions(int index, OptionQuestionsChunk.Question.Builder builderForValue)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameters
Name Description
index int
builderForValue OptionQuestionsChunk.Question.Builder
Returns
Type Description
AssistantConfirmationRequest.Builder

addQuestionsBuilder()

public OptionQuestionsChunk.Question.Builder addQuestionsBuilder()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
OptionQuestionsChunk.Question.Builder

addQuestionsBuilder(int index)

public OptionQuestionsChunk.Question.Builder addQuestionsBuilder(int index)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
index int
Returns
Type Description
OptionQuestionsChunk.Question.Builder

build()

public AssistantConfirmationRequest build()
Returns
Type Description
AssistantConfirmationRequest

buildPartial()

public AssistantConfirmationRequest buildPartial()
Returns
Type Description
AssistantConfirmationRequest

clear()

public AssistantConfirmationRequest.Builder clear()
Returns
Type Description
AssistantConfirmationRequest.Builder
Overrides

clearAgentName()

public AssistantConfirmationRequest.Builder clearAgentName()

Display label of the agent that raised the confirmation (e.g. "Contract Architect"), for the card header.

string agent_name = 7;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

clearConfirmationId()

public AssistantConfirmationRequest.Builder clearConfirmationId()

Identifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.

string confirmation_id = 1;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

clearContext()

public AssistantConfirmationRequest.Builder clearContext()

Context describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.

string context = 2;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

clearExpireTime()

public AssistantConfirmationRequest.Builder clearExpireTime()

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Returns
Type Description
AssistantConfirmationRequest.Builder

clearNegativeLabel()

public AssistantConfirmationRequest.Builder clearNegativeLabel()

Label for the declining action of a binary confirmation (e.g. "Not yet"). Unset when questions is populated.

string negative_label = 4;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

clearPositiveLabel()

public AssistantConfirmationRequest.Builder clearPositiveLabel()

Label for the approving action of a binary confirmation (e.g. "Publish"). Unset when questions is populated.

string positive_label = 3;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

clearQuestions()

public AssistantConfirmationRequest.Builder clearQuestions()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
AssistantConfirmationRequest.Builder

clearTool()

public AssistantConfirmationRequest.Builder clearTool()

Name of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.

string tool = 6;

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

getAgentName()

public String getAgentName()

Display label of the agent that raised the confirmation (e.g. "Contract Architect"), for the card header.

string agent_name = 7;

Returns
Type Description
String

The agentName.

getAgentNameBytes()

public ByteString getAgentNameBytes()

Display label of the agent that raised the confirmation (e.g. "Contract Architect"), for the card header.

string agent_name = 7;

Returns
Type Description
ByteString

The bytes for agentName.

getConfirmationId()

public String getConfirmationId()

Identifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.

string confirmation_id = 1;

Returns
Type Description
String

The confirmationId.

getConfirmationIdBytes()

public ByteString getConfirmationIdBytes()

Identifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.

string confirmation_id = 1;

Returns
Type Description
ByteString

The bytes for confirmationId.

getContext()

public String getContext()

Context describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.

string context = 2;

Returns
Type Description
String

The context.

getContextBytes()

public ByteString getContextBytes()

Context describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.

string context = 2;

Returns
Type Description
ByteString

The bytes for context.

getDefaultInstanceForType()

public AssistantConfirmationRequest getDefaultInstanceForType()
Returns
Type Description
AssistantConfirmationRequest

getDescriptorForType()

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

getExpireTime()

public Timestamp getExpireTime()

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Returns
Type Description
Timestamp

The expireTime.

getExpireTimeBuilder()

public Timestamp.Builder getExpireTimeBuilder()

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Returns
Type Description
Builder

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Returns
Type Description
TimestampOrBuilder

getNegativeLabel()

public String getNegativeLabel()

Label for the declining action of a binary confirmation (e.g. "Not yet"). Unset when questions is populated.

string negative_label = 4;

Returns
Type Description
String

The negativeLabel.

getNegativeLabelBytes()

public ByteString getNegativeLabelBytes()

Label for the declining action of a binary confirmation (e.g. "Not yet"). Unset when questions is populated.

string negative_label = 4;

Returns
Type Description
ByteString

The bytes for negativeLabel.

getPositiveLabel()

public String getPositiveLabel()

Label for the approving action of a binary confirmation (e.g. "Publish"). Unset when questions is populated.

string positive_label = 3;

Returns
Type Description
String

The positiveLabel.

getPositiveLabelBytes()

public ByteString getPositiveLabelBytes()

Label for the approving action of a binary confirmation (e.g. "Publish"). Unset when questions is populated.

string positive_label = 3;

Returns
Type Description
ByteString

The bytes for positiveLabel.

getQuestions(int index)

public OptionQuestionsChunk.Question getQuestions(int index)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
index int
Returns
Type Description
OptionQuestionsChunk.Question

getQuestionsBuilder(int index)

public OptionQuestionsChunk.Question.Builder getQuestionsBuilder(int index)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
index int
Returns
Type Description
OptionQuestionsChunk.Question.Builder

getQuestionsBuilderList()

public List<OptionQuestionsChunk.Question.Builder> getQuestionsBuilderList()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
List<Builder>

getQuestionsCount()

public int getQuestionsCount()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
int

getQuestionsList()

public List<OptionQuestionsChunk.Question> getQuestionsList()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
List<Question>

getQuestionsOrBuilder(int index)

public OptionQuestionsChunk.QuestionOrBuilder getQuestionsOrBuilder(int index)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
index int
Returns
Type Description
OptionQuestionsChunk.QuestionOrBuilder

getQuestionsOrBuilderList()

public List<? extends OptionQuestionsChunk.QuestionOrBuilder> getQuestionsOrBuilderList()

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Returns
Type Description
List<? extends com.google.cloud.ces.v1beta.OptionQuestionsChunk.QuestionOrBuilder>

getTool()

public String getTool()

Name of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.

string tool = 6;

Returns
Type Description
String

The tool.

getToolBytes()

public ByteString getToolBytes()

Name of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.

string tool = 6;

Returns
Type Description
ByteString

The bytes for tool.

hasExpireTime()

public boolean hasExpireTime()

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Returns
Type Description
boolean

Whether the expireTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeExpireTime(Timestamp value)

public AssistantConfirmationRequest.Builder mergeExpireTime(Timestamp value)

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Parameter
Name Description
value Timestamp
Returns
Type Description
AssistantConfirmationRequest.Builder

mergeFrom(AssistantConfirmationRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeQuestions(int index)

public AssistantConfirmationRequest.Builder removeQuestions(int index)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameter
Name Description
index int
Returns
Type Description
AssistantConfirmationRequest.Builder

setAgentName(String value)

public AssistantConfirmationRequest.Builder setAgentName(String value)

Display label of the agent that raised the confirmation (e.g. "Contract Architect"), for the card header.

string agent_name = 7;

Parameter
Name Description
value String

The agentName to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setAgentNameBytes(ByteString value)

public AssistantConfirmationRequest.Builder setAgentNameBytes(ByteString value)

Display label of the agent that raised the confirmation (e.g. "Contract Architect"), for the card header.

string agent_name = 7;

Parameter
Name Description
value ByteString

The bytes for agentName to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setConfirmationId(String value)

public AssistantConfirmationRequest.Builder setConfirmationId(String value)

Identifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.

string confirmation_id = 1;

Parameter
Name Description
value String

The confirmationId to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setConfirmationIdBytes(ByteString value)

public AssistantConfirmationRequest.Builder setConfirmationIdBytes(ByteString value)

Identifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.

string confirmation_id = 1;

Parameter
Name Description
value ByteString

The bytes for confirmationId to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setContext(String value)

public AssistantConfirmationRequest.Builder setContext(String value)

Context describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.

string context = 2;

Parameter
Name Description
value String

The context to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setContextBytes(ByteString value)

public AssistantConfirmationRequest.Builder setContextBytes(ByteString value)

Context describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.

string context = 2;

Parameter
Name Description
value ByteString

The bytes for context to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setExpireTime(Timestamp value)

public AssistantConfirmationRequest.Builder setExpireTime(Timestamp value)

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Parameter
Name Description
value Timestamp
Returns
Type Description
AssistantConfirmationRequest.Builder

setExpireTime(Timestamp.Builder builderForValue)

public AssistantConfirmationRequest.Builder setExpireTime(Timestamp.Builder builderForValue)

Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.

.google.protobuf.Timestamp expire_time = 8;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AssistantConfirmationRequest.Builder

setNegativeLabel(String value)

public AssistantConfirmationRequest.Builder setNegativeLabel(String value)

Label for the declining action of a binary confirmation (e.g. "Not yet"). Unset when questions is populated.

string negative_label = 4;

Parameter
Name Description
value String

The negativeLabel to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setNegativeLabelBytes(ByteString value)

public AssistantConfirmationRequest.Builder setNegativeLabelBytes(ByteString value)

Label for the declining action of a binary confirmation (e.g. "Not yet"). Unset when questions is populated.

string negative_label = 4;

Parameter
Name Description
value ByteString

The bytes for negativeLabel to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setPositiveLabel(String value)

public AssistantConfirmationRequest.Builder setPositiveLabel(String value)

Label for the approving action of a binary confirmation (e.g. "Publish"). Unset when questions is populated.

string positive_label = 3;

Parameter
Name Description
value String

The positiveLabel to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setPositiveLabelBytes(ByteString value)

public AssistantConfirmationRequest.Builder setPositiveLabelBytes(ByteString value)

Label for the approving action of a binary confirmation (e.g. "Publish"). Unset when questions is populated.

string positive_label = 3;

Parameter
Name Description
value ByteString

The bytes for positiveLabel to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setQuestions(int index, OptionQuestionsChunk.Question value)

public AssistantConfirmationRequest.Builder setQuestions(int index, OptionQuestionsChunk.Question value)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameters
Name Description
index int
value OptionQuestionsChunk.Question
Returns
Type Description
AssistantConfirmationRequest.Builder

setQuestions(int index, OptionQuestionsChunk.Question.Builder builderForValue)

public AssistantConfirmationRequest.Builder setQuestions(int index, OptionQuestionsChunk.Question.Builder builderForValue)

Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as AssistantConfirmationResponse.answer_text.

repeated .google.cloud.ces.v1beta.OptionQuestionsChunk.Question questions = 5;

Parameters
Name Description
index int
builderForValue OptionQuestionsChunk.Question.Builder
Returns
Type Description
AssistantConfirmationRequest.Builder

setTool(String value)

public AssistantConfirmationRequest.Builder setTool(String value)

Name of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.

string tool = 6;

Parameter
Name Description
value String

The tool to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.

setToolBytes(ByteString value)

public AssistantConfirmationRequest.Builder setToolBytes(ByteString value)

Name of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.

string tool = 6;

Parameter
Name Description
value ByteString

The bytes for tool to set.

Returns
Type Description
AssistantConfirmationRequest.Builder

This builder for chaining.