# Interface Guardrail.LlmPromptSecurityOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public static interface Guardrail.LlmPromptSecurityOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCustomPolicy()

    public abstract Guardrail.LlmPolicy getCustomPolicy()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1beta.Guardrail.LlmPolicy` | The customPolicy. |

### getCustomPolicyOrBuilder()

    public abstract Guardrail.LlmPolicyOrBuilder getCustomPolicyOrBuilder()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1beta.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.v1beta.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1beta.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.v1beta.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1beta.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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The failOpen. |

### getSecurityConfigCase()

    public abstract Guardrail.LlmPromptSecurity.SecurityConfigCase getSecurityConfigCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1beta.Guardrail.LlmPromptSecurity.SecurityConfigCase` |   |

### hasCustomPolicy()

    public abstract boolean hasCustomPolicy()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | 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.v1beta.Guardrail.LlmPromptSecurity.DefaultSecuritySettings default_settings = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the defaultSettings field is set. |