Class ErrorMessage.Builder (0.23.0)
Stay organized with collections
Save and categorize content based on your preferences.
0.23.0 (latest)
0.22.0
0.21.0
0.19.0
0.16.0
0.15.0
0.13.0
0.11.0
0.10.0
0.9.0
0.8.0
0.6.0
0.4.0
0.3.0
0.2.0
0.1.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
Inherited Members
com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
build()
public ErrorMessage build ()
buildPartial()
public ErrorMessage buildPartial ()
clear()
public ErrorMessage . Builder clear ()
Overrides
clearText()
public ErrorMessage . Builder clearText ()
Output only. The text of the error.
string text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefaultInstanceForType()
public ErrorMessage getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
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 ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(ErrorMessage other)
public ErrorMessage . Builder mergeFrom ( ErrorMessage other )
public ErrorMessage . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public ErrorMessage . Builder mergeFrom ( Message other )
Parameter
Name
Description
other
Message
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.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-08-04 UTC.
[null,null,["Last updated 2026-08-04 UTC."],[],[]]