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
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
public static final int EXPECTED_ARGS_PATTERN_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int MOCK_RESPONSE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int TOOLSET_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int TOOL_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int TOOL_ID_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
public static MockedToolCall getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static MockedToolCall.Builder newBuilder()
public static MockedToolCall.Builder newBuilder(MockedToolCall prototype)
public static MockedToolCall parseDelimitedFrom(InputStream input)
public static MockedToolCall parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static MockedToolCall parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
public static MockedToolCall parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static MockedToolCall parseFrom(ByteString data)
public static MockedToolCall parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static MockedToolCall parseFrom(CodedInputStream input)
public static MockedToolCall parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static MockedToolCall parseFrom(InputStream input)
public static MockedToolCall parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static MockedToolCall parseFrom(ByteBuffer data)
public static MockedToolCall parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<MockedToolCall> parser()
Methods
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
public MockedToolCall getDefaultInstanceForType()
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.
|
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];
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.
|
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];
public Parser<MockedToolCall> getParserForType()
Overrides
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
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.
|
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.
|
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.
|
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.
|
public MockedToolCall.ToolIdentifierCase getToolIdentifierCase()
public ToolsetTool getToolset()
Optional. The toolset to mock.
.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];
public ToolsetToolOrBuilder getToolsetOrBuilder()
Optional. The toolset to mock.
.google.cloud.ces.v1beta.ToolsetTool toolset = 5 [(.google.api.field_behavior) = OPTIONAL];
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.
|
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.
|
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.
|
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.
|
| Returns |
| Type |
Description |
int |
|
Overrides
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public MockedToolCall.Builder newBuilderForType()
protected MockedToolCall.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
public MockedToolCall.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides