- JSON representation
- FilterMatchState
- FilterResult
- RaiFilterResult
- FilterExecutionState
- MessageItem
- MessageType
- RaiFilterTypeResult
- SdpFilterResult
- SdpInspectResult
- SdpFinding
- SdpFindingLikelihood
- SdpFindingLocation
- RangeInfo
- SdpDeidentifyResult
- PiAndJailbreakFilterResult
- MaliciousUriFilterResult
- MaliciousUriMatchedItem
- CsamFilterResult
- VirusScanFilterResult
- ScannedContentType
- VirusDetail
- ThreatType
- InvocationResult
- SanitizationMetadata
Sanitization result after applying all the filters on input content.
| JSON representation | 
|---|
| { "filterMatchState": enum ( | 
| Fields | |
|---|---|
| filterMatchState | 
 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. | 
| filterResults | 
 Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp". An object containing a list of  | 
| invocationResult | 
 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. | 
| sanitizationMetadata | 
 Output only. Metadata related to Sanitization. | 
FilterMatchState
Option to specify filter match state.
| Enums | |
|---|---|
| FILTER_MATCH_STATE_UNSPECIFIED | Unused | 
| NO_MATCH_FOUND | Matching criteria is not achieved for filters. | 
| MATCH_FOUND | Matching criteria is achieved for the filter. | 
FilterResult
Filter Result obtained after Sanitization operations.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field filter_result. Encapsulates one of responsible AI, Sensitive Data Protection, Prompt Injection and Jailbreak, Malicious URI, CSAM, Virus Scan related filter results.filter_resultcan be only one of the following: | |
| raiFilterResult | 
 Responsible AI filter results. | 
| sdpFilterResult | 
 Sensitive Data Protection results. | 
| piAndJailbreakFilterResult | 
 Prompt injection and Jailbreak filter results. | 
| maliciousUriFilterResult | 
 Malicious URI filter results. | 
| csamFilterFilterResult | 
 CSAM filter results. | 
| virusScanFilterResult | 
 Virus scan results. | 
RaiFilterResult
Responsible AI Result.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether the RAI filter was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Overall filter match state for RAI. Value is MATCH_FOUND if at least one RAI filter confidence level is equal to or higher than the confidence level defined in configuration. | 
| raiFilterTypeResults | 
 The map of RAI filter results where key is RAI filter type - either of "sexually_explicit", "hate_speech", "harassment", "dangerous". An object containing a list of  | 
FilterExecutionState
Enum which reports whether a specific filter executed successfully or not.
| Enums | |
|---|---|
| FILTER_EXECUTION_STATE_UNSPECIFIED | Unused | 
| EXECUTION_SUCCESS | Filter executed successfully | 
| EXECUTION_SKIPPED | Filter execution was skipped. This can happen due to server-side error or permission issue. | 
MessageItem
Message item to report information, warning or error messages.
| JSON representation | 
|---|
| {
  "messageType": enum ( | 
| Fields | |
|---|---|
| messageType | 
 Type of message. | 
| message | 
 The message content. | 
MessageType
Option to specify the type of message.
| Enums | |
|---|---|
| MESSAGE_TYPE_UNSPECIFIED | Unused | 
| INFO | Information related message. | 
| WARNING | Warning related message. | 
| ERROR | Error message. | 
RaiFilterTypeResult
Detailed Filter result for each of the responsible AI Filter Types.
| JSON representation | 
|---|
| { "filterType": enum ( | 
| Fields | |
|---|---|
| filterType | 
 Type of responsible AI filter. | 
| confidenceLevel | 
 Confidence level identified for this RAI filter. | 
| matchState | 
 Output only. Match state for this RAI filter. | 
SdpFilterResult
Sensitive Data Protection filter result.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field result. Either of Sensitive Data Protection Inspect result or Deidentify result.resultcan be only one of the following: | |
| inspectResult | 
 Sensitive Data Protection Inspection result if inspection is performed. | 
| deidentifyResult | 
 Sensitive Data Protection Deidentification result if deidentification is performed. | 
SdpInspectResult
Sensitive Data Protection Inspection Result.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether Sensitive Data Protection inspection was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match state for SDP Inspection. Value is MATCH_FOUND if at least one Sensitive Data Protection finding is identified. | 
| findings[] | 
 List of Sensitive Data Protection findings. | 
| findingsTruncated | 
 If true, then there is possibility that more findings were identified and the findings returned are a subset of all findings. The findings list might be truncated because the input items were too large, or because the server reached the maximum amount of resources allowed for a single API call. | 
SdpFinding
Finding corresponding to Sensitive Data Protection filter.
| JSON representation | 
|---|
| { "infoType": string, "likelihood": enum ( | 
| Fields | |
|---|---|
| infoType | 
 Name of Sensitive Data Protection info type for this finding. | 
| likelihood | 
 Identified confidence likelihood for  | 
| location | 
 Location for this finding. | 
SdpFindingLikelihood
For more information about each Sensitive Data Protection likelihood level, see https://cloud.google.com/sensitive-data-protection/docs/likelihood.
| Enums | |
|---|---|
| SDP_FINDING_LIKELIHOOD_UNSPECIFIED | Default value; same as POSSIBLE. | 
| VERY_UNLIKELY | Highest chance of a false positive. | 
| UNLIKELY | High chance of a false positive. | 
| POSSIBLE | Some matching signals. The default value. | 
| LIKELY | Low chance of a false positive. | 
| VERY_LIKELY | Confidence level is high. Lowest chance of a false positive. | 
SdpFindingLocation
Location of this Sensitive Data Protection Finding within input content.
| JSON representation | 
|---|
| { "byteRange": { object ( | 
| Fields | |
|---|---|
| byteRange | 
 Zero-based byte offsets delimiting the finding. These are relative to the finding's containing element. Note that when the content is not textual, this references the UTF-8 encoded textual representation of the content. | 
| codepointRange | 
 Unicode character offsets delimiting the finding. These are relative to the finding's containing element. Provided when the content is text. | 
RangeInfo
Half-open range interval [start, end)
| JSON representation | 
|---|
| { "start": string, "end": string } | 
| Fields | |
|---|---|
| start | 
 For proto3, value cannot be set to 0 unless the field is optional. Ref: https://protobuf.dev/programming-guides/proto3/#default Index of first character (inclusive). | 
| end | 
 Index of last character (exclusive). | 
SdpDeidentifyResult
Sensitive Data Protection Deidentification Result.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether Sensitive Data Protection deidentification was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match state for Sensitive Data Protection Deidentification. Value is MATCH_FOUND if content is de-identified. | 
| data | 
 De-identified data. | 
| transformedBytes | 
 Total size in bytes that were transformed during deidentification. | 
| infoTypes[] | 
 List of Sensitive Data Protection info-types that were de-identified. | 
PiAndJailbreakFilterResult
Prompt injection and Jailbreak Filter Result.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether Prompt injection and Jailbreak filter was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match state for Prompt injection and Jailbreak. | 
| confidenceLevel | 
 Confidence level identified for Prompt injection and Jailbreak. | 
MaliciousUriFilterResult
Malicious URI Filter Result.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether Malicious URI filter was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match state for this Malicious URI. Value is MATCH_FOUND if at least one Malicious URI is found. | 
| maliciousUriMatchedItems[] | 
 List of Malicious URIs found in data. | 
MaliciousUriMatchedItem
Information regarding malicious URI and its location within the input content.
| JSON representation | 
|---|
| {
  "uri": string,
  "locations": [
    {
      object ( | 
| Fields | |
|---|---|
| uri | 
 Malicious URI. | 
| locations[] | 
 List of locations where Malicious URI is identified. The  | 
CsamFilterResult
CSAM (Child Safety Abuse Material) Filter Result
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether the CSAM filter was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match state for CSAM. | 
VirusScanFilterResult
Virus scan results.
| JSON representation | 
|---|
| { "executionState": enum ( | 
| Fields | |
|---|---|
| executionState | 
 Output only. Reports whether Virus Scan was successfully executed or not. | 
| messageItems[] | 
 Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution status is skipped then this field provides related reason/explanation. | 
| matchState | 
 Output only. Match status for Virus. Value is MATCH_FOUND if the data is infected with a virus. | 
| scannedContentType | 
 Type of content scanned. | 
| virusDetails[] | 
 List of Viruses identified. This field will be empty if no virus was detected. | 
| scannedSize | 
 Size of scanned content in bytes. | 
ScannedContentType
Type of content scanned.
| Enums | |
|---|---|
| SCANNED_CONTENT_TYPE_UNSPECIFIED | Unused | 
| UNKNOWN | Unknown content | 
| PLAINTEXT | Plaintext | 
| PDF | PDF Scanning for only PDF is supported. | 
VirusDetail
Details of an identified virus
| JSON representation | 
|---|
| {
  "vendor": string,
  "names": [
    string
  ],
  "threatType": enum ( | 
| Fields | |
|---|---|
| vendor | 
 Name of vendor that produced this virus identification. | 
| names[] | 
 Names of this Virus. | 
| threatType | 
 Threat type of the identified virus | 
ThreatType
Defines all the threat types of a virus
| Enums | |
|---|---|
| THREAT_TYPE_UNSPECIFIED | Unused | 
| UNKNOWN | Unable to categorize threat | 
| VIRUS_OR_WORM | Virus or Worm threat. | 
| MALICIOUS_PROGRAM | Malicious program. E.g. Spyware, Trojan. | 
| POTENTIALLY_HARMFUL_CONTENT | Potentially harmful content. E.g. Injected code, Macro | 
| POTENTIALLY_UNWANTED_CONTENT | Potentially unwanted content. E.g. Adware. | 
InvocationResult
A field indicating the outcome of the invocation, irrespective of match status.
| Enums | |
|---|---|
| INVOCATION_RESULT_UNSPECIFIED | Unused. Default value. | 
| SUCCESS | All filters were invoked successfully. | 
| PARTIAL | Some filters were skipped or failed. | 
| FAILURE | All filters were skipped or failed. | 
SanitizationMetadata
Message describing Sanitization metadata.
| JSON representation | 
|---|
| { "errorCode": string, "errorMessage": string, "ignorePartialInvocationFailures": boolean } | 
| Fields | |
|---|---|
| errorCode | 
 Error code if any. | 
| errorMessage | 
 Error message if any. | 
| ignorePartialInvocationFailures | 
 Passthrough field defined in TemplateMetadata to indicate whether to ignore partial invocation failures. |