# Interface SanitizationResultOrBuilder (0.34.0)

0.34.0 (latest) 0.32.0 0.29.0 0.28.0 0.26.0 0.24.0 0.23.0 0.21.0 0.19.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.11.0 0.9.0 0.8.0 0.5.0 0.4.0 0.3.0 0.1.0

    public interface SanitizationResultOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsFilterResults(String key)

    public abstract boolean containsFilterResults(String key)

Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

`
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getFilterMatchState()

    public abstract FilterMatchState getFilterMatchState()

Output only. Overall filter match state for Sanitization.
The state can have below two values.

1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria.
In other words, input passed all filters.

2) MATCH_FOUND: At least one filter in configuration satisfies matching.
In other words, input did not pass one or more filters.

`
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterMatchState` | The filterMatchState. |

### getFilterMatchStateValue()

    public abstract int getFilterMatchStateValue()

Output only. Overall filter match state for Sanitization.
The state can have below two values.

1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria.
In other words, input passed all filters.

2) MATCH_FOUND: At least one filter in configuration satisfies matching.
In other words, input did not pass one or more filters.

`
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getFilterResults() (deprecated)

    public abstract Map<String,FilterResult> getFilterResults()

Use [#getFilterResultsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.SanitizationResultOrBuilder#com_google_cloud_modelarmor_v1_SanitizationResultOrBuilder_getFilterResultsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterResult>` |   |

### getFilterResultsCount()

    public abstract int getFilterResultsCount()

Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

`
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getFilterResultsMap()

    public abstract Map<String,FilterResult> getFilterResultsMap()

Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

`
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterResult>` |   |

### getFilterResultsOrDefault(String key, FilterResult defaultValue)

    public abstract FilterResult getFilterResultsOrDefault(String key, FilterResult defaultValue)

Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

`
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterResult` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterResult` |   |

### getFilterResultsOrThrow(String key)

    public abstract FilterResult getFilterResultsOrThrow(String key)

Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

`
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.FilterResult` |   |

### getInvocationResult()

    public abstract InvocationResult getInvocationResult()

Output only. A field indicating the outcome of the invocation, irrespective
of match status. It can have the following three values: SUCCESS: All
filters were executed successfully. PARTIAL: Some filters were skipped or
failed execution. FAILURE: All filters were skipped or failed execution.

`
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.InvocationResult` | The invocationResult. |

### getInvocationResultValue()

    public abstract int getInvocationResultValue()

Output only. A field indicating the outcome of the invocation, irrespective
of match status. It can have the following three values: SUCCESS: All
filters were executed successfully. PARTIAL: Some filters were skipped or
failed execution. FAILURE: All filters were skipped or failed execution.

`
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getSanitizationMetadata()

    public abstract SanitizationResult.SanitizationMetadata getSanitizationMetadata()

Output only. Metadata related to Sanitization.

`
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata` | The sanitizationMetadata. |

### getSanitizationMetadataOrBuilder()

    public abstract SanitizationResult.SanitizationMetadataOrBuilder getSanitizationMetadataOrBuilder()

Output only. Metadata related to Sanitization.

`
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/com.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadataOrBuilder` |   |

### hasSanitizationMetadata()

    public abstract boolean hasSanitizationMetadata()

Output only. Metadata related to Sanitization.

`
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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