- JSON representation
- FilterMatchState
- FilterResult
- RaiFilterResult
- FilterExecutionState
- MessageItem
- MessageType
- RaiFilterTypeResult
- SdpFilterResult
- SdpInspectResult
- SdpFinding
- SdpFindingLikelihood
- SdpFindingLocation
- RangeInfo
- SdpContentLocation
- SdpImageFindingLocation
- SdpBoundingBox
- SdpDeidentifyResult
- SdpRedactResult
- PiAndJailbreakFilterResult
- MaliciousUriFilterResult
- MaliciousUriMatchedItem
- CsamFilterResult
- VirusScanFilterResult
- ScannedContentType
- VirusDetail
- ThreatType
- InvocationResult
- SanitizationMetadata
- FilterVersionConfig
- Date
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_result can 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", "violence", "sexually_suggestive". 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. result can 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. |
redactResult |
Sensitive Data Protection Redaction result if redaction is performed. This is primarily used for image redaction. |
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. |
extractedImageText |
Contains text extracted from the image, if applicable. |
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. Note: Omitted if content is an image. |
codepointRange |
Unicode character offsets delimiting the finding. These are relative to the finding's containing element. Provided when the content is text. Note: Omitted if content is an image. |
contentLocations[] |
List of nested objects pointing to the precise location of the finding within an image, file or record. For example, a single finding might be detected in two separate bounding boxes within an image (e.g., if it wraps across a line or is partially obscured). In such cases, contentLocations would contain two SdpContentLocation entries, each with an imageFindingLocation pointing to a different bounding box. |
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). |
SdpContentLocation
Precise location of the finding within a document, record, image, or metadata container.
| JSON representation |
|---|
{ "containerName": string, // Union field |
| Fields | |
|---|---|
containerName |
Name of the container where the finding is located. The top level name is the source file name or table name. Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document). |
Union field location. Type of the container within the file with location of the finding. This may be extended to include other container types like audio, video, etc in future. location can be only one of the following: |
|
imageFindingLocation |
Location within an image's pixels. |
SdpImageFindingLocation
Location of the finding within an image.
| JSON representation |
|---|
{
"boundingBoxes": [
{
object ( |
| Fields | |
|---|---|
boundingBoxes[] |
Bounding boxes locating the pixels within the image containing the finding. |
SdpBoundingBox
Bounding box encompassing a finding within an image.
| JSON representation |
|---|
{ "top": integer, "left": integer, "width": integer, "height": integer } |
| Fields | |
|---|---|
top |
Top coordinate of the bounding box. (0,0) is upper left. |
left |
Left coordinate of the bounding box. (0,0) is upper left. |
width |
Width of the bounding box in pixels. |
height |
Height of the bounding box in pixels. |
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. |
SdpRedactResult
Sensitive Data Protection Redaction Result.
| JSON representation |
|---|
{ "executionState": enum ( |
| Fields | |
|---|---|
executionState |
Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not. |
messageItems[] |
Output only. 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 Redaction. Value is MATCH_FOUND if content is redacted. |
redactedImage |
Output only. The redacted image. The type will be the same as the original image. A base64-encoded string. |
findings[] |
Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true. |
extractedImageText |
The extracted text from the image. |
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, "streamChunkProcessed": { object ( |
| 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. |
streamChunkProcessed |
Output only. The stream chunk processed by the Sanitization service. |
filterVersionConfig |
Output only. Provides details about the Filter Version configuration used to sanitize this request. |
FilterVersionConfig
Message describing a Filter Version Configuration.
| JSON representation |
|---|
{ "filterVersion": string, "messageItems": [ { object ( |
| Fields | |
|---|---|
filterVersion |
Output only. The identifier for this specific version. |
messageItems[] |
Output only. Extra information regarding this filter version |
filterVersionAlias |
Output only. The alias associated with this version, if any (e.g., "STABLE", "LATEST"). This will be populated if this version is currently mapped to an alias. |
releaseDate |
Output only. The date when this version was released. |
projectedDeprecationDate |
Output only. The estimated date when this version is projected to be deprecated. |
Date
Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
google.type.TimeOfDaygoogle.type.DateTimegoogle.protobuf.Timestamp
| JSON representation |
|---|
{ "year": integer, "month": integer, "day": integer } |
| Fields | |
|---|---|
year |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |