Interface Guardrail.LlmPromptSecurityOrBuilder (0.1.0)

public static interface Guardrail.LlmPromptSecurityOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCustomPolicy()

public abstract Guardrail.LlmPolicy getCustomPolicy()

Optional. Use a user-defined LlmPolicy to configure the security guardrail.

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

Returns
Type Description
Guardrail.LlmPolicy

The customPolicy.

getCustomPolicyOrBuilder()

public abstract Guardrail.LlmPolicyOrBuilder getCustomPolicyOrBuilder()

Optional. Use a user-defined LlmPolicy to configure the security guardrail.

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

Returns
Type Description
Guardrail.LlmPolicyOrBuilder

getDefaultSettings()

public abstract Guardrail.LlmPromptSecurity.DefaultSecuritySettings getDefaultSettings()

Optional. Use the system's predefined default security settings. To select this mode, include an empty 'default_settings' message in the request. The 'default_prompt_template' field within will be populated by the server in the response.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPromptSecurity.DefaultSecuritySettings

The defaultSettings.

getDefaultSettingsOrBuilder()

public abstract Guardrail.LlmPromptSecurity.DefaultSecuritySettingsOrBuilder getDefaultSettingsOrBuilder()

Optional. Use the system's predefined default security settings. To select this mode, include an empty 'default_settings' message in the request. The 'default_prompt_template' field within will be populated by the server in the response.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Guardrail.LlmPromptSecurity.DefaultSecuritySettingsOrBuilder

getFailOpen()

public abstract boolean getFailOpen()

Optional. Determines the behavior when the guardrail encounters an LLM error.

  • If true: the guardrail is bypassed.
  • If false (default): the guardrail triggers/blocks.

    Note: If a custom policy is provided, this field is ignored in favor of the policy's 'fail_open' configuration.

bool fail_open = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The failOpen.

getSecurityConfigCase()

public abstract Guardrail.LlmPromptSecurity.SecurityConfigCase getSecurityConfigCase()
Returns
Type Description
Guardrail.LlmPromptSecurity.SecurityConfigCase

hasCustomPolicy()

public abstract boolean hasCustomPolicy()

Optional. Use a user-defined LlmPolicy to configure the security guardrail.

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

Returns
Type Description
boolean

Whether the customPolicy field is set.

hasDefaultSettings()

public abstract boolean hasDefaultSettings()

Optional. Use the system's predefined default security settings. To select this mode, include an empty 'default_settings' message in the request. The 'default_prompt_template' field within will be populated by the server in the response.

.google.cloud.ces.v1.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the defaultSettings field is set.