0.10.0 (latest) 0.9.0 0.8.4 0.7.0 0.6.0 0.5.3 0.4.0 0.3.1 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class RaiFilter.

Responsible AI filter.

Generated from protobuf message `google.cloud.modelarmor.v1beta.RaiFilterSettings.RaiFilter`

## Namespace

Google \\ Cloud \\ ModelArmor \\ V1beta \\ RaiFilterSettings

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ filter_type` | `int` Required. Type of responsible AI filter. |
| `↳ confidence_level` | `int` Optional. Confidence level for this RAI filter. During data sanitization, if data is classified under this filter with a confidence level equal to or greater than the specified level, a positive match is reported. If the confidence level is unspecified (i.e., 0), the system will use a reasonable default level based on the `filter_type`. |

### getFilterType

Required. Type of responsible AI filter.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RaiFilterType](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.RaiFilterType). |

### setFilterType

Required. Type of responsible AI filter.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RaiFilterType](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.RaiFilterType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConfidenceLevel

Optional. Confidence level for this RAI filter.

During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DetectionConfidenceLevel](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.DetectionConfidenceLevel). |

### setConfidenceLevel

Optional. Confidence level for this RAI filter.

During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [DetectionConfidenceLevel](https://docs.cloud.google.com/php/docs/reference/cloud-modelarmor/latest/V1beta.DetectionConfidenceLevel). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |