Class MockedToolCall.Builder (0.9.0)

public static final class MockedToolCall.Builder extends GeneratedMessage.Builder<MockedToolCall.Builder> implements MockedToolCallOrBuilder

A mocked tool call.

Expresses the target tool + a pattern to match against that tool's args / inputs. If the pattern matches, then the mock response will be returned.

Protobuf type google.cloud.ces.v1beta.MockedToolCall

Static Methods

getDescriptor()

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

Methods

build()

public MockedToolCall build()
Returns
Type Description
MockedToolCall

buildPartial()

public MockedToolCall buildPartial()
Returns
Type Description
MockedToolCall

clear()

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

clearExpectedArgsPattern()

public MockedToolCall.Builder clearExpectedArgsPattern()

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
MockedToolCall.Builder

clearMockResponse()

public MockedToolCall.Builder clearMockResponse()

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MockedToolCall.Builder

clearTool() (deprecated)

public MockedToolCall.Builder clearTool()

Deprecated. google.cloud.ces.v1beta.MockedToolCall.tool is deprecated. See google/cloud/ces/v1beta/mocks.proto;l=48

Optional. Deprecated. Use tool_identifier instead.

string tool = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

clearToolId()

public MockedToolCall.Builder clearToolId()

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

clearToolIdentifier()

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

clearToolset()

public MockedToolCall.Builder clearToolset()

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MockedToolCall.Builder

getDefaultInstanceForType()

public MockedToolCall getDefaultInstanceForType()
Returns
Type Description
MockedToolCall

getDescriptorForType()

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

getExpectedArgsPattern()

public Struct getExpectedArgsPattern()

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Struct

The expectedArgsPattern.

getExpectedArgsPatternBuilder()

public Struct.Builder getExpectedArgsPatternBuilder()

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getExpectedArgsPatternOrBuilder()

public StructOrBuilder getExpectedArgsPatternOrBuilder()

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StructOrBuilder

getMockResponse()

public Struct getMockResponse()

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Struct

The mockResponse.

getMockResponseBuilder()

public Struct.Builder getMockResponseBuilder()

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getMockResponseOrBuilder()

public StructOrBuilder getMockResponseOrBuilder()

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StructOrBuilder

getTool() (deprecated)

public String getTool()

Deprecated. google.cloud.ces.v1beta.MockedToolCall.tool is deprecated. See google/cloud/ces/v1beta/mocks.proto;l=48

Optional. Deprecated. Use tool_identifier instead.

string tool = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The tool.

getToolBytes() (deprecated)

public ByteString getToolBytes()

Deprecated. google.cloud.ces.v1beta.MockedToolCall.tool is deprecated. See google/cloud/ces/v1beta/mocks.proto;l=48

Optional. Deprecated. Use tool_identifier instead.

string tool = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for tool.

getToolId()

public String getToolId()

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The toolId.

getToolIdBytes()

public ByteString getToolIdBytes()

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for toolId.

getToolIdentifierCase()

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

getToolset()

public ToolsetTool getToolset()

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetTool

The toolset.

getToolsetBuilder()

public ToolsetTool.Builder getToolsetBuilder()

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetTool.Builder

getToolsetOrBuilder()

public ToolsetToolOrBuilder getToolsetOrBuilder()

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolsetToolOrBuilder

hasExpectedArgsPattern()

public boolean hasExpectedArgsPattern()

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the expectedArgsPattern field is set.

hasMockResponse()

public boolean hasMockResponse()

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the mockResponse field is set.

hasToolId()

public boolean hasToolId()

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the toolId field is set.

hasToolset()

public boolean hasToolset()

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the toolset field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeExpectedArgsPattern(Struct value)

public MockedToolCall.Builder mergeExpectedArgsPattern(Struct value)

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
MockedToolCall.Builder

mergeFrom(MockedToolCall other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMockResponse(Struct value)

public MockedToolCall.Builder mergeMockResponse(Struct value)

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Struct
Returns
Type Description
MockedToolCall.Builder

mergeToolset(ToolsetTool value)

public MockedToolCall.Builder mergeToolset(ToolsetTool value)

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ToolsetTool
Returns
Type Description
MockedToolCall.Builder

setExpectedArgsPattern(Struct value)

public MockedToolCall.Builder setExpectedArgsPattern(Struct value)

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
MockedToolCall.Builder

setExpectedArgsPattern(Struct.Builder builderForValue)

public MockedToolCall.Builder setExpectedArgsPattern(Struct.Builder builderForValue)

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned.

.google.protobuf.Struct expected_args_pattern = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MockedToolCall.Builder

setMockResponse(Struct value)

public MockedToolCall.Builder setMockResponse(Struct value)

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Struct
Returns
Type Description
MockedToolCall.Builder

setMockResponse(Struct.Builder builderForValue)

public MockedToolCall.Builder setMockResponse(Struct.Builder builderForValue)

Optional. The mock response / output to return if the tool call args / inputs match the pattern.

.google.protobuf.Struct mock_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MockedToolCall.Builder

setTool(String value) (deprecated)

public MockedToolCall.Builder setTool(String value)

Deprecated. google.cloud.ces.v1beta.MockedToolCall.tool is deprecated. See google/cloud/ces/v1beta/mocks.proto;l=48

Optional. Deprecated. Use tool_identifier instead.

string tool = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The tool to set.

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

setToolBytes(ByteString value) (deprecated)

public MockedToolCall.Builder setToolBytes(ByteString value)

Deprecated. google.cloud.ces.v1beta.MockedToolCall.tool is deprecated. See google/cloud/ces/v1beta/mocks.proto;l=48

Optional. Deprecated. Use tool_identifier instead.

string tool = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for tool to set.

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

setToolId(String value)

public MockedToolCall.Builder setToolId(String value)

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The toolId to set.

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

setToolIdBytes(ByteString value)

public MockedToolCall.Builder setToolIdBytes(ByteString value)

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

string tool_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for toolId to set.

Returns
Type Description
MockedToolCall.Builder

This builder for chaining.

setToolset(ToolsetTool value)

public MockedToolCall.Builder setToolset(ToolsetTool value)

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ToolsetTool
Returns
Type Description
MockedToolCall.Builder

setToolset(ToolsetTool.Builder builderForValue)

public MockedToolCall.Builder setToolset(ToolsetTool.Builder builderForValue)

Optional. The toolset to mock.

.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];

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