Class ErrorMessage.Builder (0.11.0)

public static final class ErrorMessage.Builder extends GeneratedMessage.Builder<ErrorMessage.Builder> implements ErrorMessageOrBuilder

An error message from a tool call. This message is used to represent an error that occurred while an agent was trying to use a tool. It's important to note that not all errors are terminal. Many are recoverable, and the agent may use the information from this error message to self-correct and retry the tool call or try a different approach.

For example, if a data query fails, the agent might receive an ErrorMessage, analyze it, and then generate a corrected query.

Clients should be cautious about interpreting this message as a definitive failure. It can be part of the agent's normal, iterative process of completing a task. Surfacing these errors directly to end-users without context (e.g., as a "hard failure") may be misleading.

Protobuf type google.cloud.geminidataanalytics.v1beta.ErrorMessage

Static Methods

getDescriptor()

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

Methods

build()

public ErrorMessage build()
Returns
Type Description
ErrorMessage

buildPartial()

public ErrorMessage buildPartial()
Returns
Type Description
ErrorMessage

clear()

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

clearText()

public ErrorMessage.Builder clearText()

Output only. The text of the error.

string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ErrorMessage.Builder

This builder for chaining.

getDefaultInstanceForType()

public ErrorMessage getDefaultInstanceForType()
Returns
Type Description
ErrorMessage

getDescriptorForType()

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

getText()

public String getText()

Output only. The text of the error.

string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Output only. The text of the error.

string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for text.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ErrorMessage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setText(String value)

public ErrorMessage.Builder setText(String value)

Output only. The text of the error.

string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The text to set.

Returns
Type Description
ErrorMessage.Builder

This builder for chaining.

setTextBytes(ByteString value)

public ErrorMessage.Builder setTextBytes(ByteString value)

Output only. The text of the error.

string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
ErrorMessage.Builder

This builder for chaining.