Class Tool (0.52.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
TypeDescription
int

DATA_STORE_SPEC_FIELD_NUMBER

public static final int DATA_STORE_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

EXTENSION_SPEC_FIELD_NUMBER

public static final int EXTENSION_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

FUNCTION_SPEC_FIELD_NUMBER

public static final int FUNCTION_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OPEN_API_SPEC_FIELD_NUMBER

public static final int OPEN_API_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

SCHEMAS_FIELD_NUMBER

public static final int SCHEMAS_FIELD_NUMBER
Field Value
TypeDescription
int

TOOL_TYPE_FIELD_NUMBER

public static final int TOOL_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Tool getDefaultInstance()
Returns
TypeDescription
Tool

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Tool.Builder newBuilder()
Returns
TypeDescription
Tool.Builder

newBuilder(Tool prototype)

public static Tool.Builder newBuilder(Tool prototype)
Parameter
NameDescription
prototypeTool
Returns
TypeDescription
Tool.Builder

parseDelimitedFrom(InputStream input)

public static Tool parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Tool parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Tool parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Tool parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Tool parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Tool parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Tool parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tool
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Tool> parser()
Returns
TypeDescription
Parser<Tool>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Tool.DataStoreToolOrBuilder

getDefaultInstanceForType()

public Tool getDefaultInstanceForType()
Returns
TypeDescription
Tool

getDescription()

public String getDescription()

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

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Tool.ExtensionTool

The extensionSpec.

getExtensionSpecOrBuilder()

public Tool.ExtensionToolOrBuilder getExtensionSpecOrBuilder()

Vertex extension tool specification.

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

Returns
TypeDescription
Tool.ExtensionToolOrBuilder

getFunctionSpec()

public Tool.FunctionTool getFunctionSpec()

Client side executed function specification.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Tool.OpenApiToolOrBuilder

getParserForType()

public Parser<Tool> getParserForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the schemas.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSpecificationCase()

public Tool.SpecificationCase getSpecificationCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the openApiSpec field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Tool.Builder newBuilderForType()
Returns
TypeDescription
Tool.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Tool.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Tool.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Tool.Builder toBuilder()
Returns
TypeDescription
Tool.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException