# Interface Guardrail.ContentFilterOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public static interface Guardrail.ContentFilterOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getBannedContents(int index)

    public abstract String getBannedContents(int index)

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

`repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The bannedContents at the given index. |

### getBannedContentsBytes(int index)

    public abstract ByteString getBannedContentsBytes(int index)

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

`repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the bannedContents at the given index. |

### getBannedContentsCount()

    public abstract int getBannedContentsCount()

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

`repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of bannedContents. |

### getBannedContentsInAgentResponse(int index)

    public abstract String getBannedContentsInAgentResponse(int index)

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

`
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The bannedContentsInAgentResponse at the given index. |

### getBannedContentsInAgentResponseBytes(int index)

    public abstract ByteString getBannedContentsInAgentResponseBytes(int index)

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

`
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the bannedContentsInAgentResponse at the given index. |

### getBannedContentsInAgentResponseCount()

    public abstract int getBannedContentsInAgentResponseCount()

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

`
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of bannedContentsInAgentResponse. |

### getBannedContentsInAgentResponseList()

    public abstract List<String> getBannedContentsInAgentResponseList()

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

`
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the bannedContentsInAgentResponse. |

### getBannedContentsInUserInput(int index)

    public abstract String getBannedContentsInUserInput(int index)

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

`
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The bannedContentsInUserInput at the given index. |

### getBannedContentsInUserInputBytes(int index)

    public abstract ByteString getBannedContentsInUserInputBytes(int index)

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

`
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the bannedContentsInUserInput at the given index. |

### getBannedContentsInUserInputCount()

    public abstract int getBannedContentsInUserInputCount()

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

`
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of bannedContentsInUserInput. |

### getBannedContentsInUserInputList()

    public abstract List<String> getBannedContentsInUserInputList()

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

`
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the bannedContentsInUserInput. |

### getBannedContentsList()

    public abstract List<String> getBannedContentsList()

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

`repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the bannedContents. |

### getDisregardDiacritics()

    public abstract boolean getDisregardDiacritics()

Optional. If true, diacritics are ignored during matching.

`bool disregard_diacritics = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The disregardDiacritics. |

### getMatchType()

    public abstract Guardrail.ContentFilter.MatchType getMatchType()

Required. Match type for the content filter.

`
.google.cloud.ces.v1.Guardrail.ContentFilter.MatchType match_type = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.Guardrail.ContentFilter.MatchType` | The matchType. |

### getMatchTypeValue()

    public abstract int getMatchTypeValue()

Required. Match type for the content filter.

`
.google.cloud.ces.v1.Guardrail.ContentFilter.MatchType match_type = 4 [(.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 matchType. |