Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class SanitizationResult.
Sanitization result after applying all the filters on input content.
Generated from protobuf messagegoogle.cloud.modelarmor.v1beta.SanitizationResult
Namespace
Google \ Cloud \ ModelArmor \ V1beta
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ filter_match_state
int
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.
Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
↳ invocation_result
int
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.
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.
Returns
Type
Description
int
setFilterMatchState
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.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getFilterResults
Output only. Results for all filters where the key is the filter name -
either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
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.
Returns
Type
Description
int
setInvocationResult
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Model Armor V1beta Client - Class SanitizationResult (0.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.0 (latest)](/php/docs/reference/cloud-modelarmor/latest/V1beta.SanitizationResult)\n- [0.3.1](/php/docs/reference/cloud-modelarmor/0.3.1/V1beta.SanitizationResult)\n- [0.2.0](/php/docs/reference/cloud-modelarmor/0.2.0/V1beta.SanitizationResult)\n- [0.1.0](/php/docs/reference/cloud-modelarmor/0.1.0/V1beta.SanitizationResult) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud Model Armor V1beta Client class SanitizationResult.\n\nSanitization result after applying all the filters on input content.\n\nGenerated from protobuf message `google.cloud.modelarmor.v1beta.SanitizationResult`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ModelArmor \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getFilterMatchState\n\nOutput only. Overall filter match state for Sanitization.\n\nThe state can have below two values.\n1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria.\nIn other words, input passed all filters.\n2) MATCH_FOUND: At least one filter in configuration satisfies matching.\nIn other words, input did not pass one or more filters.\n\n### setFilterMatchState\n\nOutput only. Overall filter match state for Sanitization.\n\nThe state can have below two values.\n1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria.\nIn other words, input passed all filters.\n2) MATCH_FOUND: At least one filter in configuration satisfies matching.\nIn other words, input did not pass one or more filters.\n\n### getFilterResults\n\nOutput only. Results for all filters where the key is the filter name -\neither of \"csam\", \"malicious_uris\", \"rai\", \"pi_and_jailbreak\" ,\"sdp\".\n\n### setFilterResults\n\nOutput only. Results for all filters where the key is the filter name -\neither of \"csam\", \"malicious_uris\", \"rai\", \"pi_and_jailbreak\" ,\"sdp\".\n\n### getInvocationResult\n\nOutput only. A field indicating the outcome of the invocation, irrespective\nof match status. It can have the following three values: SUCCESS: All\nfilters were executed successfully. PARTIAL: Some filters were skipped or\nfailed execution. FAILURE: All filters were skipped or failed execution.\n\n### setInvocationResult\n\nOutput only. A field indicating the outcome of the invocation, irrespective\nof match status. It can have the following three values: SUCCESS: All\nfilters were executed successfully. PARTIAL: Some filters were skipped or\nfailed execution. FAILURE: All filters were skipped or failed execution.\n\n### getSanitizationMetadata\n\nOutput only. Metadata related to Sanitization.\n\n### hasSanitizationMetadata\n\n### clearSanitizationMetadata\n\n### setSanitizationMetadata\n\nOutput only. Metadata related to Sanitization."]]