Class Guardrail.Builder (0.1.0)

public static final class Guardrail.Builder extends GeneratedMessage.Builder<Guardrail.Builder> implements GuardrailOrBuilder

Guardrail contains a list of checks and balances to keep the agents safe and secure.

Protobuf type google.cloud.ces.v1.Guardrail

Implements

GuardrailOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Guardrail build()
Returns
Type Description
Guardrail

buildPartial()

public Guardrail buildPartial()
Returns
Type Description
Guardrail

clear()

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

clearAction()

public Guardrail.Builder clearAction()

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearCodeCallback()

public Guardrail.Builder clearCodeCallback()

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearContentFilter()

public Guardrail.Builder clearContentFilter()

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearCreateTime()

public Guardrail.Builder clearCreateTime()

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Guardrail.Builder

clearDescription()

public Guardrail.Builder clearDescription()

Optional. Description of the guardrail.

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

Returns
Type Description
Guardrail.Builder

This builder for chaining.

clearDisplayName()

public Guardrail.Builder clearDisplayName()

Required. Display name of the guardrail.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.Builder

This builder for chaining.

clearEnabled()

public Guardrail.Builder clearEnabled()

Optional. Whether the guardrail is enabled.

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

Returns
Type Description
Guardrail.Builder

This builder for chaining.

clearEtag()

public Guardrail.Builder clearEtag()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 11;

Returns
Type Description
Guardrail.Builder

This builder for chaining.

clearGuardrailType()

public Guardrail.Builder clearGuardrailType()
Returns
Type Description
Guardrail.Builder

clearLlmPolicy()

public Guardrail.Builder clearLlmPolicy()

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearLlmPromptSecurity()

public Guardrail.Builder clearLlmPromptSecurity()

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearModelSafety()

public Guardrail.Builder clearModelSafety()

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.Builder

clearName()

public Guardrail.Builder clearName()

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Guardrail.Builder

This builder for chaining.

clearUpdateTime()

public Guardrail.Builder clearUpdateTime()

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Guardrail.Builder

getAction()

public TriggerAction getAction()

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TriggerAction

The action.

getActionBuilder()

public TriggerAction.Builder getActionBuilder()

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TriggerAction.Builder

getActionOrBuilder()

public TriggerActionOrBuilder getActionOrBuilder()

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TriggerActionOrBuilder

getCodeCallback()

public Guardrail.CodeCallback getCodeCallback()

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.CodeCallback

The codeCallback.

getCodeCallbackBuilder()

public Guardrail.CodeCallback.Builder getCodeCallbackBuilder()

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.CodeCallback.Builder

getCodeCallbackOrBuilder()

public Guardrail.CodeCallbackOrBuilder getCodeCallbackOrBuilder()

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.CodeCallbackOrBuilder

getContentFilter()

public Guardrail.ContentFilter getContentFilter()

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ContentFilter

The contentFilter.

getContentFilterBuilder()

public Guardrail.ContentFilter.Builder getContentFilterBuilder()

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ContentFilter.Builder

getContentFilterOrBuilder()

public Guardrail.ContentFilterOrBuilder getContentFilterOrBuilder()

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ContentFilterOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Guardrail getDefaultInstanceForType()
Returns
Type Description
Guardrail

getDescription()

public String getDescription()

Optional. Description of the guardrail.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the guardrail.

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

getDisplayName()

public String getDisplayName()

Required. Display name of the guardrail.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Display name of the guardrail.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEnabled()

public boolean getEnabled()

Optional. Whether the guardrail is enabled.

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

Returns
Type Description
boolean

The enabled.

getEtag()

public String getEtag()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 11;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 11;

Returns
Type Description
ByteString

The bytes for etag.

getGuardrailTypeCase()

public Guardrail.GuardrailTypeCase getGuardrailTypeCase()
Returns
Type Description
Guardrail.GuardrailTypeCase

getLlmPolicy()

public Guardrail.LlmPolicy getLlmPolicy()

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPolicy

The llmPolicy.

getLlmPolicyBuilder()

public Guardrail.LlmPolicy.Builder getLlmPolicyBuilder()

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPolicy.Builder

getLlmPolicyOrBuilder()

public Guardrail.LlmPolicyOrBuilder getLlmPolicyOrBuilder()

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPolicyOrBuilder

getLlmPromptSecurity()

public Guardrail.LlmPromptSecurity getLlmPromptSecurity()

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPromptSecurity

The llmPromptSecurity.

getLlmPromptSecurityBuilder()

public Guardrail.LlmPromptSecurity.Builder getLlmPromptSecurityBuilder()

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPromptSecurity.Builder

getLlmPromptSecurityOrBuilder()

public Guardrail.LlmPromptSecurityOrBuilder getLlmPromptSecurityOrBuilder()

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPromptSecurityOrBuilder

getModelSafety()

public Guardrail.ModelSafety getModelSafety()

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ModelSafety

The modelSafety.

getModelSafetyBuilder()

public Guardrail.ModelSafety.Builder getModelSafetyBuilder()

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ModelSafety.Builder

getModelSafetyOrBuilder()

public Guardrail.ModelSafetyOrBuilder getModelSafetyOrBuilder()

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.ModelSafetyOrBuilder

getName()

public String getName()

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasAction()

public boolean hasAction()

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the action field is set.

hasCodeCallback()

public boolean hasCodeCallback()

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the codeCallback field is set.

hasContentFilter()

public boolean hasContentFilter()

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the contentFilter field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasLlmPolicy()

public boolean hasLlmPolicy()

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the llmPolicy field is set.

hasLlmPromptSecurity()

public boolean hasLlmPromptSecurity()

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the llmPromptSecurity field is set.

hasModelSafety()

public boolean hasModelSafety()

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the modelSafety field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAction(TriggerAction value)

public Guardrail.Builder mergeAction(TriggerAction value)

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TriggerAction
Returns
Type Description
Guardrail.Builder

mergeCodeCallback(Guardrail.CodeCallback value)

public Guardrail.Builder mergeCodeCallback(Guardrail.CodeCallback value)

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.CodeCallback
Returns
Type Description
Guardrail.Builder

mergeContentFilter(Guardrail.ContentFilter value)

public Guardrail.Builder mergeContentFilter(Guardrail.ContentFilter value)

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.ContentFilter
Returns
Type Description
Guardrail.Builder

mergeCreateTime(Timestamp value)

public Guardrail.Builder mergeCreateTime(Timestamp value)

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Guardrail.Builder

