Class Callback.Builder (0.1.0)

public static final class Callback.Builder extends GeneratedMessage.Builder<Callback.Builder> implements CallbackOrBuilder

A callback defines the custom logic to be executed at various stages of agent interaction.

Protobuf type google.cloud.ces.v1.Callback

Implements

CallbackOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Callback build()
Returns
Type Description
Callback

buildPartial()

public Callback buildPartial()
Returns
Type Description
Callback

clear()

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

clearCallback()

public Callback.Builder clearCallback()
Returns
Type Description
Callback.Builder

clearDescription()

public Callback.Builder clearDescription()

Optional. Human-readable description of the callback.

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

Returns
Type Description
Callback.Builder

This builder for chaining.

clearDisabled()

public Callback.Builder clearDisabled()

Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback.Builder

This builder for chaining.

clearProactiveExecutionEnabled()

public Callback.Builder clearProactiveExecutionEnabled()

Optional. If enabled, the callback will also be executed on intermediate model outputs. This setting only affects after model callback. ENABLE WITH CAUTION. Typically after model callback only needs to be executed after receiving all model responses. Enabling proactive execution may have negative implication on the execution cost and latency, and should only be enabled in rare situations.

bool proactive_execution_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback.Builder

This builder for chaining.

clearPythonCode()

public Callback.Builder clearPythonCode()

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Callback.Builder

This builder for chaining.

getCallbackCase()

public Callback.CallbackCase getCallbackCase()
Returns
Type Description
Callback.CallbackCase

getDefaultInstanceForType()

public Callback getDefaultInstanceForType()
Returns
Type Description
Callback

getDescription()

public String getDescription()

Optional. Human-readable description of the callback.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Human-readable description of the callback.

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

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisabled()

public boolean getDisabled()

Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disabled.

getProactiveExecutionEnabled()

public boolean getProactiveExecutionEnabled()

Optional. If enabled, the callback will also be executed on intermediate model outputs. This setting only affects after model callback. ENABLE WITH CAUTION. Typically after model callback only needs to be executed after receiving all model responses. Enabling proactive execution may have negative implication on the execution cost and latency, and should only be enabled in rare situations.

bool proactive_execution_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The proactiveExecutionEnabled.

getPythonCode()

public String getPythonCode()

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The pythonCode.

getPythonCodeBytes()

public ByteString getPythonCodeBytes()

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for pythonCode.

hasPythonCode()

public boolean hasPythonCode()

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the pythonCode field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Callback other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDescription(String value)

public Callback.Builder setDescription(String value)

Optional. Human-readable description of the callback.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Callback.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Callback.Builder setDescriptionBytes(ByteString value)

Optional. Human-readable description of the callback.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Callback.Builder

This builder for chaining.

setDisabled(boolean value)

public Callback.Builder setDisabled(boolean value)

Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent.

bool disabled = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
Callback.Builder

This builder for chaining.

setProactiveExecutionEnabled(boolean value)

public Callback.Builder setProactiveExecutionEnabled(boolean value)

Optional. If enabled, the callback will also be executed on intermediate model outputs. This setting only affects after model callback. ENABLE WITH CAUTION. Typically after model callback only needs to be executed after receiving all model responses. Enabling proactive execution may have negative implication on the execution cost and latency, and should only be enabled in rare situations.

bool proactive_execution_enabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The proactiveExecutionEnabled to set.

Returns
Type Description
Callback.Builder

This builder for chaining.

setPythonCode(String value)

public Callback.Builder setPythonCode(String value)

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The pythonCode to set.

Returns
Type Description
Callback.Builder

This builder for chaining.

setPythonCodeBytes(ByteString value)

public Callback.Builder setPythonCodeBytes(ByteString value)

Required. The python code to execute for the callback.

string python_code = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for pythonCode to set.

Returns
Type Description
Callback.Builder

This builder for chaining.