Class ToolUse.Builder (0.48.0)

public static final class ToolUse.Builder extends GeneratedMessageV3.Builder<ToolUse.Builder> implements ToolUseOrBuilder

Stores metadata of the invocation of an action supported by a tool.

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

Implements

ToolUseOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllInputParameters(Iterable<? extends ActionParameter> values)

public ToolUse.Builder addAllInputParameters(Iterable<? extends ActionParameter> values)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.ActionParameter>
Returns
Type Description
ToolUse.Builder

addAllOutputParameters(Iterable<? extends ActionParameter> values)

public ToolUse.Builder addAllOutputParameters(Iterable<? extends ActionParameter> values)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.ActionParameter>
Returns
Type Description
ToolUse.Builder

addInputParameters(ActionParameter value)

public ToolUse.Builder addInputParameters(ActionParameter value)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
value ActionParameter
Returns
Type Description
ToolUse.Builder

addInputParameters(ActionParameter.Builder builderForValue)

public ToolUse.Builder addInputParameters(ActionParameter.Builder builderForValue)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

addInputParameters(int index, ActionParameter value)

public ToolUse.Builder addInputParameters(int index, ActionParameter value)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameters
Name Description
index int
value ActionParameter
Returns
Type Description
ToolUse.Builder

addInputParameters(int index, ActionParameter.Builder builderForValue)

public ToolUse.Builder addInputParameters(int index, ActionParameter.Builder builderForValue)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameters
Name Description
index int
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

addInputParametersBuilder()

public ActionParameter.Builder addInputParametersBuilder()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
ActionParameter.Builder

addInputParametersBuilder(int index)

public ActionParameter.Builder addInputParametersBuilder(int index)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter.Builder

addOutputParameters(ActionParameter value)

public ToolUse.Builder addOutputParameters(ActionParameter value)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
value ActionParameter
Returns
Type Description
ToolUse.Builder

addOutputParameters(ActionParameter.Builder builderForValue)

public ToolUse.Builder addOutputParameters(ActionParameter.Builder builderForValue)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

addOutputParameters(int index, ActionParameter value)

public ToolUse.Builder addOutputParameters(int index, ActionParameter value)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameters
Name Description
index int
value ActionParameter
Returns
Type Description
ToolUse.Builder

addOutputParameters(int index, ActionParameter.Builder builderForValue)

public ToolUse.Builder addOutputParameters(int index, ActionParameter.Builder builderForValue)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameters
Name Description
index int
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

addOutputParametersBuilder()

public ActionParameter.Builder addOutputParametersBuilder()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
ActionParameter.Builder

addOutputParametersBuilder(int index)

public ActionParameter.Builder addOutputParametersBuilder(int index)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ToolUse build()
Returns
Type Description
ToolUse

buildPartial()

public ToolUse buildPartial()
Returns
Type Description
ToolUse

clear()

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

clearAction()

public ToolUse.Builder clearAction()

Optional. Name of the action to be called during the tool use.

string action = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolUse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInputParameters()

public ToolUse.Builder clearInputParameters()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
ToolUse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOutputParameters()

public ToolUse.Builder clearOutputParameters()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
ToolUse.Builder

clearTool()

public ToolUse.Builder clearTool()

Required. The tool that should be used. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ToolUse.Builder

This builder for chaining.

clone()

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

getAction()

public String getAction()

Optional. Name of the action to be called during the tool use.

string action = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The action.

getActionBytes()

public ByteString getActionBytes()

Optional. Name of the action to be called during the tool use.

string action = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for action.

getDefaultInstanceForType()

public ToolUse getDefaultInstanceForType()
Returns
Type Description
ToolUse

getDescriptorForType()

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

getInputParameters(int index)

public ActionParameter getInputParameters(int index)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter

getInputParametersBuilder(int index)

public ActionParameter.Builder getInputParametersBuilder(int index)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter.Builder

getInputParametersBuilderList()

public List<ActionParameter.Builder> getInputParametersBuilderList()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
List<Builder>

getInputParametersCount()

public int getInputParametersCount()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
int

getInputParametersList()

public List<ActionParameter> getInputParametersList()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
List<ActionParameter>

getInputParametersOrBuilder(int index)

public ActionParameterOrBuilder getInputParametersOrBuilder(int index)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
index int
Returns
Type Description
ActionParameterOrBuilder

getInputParametersOrBuilderList()

public List<? extends ActionParameterOrBuilder> getInputParametersOrBuilderList()

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>

getOutputParameters(int index)

public ActionParameter getOutputParameters(int index)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter

getOutputParametersBuilder(int index)

public ActionParameter.Builder getOutputParametersBuilder(int index)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
ActionParameter.Builder

getOutputParametersBuilderList()

public List<ActionParameter.Builder> getOutputParametersBuilderList()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
List<Builder>

getOutputParametersCount()

public int getOutputParametersCount()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
int

getOutputParametersList()

public List<ActionParameter> getOutputParametersList()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
List<ActionParameter>

getOutputParametersOrBuilder(int index)

public ActionParameterOrBuilder getOutputParametersOrBuilder(int index)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
ActionParameterOrBuilder

getOutputParametersOrBuilderList()

public List<? extends ActionParameterOrBuilder> getOutputParametersOrBuilderList()

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>

getTool()

public String getTool()

Required. The tool that should be used. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The tool.

getToolBytes()

public ByteString getToolBytes()

Required. The tool that should be used. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for tool.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ToolUse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeInputParameters(int index)

public ToolUse.Builder removeInputParameters(int index)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameter
Name Description
index int
Returns
Type Description
ToolUse.Builder

removeOutputParameters(int index)

public ToolUse.Builder removeOutputParameters(int index)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
ToolUse.Builder

setAction(String value)

public ToolUse.Builder setAction(String value)

Optional. Name of the action to be called during the tool use.

string action = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The action to set.

Returns
Type Description
ToolUse.Builder

This builder for chaining.

setActionBytes(ByteString value)

public ToolUse.Builder setActionBytes(ByteString value)

Optional. Name of the action to be called during the tool use.

string action = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for action to set.

Returns
Type Description
ToolUse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInputParameters(int index, ActionParameter value)

public ToolUse.Builder setInputParameters(int index, ActionParameter value)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameters
Name Description
index int
value ActionParameter
Returns
Type Description
ToolUse.Builder

setInputParameters(int index, ActionParameter.Builder builderForValue)

public ToolUse.Builder setInputParameters(int index, ActionParameter.Builder builderForValue)

A list of input parameters for the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3;

Parameters
Name Description
index int
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

setOutputParameters(int index, ActionParameter value)

public ToolUse.Builder setOutputParameters(int index, ActionParameter value)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameters
Name Description
index int
value ActionParameter
Returns
Type Description
ToolUse.Builder

setOutputParameters(int index, ActionParameter.Builder builderForValue)

public ToolUse.Builder setOutputParameters(int index, ActionParameter.Builder builderForValue)

A list of output parameters generated by the action.

repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4;

Parameters
Name Description
index int
builderForValue ActionParameter.Builder
Returns
Type Description
ToolUse.Builder

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

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

setTool(String value)

public ToolUse.Builder setTool(String value)

Required. The tool that should be used. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The tool to set.

Returns
Type Description
ToolUse.Builder

This builder for chaining.

setToolBytes(ByteString value)

public ToolUse.Builder setToolBytes(ByteString value)

Required. The tool that should be used. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>.

string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for tool to set.

Returns
Type Description
ToolUse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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