# Interface Guardrail.ModelSafety.SafetySettingOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public static interface Guardrail.ModelSafety.SafetySettingOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getCategory()

    public abstract Guardrail.ModelSafety.HarmCategory getCategory()

Required. The harm category.

`
.google.cloud.ces.v1beta.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
`

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

### getCategoryValue()

    public abstract int getCategoryValue()

Required. The harm category.

`
.google.cloud.ces.v1beta.Guardrail.ModelSafety.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for category. |

### getThreshold()

    public abstract Guardrail.ModelSafety.HarmBlockThreshold getThreshold()

Required. The harm block threshold.

`
.google.cloud.ces.v1beta.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
`

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

### getThresholdValue()

    public abstract int getThresholdValue()

Required. The harm block threshold.

`
.google.cloud.ces.v1beta.Guardrail.ModelSafety.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for threshold. |