Class Tool.Builder (0.66.0)

public static final class Tool.Builder extends GeneratedMessageV3.Builder<Tool.Builder> implements ToolOrBuilder

A tool provides a list of actions which are available to the Playbook to attain its goal. A Tool consists of a description of the tool's usage and a specification of the tool which contains the schema and authentication information.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Tool

Implements

ToolOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Tool build()
Returns
Type Description
Tool

buildPartial()

public Tool buildPartial()
Returns
Type Description
Tool

clear()

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

clearDataStoreSpec()

public Tool.Builder clearDataStoreSpec()

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Returns
Type Description
Tool.Builder

clearDescription()

public Tool.Builder clearDescription()

Required. High level description of the Tool and its usage.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Tool.Builder

This builder for chaining.

clearDisplayName()

public Tool.Builder clearDisplayName()

Required. The human-readable name of the Tool, unique within an agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Tool.Builder

This builder for chaining.

clearExtensionSpec()

public Tool.Builder clearExtensionSpec()

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Returns
Type Description
Tool.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearFunctionSpec()

public Tool.Builder clearFunctionSpec()

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Returns
Type Description
Tool.Builder

clearName()

public Tool.Builder clearName()

The unique identifier of the Tool. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.

string name = 1;

Returns
Type Description
Tool.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOpenApiSpec()

public Tool.Builder clearOpenApiSpec()

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Returns
Type Description
Tool.Builder

clearSpecification()

public Tool.Builder clearSpecification()
Returns
Type Description
Tool.Builder

clearToolType()

public Tool.Builder clearToolType()

Output only. The tool type.

.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Tool.Builder

This builder for chaining.

clone()

public Tool.Builder clone()
Returns
Type Description
Tool.Builder
Overrides

getDataStoreSpec()

public Tool.DataStoreTool getDataStoreSpec()

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Returns
Type Description
Tool.DataStoreTool

The dataStoreSpec.

getDataStoreSpecBuilder()

public Tool.DataStoreTool.Builder getDataStoreSpecBuilder()

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Returns
Type Description
Tool.DataStoreTool.Builder

getDataStoreSpecOrBuilder()

public Tool.DataStoreToolOrBuilder getDataStoreSpecOrBuilder()

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Returns
Type Description
Tool.DataStoreToolOrBuilder

getDefaultInstanceForType()

public Tool getDefaultInstanceForType()
Returns
Type Description
Tool

getDescription()

public String getDescription()

Required. High level description of the Tool and its usage.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Required. High level description of the Tool and its usage.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The human-readable name of the Tool, unique within an agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The human-readable name of the Tool, unique within an agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getExtensionSpec()

public Tool.ExtensionTool getExtensionSpec()

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Returns
Type Description
Tool.ExtensionTool

The extensionSpec.

getExtensionSpecBuilder()

public Tool.ExtensionTool.Builder getExtensionSpecBuilder()

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Returns
Type Description
Tool.ExtensionTool.Builder

getExtensionSpecOrBuilder()

public Tool.ExtensionToolOrBuilder getExtensionSpecOrBuilder()

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Returns
Type Description
Tool.ExtensionToolOrBuilder

getFunctionSpec()

public Tool.FunctionTool getFunctionSpec()

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Returns
Type Description
Tool.FunctionTool

The functionSpec.

getFunctionSpecBuilder()

public Tool.FunctionTool.Builder getFunctionSpecBuilder()

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Returns
Type Description
Tool.FunctionTool.Builder

getFunctionSpecOrBuilder()

public Tool.FunctionToolOrBuilder getFunctionSpecOrBuilder()

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Returns
Type Description
Tool.FunctionToolOrBuilder

getName()

public String getName()

The unique identifier of the Tool. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the Tool. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getOpenApiSpec()

public Tool.OpenApiTool getOpenApiSpec()

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Returns
Type Description
Tool.OpenApiTool

The openApiSpec.

getOpenApiSpecBuilder()

public Tool.OpenApiTool.Builder getOpenApiSpecBuilder()

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Returns
Type Description
Tool.OpenApiTool.Builder

getOpenApiSpecOrBuilder()

public Tool.OpenApiToolOrBuilder getOpenApiSpecOrBuilder()

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Returns
Type Description
Tool.OpenApiToolOrBuilder

getSpecificationCase()

public Tool.SpecificationCase getSpecificationCase()
Returns
Type Description
Tool.SpecificationCase

getToolType()

public Tool.ToolType getToolType()

Output only. The tool type.

.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Tool.ToolType

The toolType.

getToolTypeValue()

public int getToolTypeValue()

Output only. The tool type.

.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for toolType.

hasDataStoreSpec()

public boolean hasDataStoreSpec()

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Returns
Type Description
boolean

