0.6.0 (latest) 0.5.0 0.4.4 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class ContentFilter.

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

Generated from protobuf message `google.cloud.ces.v1.Guardrail.ContentFilter`

## Namespace

Google \\ Cloud \\ Ces \\ V1 \\ Guardrail

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ banned_contents` | `string[]` Optional. List of banned phrases. Applies to both user inputs and agent responses. |
| `↳ banned_contents_in_user_input` | `string[]` Optional. List of banned phrases. Applies only to user inputs. |
| `↳ banned_contents_in_agent_response` | `string[]` Optional. List of banned phrases. Applies only to agent responses. |
| `↳ match_type` | `int` Required. Match type for the content filter. |
| `↳ disregard_diacritics` | `bool` Optional. If true, diacritics are ignored during matching. |

### getBannedContents

Optional. List of banned phrases. Applies to both user inputs and agent
responses.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setBannedContents

Optional. List of banned phrases. Applies to both user inputs and agent
responses.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

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

### getBannedContentsInUserInput

Optional. List of banned phrases. Applies only to user inputs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setBannedContentsInUserInput

Optional. List of banned phrases. Applies only to user inputs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

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

### getBannedContentsInAgentResponse

Optional. List of banned phrases. Applies only to agent responses.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setBannedContentsInAgentResponse

Optional. List of banned phrases. Applies only to agent responses.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

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

### getMatchType

Required. Match type for the content filter.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [MatchType](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Guardrail.ContentFilter.MatchType.md.txt). |

### setMatchType

Required. Match type for the content filter.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [MatchType](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Guardrail.ContentFilter.MatchType.md.txt). |

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

### getDisregardDiacritics

Optional. If true, diacritics are ignored during matching.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDisregardDiacritics

Optional. If true, diacritics are ignored during matching.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

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