Class Guardrail.CodeCallback (0.1.0)

public static final class Guardrail.CodeCallback extends GeneratedMessage implements Guardrail.CodeCallbackOrBuilder

Guardrail that blocks the conversation based on the code callbacks provided.

Protobuf type google.cloud.ces.v1.Guardrail.CodeCallback

Static Fields

AFTER_AGENT_CALLBACK_FIELD_NUMBER

public static final int AFTER_AGENT_CALLBACK_FIELD_NUMBER
Field Value
Type Description
int

AFTER_MODEL_CALLBACK_FIELD_NUMBER

public static final int AFTER_MODEL_CALLBACK_FIELD_NUMBER
Field Value
Type Description
int

BEFORE_AGENT_CALLBACK_FIELD_NUMBER

public static final int BEFORE_AGENT_CALLBACK_FIELD_NUMBER
Field Value
Type Description
int

BEFORE_MODEL_CALLBACK_FIELD_NUMBER

public static final int BEFORE_MODEL_CALLBACK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Guardrail.CodeCallback getDefaultInstance()
Returns
Type Description
Guardrail.CodeCallback

getDescriptor()

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

newBuilder()

public static Guardrail.CodeCallback.Builder newBuilder()
Returns
Type Description
Guardrail.CodeCallback.Builder

newBuilder(Guardrail.CodeCallback prototype)

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

parseDelimitedFrom(InputStream input)

public static Guardrail.CodeCallback parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Guardrail.CodeCallback
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static Guardrail.CodeCallback parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Guardrail.CodeCallback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static Guardrail.CodeCallback parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Guardrail.CodeCallback
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static Guardrail.CodeCallback parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Guardrail.CodeCallback
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static Guardrail.CodeCallback parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Guardrail.CodeCallback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Guardrail.CodeCallback> parser()
Returns
Type Description
Parser<CodeCallback>

Methods

equals(Object obj)

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

getAfterAgentCallback()

public Callback getAfterAgentCallback()

Optional. The callback to execute after the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_agent_callback = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback

The afterAgentCallback.

getAfterAgentCallbackOrBuilder()

public CallbackOrBuilder getAfterAgentCallbackOrBuilder()

Optional. The callback to execute after the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_agent_callback = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CallbackOrBuilder

getAfterModelCallback()

public Callback getAfterModelCallback()

Optional. The callback to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_model_callback = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback

The afterModelCallback.

getAfterModelCallbackOrBuilder()

public CallbackOrBuilder getAfterModelCallbackOrBuilder()

Optional. The callback to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_model_callback = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CallbackOrBuilder

getBeforeAgentCallback()

public Callback getBeforeAgentCallback()

Optional. The callback to execute before the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_agent_callback = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback

The beforeAgentCallback.

getBeforeAgentCallbackOrBuilder()

public CallbackOrBuilder getBeforeAgentCallbackOrBuilder()

Optional. The callback to execute before the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_agent_callback = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CallbackOrBuilder

getBeforeModelCallback()

public Callback getBeforeModelCallback()

Optional. The callback to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_model_callback = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Callback

The beforeModelCallback.

getBeforeModelCallbackOrBuilder()

public CallbackOrBuilder getBeforeModelCallbackOrBuilder()

Optional. The callback to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_model_callback = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CallbackOrBuilder

getDefaultInstanceForType()

public Guardrail.CodeCallback getDefaultInstanceForType()
Returns
Type Description
Guardrail.CodeCallback

getParserForType()

public Parser<Guardrail.CodeCallback> getParserForType()
Returns
Type Description
Parser<CodeCallback>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasAfterAgentCallback()

public boolean hasAfterAgentCallback()

Optional. The callback to execute after the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_agent_callback = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the afterAgentCallback field is set.

hasAfterModelCallback()

public boolean hasAfterModelCallback()

Optional. The callback to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback after_model_callback = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the afterModelCallback field is set.

hasBeforeAgentCallback()

public boolean hasBeforeAgentCallback()

Optional. The callback to execute before the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_agent_callback = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the beforeAgentCallback field is set.

hasBeforeModelCallback()

public boolean hasBeforeModelCallback()

Optional. The callback to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:

  • 'decision': Either 'OK' or 'TRIGGER'.
  • 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.

.google.cloud.ces.v1.Callback before_model_callback = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the beforeModelCallback 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 Guardrail.CodeCallback.Builder newBuilderForType()
Returns
Type Description
Guardrail.CodeCallback.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

public Guardrail.CodeCallback.Builder toBuilder()
Returns
Type Description
Guardrail.CodeCallback.Builder

writeTo(CodedOutputStream output)

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