Whether the dataStoreSpec field is set.

hasExtensionSpec()

public boolean hasExtensionSpec()

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Returns
Type Description
boolean

Whether the extensionSpec field is set.

hasFunctionSpec()

public boolean hasFunctionSpec()

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Returns
Type Description
boolean

Whether the functionSpec field is set.

hasOpenApiSpec()

public boolean hasOpenApiSpec()

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Returns
Type Description
boolean

Whether the openApiSpec field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDataStoreSpec(Tool.DataStoreTool value)

public Tool.Builder mergeDataStoreSpec(Tool.DataStoreTool value)

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Parameter
Name Description
value Tool.DataStoreTool
Returns
Type Description
Tool.Builder

mergeExtensionSpec(Tool.ExtensionTool value)

public Tool.Builder mergeExtensionSpec(Tool.ExtensionTool value)

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Parameter
Name Description
value Tool.ExtensionTool
Returns
Type Description
Tool.Builder

mergeFrom(Tool other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFunctionSpec(Tool.FunctionTool value)

public Tool.Builder mergeFunctionSpec(Tool.FunctionTool value)

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Parameter
Name Description
value Tool.FunctionTool
Returns
Type Description
Tool.Builder

mergeOpenApiSpec(Tool.OpenApiTool value)

public Tool.Builder mergeOpenApiSpec(Tool.OpenApiTool value)

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Parameter
Name Description
value Tool.OpenApiTool
Returns
Type Description
Tool.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDataStoreSpec(Tool.DataStoreTool value)

public Tool.Builder setDataStoreSpec(Tool.DataStoreTool value)

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Parameter
Name Description
value Tool.DataStoreTool
Returns
Type Description
Tool.Builder

setDataStoreSpec(Tool.DataStoreTool.Builder builderForValue)

public Tool.Builder setDataStoreSpec(Tool.DataStoreTool.Builder builderForValue)

Data store search tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;

Parameter
Name Description
builderForValue Tool.DataStoreTool.Builder
Returns
Type Description
Tool.Builder

setDescription(String value)

public Tool.Builder setDescription(String value)

Required. High level description of the Tool and its usage.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Tool.Builder setDescriptionBytes(ByteString value)

Required. High level description of the Tool and its usage.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setDisplayName(String value)

public Tool.Builder setDisplayName(String value)

Required. The human-readable name of the Tool, unique within an agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Tool.Builder setDisplayNameBytes(ByteString value)

Required. The human-readable name of the Tool, unique within an agent.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setExtensionSpec(Tool.ExtensionTool value)

public Tool.Builder setExtensionSpec(Tool.ExtensionTool value)

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Parameter
Name Description
value Tool.ExtensionTool
Returns
Type Description
Tool.Builder

setExtensionSpec(Tool.ExtensionTool.Builder builderForValue)

public Tool.Builder setExtensionSpec(Tool.ExtensionTool.Builder builderForValue)

Vertex extension tool specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;

Parameter
Name Description
builderForValue Tool.ExtensionTool.Builder
Returns
Type Description
Tool.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFunctionSpec(Tool.FunctionTool value)

public Tool.Builder setFunctionSpec(Tool.FunctionTool value)

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Parameter
Name Description
value Tool.FunctionTool
Returns
Type Description
Tool.Builder

setFunctionSpec(Tool.FunctionTool.Builder builderForValue)

public Tool.Builder setFunctionSpec(Tool.FunctionTool.Builder builderForValue)

Client side executed function specification.

.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;

Parameter
Name Description
builderForValue Tool.FunctionTool.Builder
Returns
Type Description
Tool.Builder

setName(String value)

public Tool.Builder setName(String value)

The unique identifier of the Tool. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Tool.Builder setNameBytes(ByteString value)

The unique identifier of the Tool. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setOpenApiSpec(Tool.OpenApiTool value)

public Tool.Builder setOpenApiSpec(Tool.OpenApiTool value)

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Parameter
Name Description
value Tool.OpenApiTool
Returns
Type Description
Tool.Builder

setOpenApiSpec(Tool.OpenApiTool.Builder builderForValue)

public Tool.Builder setOpenApiSpec(Tool.OpenApiTool.Builder builderForValue)

OpenAPI specification of the Tool.

.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;

Parameter
Name Description
builderForValue Tool.OpenApiTool.Builder
Returns
Type Description
Tool.Builder

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

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

setToolType(Tool.ToolType value)

public Tool.Builder setToolType(Tool.ToolType value)

Output only. The tool type.

.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Tool.ToolType

The toolType to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setToolTypeValue(int value)

public Tool.Builder setToolTypeValue(int value)

Output only. The tool type.

.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for toolType to set.

Returns
Type Description
Tool.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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