Class MockedToolCall (0.9.0)

public final class MockedToolCall extends GeneratedMessage 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 Fields

EXPECTED_ARGS_PATTERN_FIELD_NUMBER

public static final int EXPECTED_ARGS_PATTERN_FIELD_NUMBER
Field Value
Type Description
int

MOCK_RESPONSE_FIELD_NUMBER

public static final int MOCK_RESPONSE_FIELD_NUMBER
Field Value
Type Description
int

TOOLSET_FIELD_NUMBER

public static final int TOOLSET_FIELD_NUMBER
Field Value
Type Description
int

TOOL_FIELD_NUMBER

public static final int TOOL_FIELD_NUMBER
Field Value
Type Description
int

TOOL_ID_FIELD_NUMBER

public static final int TOOL_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static MockedToolCall getDefaultInstance()
Returns
Type Description
MockedToolCall

getDescriptor()

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

newBuilder()

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

newBuilder(MockedToolCall prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public MockedToolCall getDefaultInstanceForType()
Returns
Type Description
MockedToolCall

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.

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.

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected MockedToolCall.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
MockedToolCall.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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