mergeFrom(Guardrail other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLlmPolicy(Guardrail.LlmPolicy value)

public Guardrail.Builder mergeLlmPolicy(Guardrail.LlmPolicy value)

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.LlmPolicy
Returns
Type Description
Guardrail.Builder

mergeLlmPromptSecurity(Guardrail.LlmPromptSecurity value)

public Guardrail.Builder mergeLlmPromptSecurity(Guardrail.LlmPromptSecurity value)

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.LlmPromptSecurity
Returns
Type Description
Guardrail.Builder

mergeModelSafety(Guardrail.ModelSafety value)

public Guardrail.Builder mergeModelSafety(Guardrail.ModelSafety value)

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.ModelSafety
Returns
Type Description
Guardrail.Builder

mergeUpdateTime(Timestamp value)

public Guardrail.Builder mergeUpdateTime(Timestamp value)

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Guardrail.Builder

setAction(TriggerAction value)

public Guardrail.Builder setAction(TriggerAction value)

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TriggerAction
Returns
Type Description
Guardrail.Builder

setAction(TriggerAction.Builder builderForValue)

public Guardrail.Builder setAction(TriggerAction.Builder builderForValue)

Optional. Action to take when the guardrail is triggered.

.google.cloud.ces.v1.TriggerAction action = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue TriggerAction.Builder
Returns
Type Description
Guardrail.Builder

setCodeCallback(Guardrail.CodeCallback value)

public Guardrail.Builder setCodeCallback(Guardrail.CodeCallback value)

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.CodeCallback
Returns
Type Description
Guardrail.Builder

setCodeCallback(Guardrail.CodeCallback.Builder builderForValue)

public Guardrail.Builder setCodeCallback(Guardrail.CodeCallback.Builder builderForValue)

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

.google.cloud.ces.v1.Guardrail.CodeCallback code_callback = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Guardrail.CodeCallback.Builder
Returns
Type Description
Guardrail.Builder

setContentFilter(Guardrail.ContentFilter value)

public Guardrail.Builder setContentFilter(Guardrail.ContentFilter value)

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.ContentFilter
Returns
Type Description
Guardrail.Builder

setContentFilter(Guardrail.ContentFilter.Builder builderForValue)

public Guardrail.Builder setContentFilter(Guardrail.ContentFilter.Builder builderForValue)

Optional. Guardrail that bans certain content from being used in the conversation.

.google.cloud.ces.v1.Guardrail.ContentFilter content_filter = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Guardrail.ContentFilter.Builder
Returns
Type Description
Guardrail.Builder

setCreateTime(Timestamp value)

public Guardrail.Builder setCreateTime(Timestamp value)

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Guardrail.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Guardrail.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when the guardrail was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Guardrail.Builder

setDescription(String value)

public Guardrail.Builder setDescription(String value)

Optional. Description of the guardrail.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Guardrail.Builder setDescriptionBytes(ByteString value)

Optional. Description of the guardrail.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setDisplayName(String value)

public Guardrail.Builder setDisplayName(String value)

Required. Display name of the guardrail.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Guardrail.Builder setDisplayNameBytes(ByteString value)

Required. Display name of the guardrail.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setEnabled(boolean value)

public Guardrail.Builder setEnabled(boolean value)

Optional. Whether the guardrail is enabled.

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

Parameter
Name Description
value boolean

The enabled to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setEtag(String value)

public Guardrail.Builder setEtag(String value)

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 11;

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Guardrail.Builder setEtagBytes(ByteString value)

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 11;

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setLlmPolicy(Guardrail.LlmPolicy value)

public Guardrail.Builder setLlmPolicy(Guardrail.LlmPolicy value)

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.LlmPolicy
Returns
Type Description
Guardrail.Builder

setLlmPolicy(Guardrail.LlmPolicy.Builder builderForValue)

public Guardrail.Builder setLlmPolicy(Guardrail.LlmPolicy.Builder builderForValue)

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPolicy llm_policy = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Guardrail.LlmPolicy.Builder
Returns
Type Description
Guardrail.Builder

setLlmPromptSecurity(Guardrail.LlmPromptSecurity value)

public Guardrail.Builder setLlmPromptSecurity(Guardrail.LlmPromptSecurity value)

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.LlmPromptSecurity
Returns
Type Description
Guardrail.Builder

setLlmPromptSecurity(Guardrail.LlmPromptSecurity.Builder builderForValue)

public Guardrail.Builder setLlmPromptSecurity(Guardrail.LlmPromptSecurity.Builder builderForValue)

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity llm_prompt_security = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Guardrail.LlmPromptSecurity.Builder
Returns
Type Description
Guardrail.Builder

setModelSafety(Guardrail.ModelSafety value)

public Guardrail.Builder setModelSafety(Guardrail.ModelSafety value)

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Guardrail.ModelSafety
Returns
Type Description
Guardrail.Builder

setModelSafety(Guardrail.ModelSafety.Builder builderForValue)

public Guardrail.Builder setModelSafety(Guardrail.ModelSafety.Builder builderForValue)

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

.google.cloud.ces.v1.Guardrail.ModelSafety model_safety = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Guardrail.ModelSafety.Builder
Returns
Type Description
Guardrail.Builder

setName(String value)

public Guardrail.Builder setName(String value)

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Guardrail.Builder setNameBytes(ByteString value)

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Guardrail.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public Guardrail.Builder setUpdateTime(Timestamp value)

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Guardrail.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Guardrail.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when the guardrail was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Guardrail.Builder