Class Tool (0.46.0)

public final class Tool extends GeneratedMessageV3 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 Fields

ACTIONS_FIELD_NUMBER

public static final int ACTIONS_FIELD_NUMBER
Field Value
Type Description
int

DATA_STORE_SPEC_FIELD_NUMBER

public static final int DATA_STORE_SPEC_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EXTENSION_SPEC_FIELD_NUMBER

public static final int EXTENSION_SPEC_FIELD_NUMBER
Field Value
Type Description
int

FUNCTION_SPEC_FIELD_NUMBER

public static final int FUNCTION_SPEC_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OPEN_API_SPEC_FIELD_NUMBER

public static final int OPEN_API_SPEC_FIELD_NUMBER
Field Value
Type Description
int

SCHEMAS_FIELD_NUMBER

public static final int SCHEMAS_FIELD_NUMBER
Field Value
Type Description
int

TOOL_TYPE_FIELD_NUMBER

public static final int TOOL_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Tool getDefaultInstance()
Returns
Type Description
Tool

getDescriptor()

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

newBuilder()

public static Tool.Builder newBuilder()
Returns
Type Description
Tool.Builder

newBuilder(Tool prototype)

public static Tool.Builder newBuilder(Tool prototype)
Parameter
Name Description
prototype Tool
Returns
Type Description
Tool.Builder

parseDelimitedFrom(InputStream input)

public static Tool parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Tool parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Tool parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Tool parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Tool parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Tool parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Tool> parser()
Returns
Type Description
Parser<Tool>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getActions(int index) (deprecated)

public String getActions(int index)

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458

The list of derived action names for the tool.

repeated string actions = 6 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The actions at the given index.

getActionsBytes(int index) (deprecated)

public ByteString getActionsBytes(int index)

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458

The list of derived action names for the tool.

repeated string actions = 6 [deprecated = true];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the actions at the given index.

getActionsCount() (deprecated)

public int getActionsCount()

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458

The list of derived action names for the tool.

repeated string actions = 6 [deprecated = true];

Returns
Type Description
int

The count of actions.

getActionsList() (deprecated)

public ProtocolStringList getActionsList()

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458

The list of derived action names for the tool.

repeated string actions = 6 [deprecated = true];

Returns
Type Description
ProtocolStringList

A list containing the actions.

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.

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.

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.

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.

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/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the Tool. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

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.

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

getParserForType()

public Parser<Tool> getParserForType()
Returns
Type Description
Parser<Tool>
Overrides

getSchemas(int index) (deprecated)

public String getSchemas(int index)

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461

The list of derived type schemas for the tool.

repeated string schemas = 7 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The schemas at the given index.

getSchemasBytes(int index) (deprecated)

public ByteString getSchemasBytes(int index)

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461

The list of derived type schemas for the tool.

repeated string schemas = 7 [deprecated = true];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the schemas at the given index.

getSchemasCount() (deprecated)

public int getSchemasCount()

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461

The list of derived type schemas for the tool.

repeated string schemas = 7 [deprecated = true];

Returns
Type Description
int

The count of schemas.

getSchemasList() (deprecated)

public ProtocolStringList getSchemasList()

Deprecated. google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461

The list of derived type schemas for the tool.

repeated string schemas = 7 [deprecated = true];

Returns
Type Description
ProtocolStringList

A list containing the schemas.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Tool.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Tool.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException