Class ToolResponse.Builder (0.1.0)

public static final class ToolResponse.Builder extends GeneratedMessage.Builder<ToolResponse.Builder> implements ToolResponseOrBuilder

The execution result of a specific tool from the client or the agent.

Protobuf type google.cloud.ces.v1.ToolResponse

Static Methods

getDescriptor()

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

Methods

build()

public ToolResponse build()
Returns
Type Description
ToolResponse

buildPartial()

public ToolResponse buildPartial()
Returns
Type Description
ToolResponse

clear()

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

clearDisplayName()

public ToolResponse.Builder clearDisplayName()

Output only. Display name of the tool.

string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

clearId()

public ToolResponse.Builder clearId()

Optional. The matching ID of the tool call the response is for.

string id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

clearResponse()

public ToolResponse.Builder clearResponse()

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ToolResponse.Builder

clearTool()

public ToolResponse.Builder clearTool()

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

clearToolIdentifier()

public ToolResponse.Builder clearToolIdentifier()
Returns
Type Description
ToolResponse.Builder

clearToolsetTool()

public ToolResponse.Builder clearToolsetTool()

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponse.Builder

getDefaultInstanceForType()

public ToolResponse getDefaultInstanceForType()
Returns
Type Description
ToolResponse

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Output only. Display name of the tool.

string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Output only. Display name of the tool.

string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for displayName.

getId()

public String getId()

Optional. The matching ID of the tool call the response is for.

string id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Optional. The matching ID of the tool call the response is for.

string id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for id.

getResponse()

public Struct getResponse()

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Struct

The response.

getResponseBuilder()

public Struct.Builder getResponseBuilder()

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getResponseOrBuilder()

public StructOrBuilder getResponseOrBuilder()

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StructOrBuilder

getTool()

public String getTool()

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The tool.

getToolBytes()

public ByteString getToolBytes()

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for tool.

getToolIdentifierCase()

public ToolResponse.ToolIdentifierCase getToolIdentifierCase()
Returns
Type Description
ToolResponse.ToolIdentifierCase

getToolsetTool()

public ToolsetTool getToolsetTool()

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetTool

The toolsetTool.

getToolsetToolBuilder()

public ToolsetTool.Builder getToolsetToolBuilder()

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetTool.Builder

getToolsetToolOrBuilder()

public ToolsetToolOrBuilder getToolsetToolOrBuilder()

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetToolOrBuilder

hasResponse()

public boolean hasResponse()

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the response field is set.

hasTool()

public boolean hasTool()

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the tool field is set.

hasToolsetTool()

public boolean hasToolsetTool()

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the toolsetTool field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ToolResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeResponse(Struct value)

public ToolResponse.Builder mergeResponse(Struct value)

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
ToolResponse.Builder

mergeToolsetTool(ToolsetTool value)

public ToolResponse.Builder mergeToolsetTool(ToolsetTool value)

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ToolsetTool
Returns
Type Description
ToolResponse.Builder

setDisplayName(String value)

public ToolResponse.Builder setDisplayName(String value)

Output only. Display name of the tool.

string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public ToolResponse.Builder setDisplayNameBytes(ByteString value)

Output only. Display name of the tool.

string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setId(String value)

public ToolResponse.Builder setId(String value)

Optional. The matching ID of the tool call the response is for.

string id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setIdBytes(ByteString value)

public ToolResponse.Builder setIdBytes(ByteString value)

Optional. The matching ID of the tool call the response is for.

string id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setResponse(Struct value)

public ToolResponse.Builder setResponse(Struct value)

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
ToolResponse.Builder

setResponse(Struct.Builder builderForValue)

public ToolResponse.Builder setResponse(Struct.Builder builderForValue)

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

.google.protobuf.Struct response = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ToolResponse.Builder

setTool(String value)

public ToolResponse.Builder setTool(String value)

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The tool to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setToolBytes(ByteString value)

public ToolResponse.Builder setToolBytes(ByteString value)

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

string tool = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for tool to set.

Returns
Type Description
ToolResponse.Builder

This builder for chaining.

setToolsetTool(ToolsetTool value)

public ToolResponse.Builder setToolsetTool(ToolsetTool value)

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ToolsetTool
Returns
Type Description
ToolResponse.Builder

setToolsetTool(ToolsetTool.Builder builderForValue)

public ToolResponse.Builder setToolsetTool(ToolsetTool.Builder builderForValue)

Optional. The toolset tool that got executed.

.google.cloud.ces.v1.ToolsetTool toolset_tool = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ToolsetTool.Builder
Returns
Type Description
ToolResponse.Builder