1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="dlp_v2.html">Cloud Data Loss Prevention (DLP) API</a> . <a href="dlp_v2.projects.html">projects</a> . <a href="dlp_v2.projects.image.html">image</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#redact">redact(parent, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Redacts potentially sensitive info from an image.</p> 80<h3>Method Details</h3> 81<div class="method"> 82 <code class="details" id="redact">redact(parent, body, x__xgafv=None)</code> 83 <pre>Redacts potentially sensitive info from an image. 84This method has limits on input size, processing time, and output size. 85See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 86learn more. 87 88When no InfoTypes or CustomInfoTypes are specified in this request, the 89system will automatically choose what detectors to run. By default this may 90be all types, but may change over time as detectors are updated. 91 92Args: 93 parent: string, The parent resource name, for example projects/my-project-id. (required) 94 body: object, The request body. (required) 95 The object takes the form of: 96 97{ # Request to search for potentially sensitive info in an image and redact it 98 # by covering it with a colored rectangle. 99 "byteItem": { # Container for bytes to inspect or redact. # The content must be PNG, JPEG, SVG or BMP. 100 "type": "A String", # The type of data stored in the bytes string. Default will be TEXT_UTF8. 101 "data": "A String", # Content data to inspect or redact. 102 }, 103 "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector. 104 # When used with redactContent only info_types and min_likelihood are currently 105 # used. 106 "excludeInfoTypes": True or False, # When true, excludes type information of the findings. 107 "limits": { 108 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job. 109 # When set within `InspectContentRequest`, the maximum returned is 2000 110 # regardless if this is set higher. 111 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes. 112 { # Max findings configuration per infoType, per content item or long 113 # running DlpJob. 114 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per 115 # info_type should be provided. If InfoTypeLimit does not have an 116 # info_type, the DLP API applies the limit against all info_types that 117 # are found but not specified in another InfoTypeLimit. 118 "name": "A String", # Name of the information type. Either a name of your choosing when 119 # creating a CustomInfoType, or one of the names listed 120 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 121 # a built-in type. InfoType names should conform to the pattern 122 # [a-zA-Z0-9_]{1,64}. 123 }, 124 "maxFindings": 42, # Max findings limit for the given infoType. 125 }, 126 ], 127 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned. 128 # When set within `InspectDataSourceRequest`, 129 # the maximum returned is 2000 regardless if this is set higher. 130 # When set within `InspectContentRequest`, this field is ignored. 131 }, 132 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is 133 # POSSIBLE. 134 # See https://cloud.google.com/dlp/docs/likelihood to learn more. 135 "customInfoTypes": [ # CustomInfoTypes provided by the user. See 136 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 137 { # Custom information type provided by the user. Used to find domain-specific 138 # sensitive information configurable to the data in question. 139 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType. 140 "pattern": "A String", # Pattern defining the regular expression. Its syntax 141 # (https://github.com/google/re2/wiki/Syntax) can be found under the 142 # google/re2 repository on GitHub. 143 "groupIndexes": [ # The index of the submatch to extract as findings. When not 144 # specified, the entire match is returned. No more than 3 may be included. 145 42, 146 ], 147 }, 148 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that 149 # support reversing. 150 # such as 151 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). 152 # These types of transformations are 153 # those that perform pseudonymization, thereby producing a "surrogate" as 154 # output. This should be used in conjunction with a field on the 155 # transformation such as `surrogate_info_type`. This CustomInfoType does 156 # not support the use of `detection_rules`. 157 }, 158 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in 159 # infoType, when the name matches one of existing infoTypes and that infoType 160 # is specified in `InspectContent.info_types` field. Specifying the latter 161 # adds findings to the one detected by the system. If built-in info type is 162 # not specified in `InspectContent.info_types` list then the name is treated 163 # as a custom info type. 164 "name": "A String", # Name of the information type. Either a name of your choosing when 165 # creating a CustomInfoType, or one of the names listed 166 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 167 # a built-in type. InfoType names should conform to the pattern 168 # [a-zA-Z0-9_]{1,64}. 169 }, 170 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType. 171 # be used to match sensitive information specific to the data, such as a list 172 # of employee IDs or job titles. 173 # 174 # Dictionary words are case-insensitive and all characters other than letters 175 # and digits in the unicode [Basic Multilingual 176 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) 177 # will be replaced with whitespace when scanning for matches, so the 178 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", 179 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters 180 # surrounding any match must be of a different type than the adjacent 181 # characters within the word, so letters must be next to non-letters and 182 # digits next to non-digits. For example, the dictionary word "jen" will 183 # match the first three letters of the text "jen123" but will return no 184 # matches for "jennifer". 185 # 186 # Dictionary words containing a large number of characters that are not 187 # letters or digits may result in unexpected findings because such characters 188 # are treated as whitespace. The 189 # [limits](https://cloud.google.com/dlp/limits) page contains details about 190 # the size limits of dictionaries. For dictionaries that do not fit within 191 # these constraints, consider using `LargeCustomDictionaryConfig` in the 192 # `StoredInfoType` API. 193 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for. 194 "words": [ # Words or phrases defining the dictionary. The dictionary must contain 195 # at least one phrase and every phrase must contain at least 2 characters 196 # that are letters or digits. [required] 197 "A String", 198 ], 199 }, 200 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file 201 # is accepted. 202 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage. 203 # Example: gs://[BUCKET_NAME]/dictionary.txt 204 }, 205 }, 206 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in 207 # `InspectDataSource`. Not currently supported in `InspectContent`. 208 "name": "A String", # Resource name of the requested `StoredInfoType`, for example 209 # `organizations/433245324/storedInfoTypes/432452342` or 210 # `projects/project-id/storedInfoTypes/432452342`. 211 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for 212 # inspection was created. Output-only field, populated by the system. 213 }, 214 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType. 215 # Rules are applied in order that they are specified. Not supported for the 216 # `surrogate_type` CustomInfoType. 217 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a 218 # `CustomInfoType` to alter behavior under certain circumstances, depending 219 # on the specific details of the rule. Not supported for the `surrogate_type` 220 # custom infoType. 221 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule. 222 # proximity of hotwords. 223 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside. 224 # The total length of the window cannot exceed 1000 characters. Note that 225 # the finding itself will be included in the window, so that hotwords may 226 # be used to match substrings of the finding itself. For example, the 227 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be 228 # adjusted upwards if the area code is known to be the local area code of 229 # a company office using the hotword regex "\(xxx\)", where "xxx" 230 # is the area code in question. 231 # rule. 232 "windowAfter": 42, # Number of characters after the finding to consider. 233 "windowBefore": 42, # Number of characters before the finding to consider. 234 }, 235 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword. 236 "pattern": "A String", # Pattern defining the regular expression. Its syntax 237 # (https://github.com/google/re2/wiki/Syntax) can be found under the 238 # google/re2 repository on GitHub. 239 "groupIndexes": [ # The index of the submatch to extract as findings. When not 240 # specified, the entire match is returned. No more than 3 may be included. 241 42, 242 ], 243 }, 244 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings. 245 # part of a detection rule. 246 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of 247 # levels. For example, if a finding would be `POSSIBLE` without the 248 # detection rule and `relative_likelihood` is 1, then it is upgraded to 249 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. 250 # Likelihood may never drop below `VERY_UNLIKELY` or exceed 251 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an 252 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in 253 # a final likelihood of `LIKELY`. 254 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value. 255 }, 256 }, 257 }, 258 ], 259 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding 260 # to be returned. It still can be used for rules matching. 261 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be 262 # altered by a detection rule if the finding meets the criteria specified by 263 # the rule. Defaults to `VERY_LIKELY` if not specified. 264 }, 265 ], 266 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is 267 # included in the response; see Finding.quote. 268 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig. 269 # Exclusion rules, contained in the set are executed in the end, other 270 # rules are executed in the order they are specified for each info type. 271 { # Rule set for modifying a set of infoTypes to alter behavior under certain 272 # circumstances, depending on the specific details of the rules within the set. 273 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order. 274 { # A single inspection rule to be applied to infoTypes, specified in 275 # `InspectionRuleSet`. 276 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule. 277 # proximity of hotwords. 278 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside. 279 # The total length of the window cannot exceed 1000 characters. Note that 280 # the finding itself will be included in the window, so that hotwords may 281 # be used to match substrings of the finding itself. For example, the 282 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be 283 # adjusted upwards if the area code is known to be the local area code of 284 # a company office using the hotword regex "\(xxx\)", where "xxx" 285 # is the area code in question. 286 # rule. 287 "windowAfter": 42, # Number of characters after the finding to consider. 288 "windowBefore": 42, # Number of characters before the finding to consider. 289 }, 290 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword. 291 "pattern": "A String", # Pattern defining the regular expression. Its syntax 292 # (https://github.com/google/re2/wiki/Syntax) can be found under the 293 # google/re2 repository on GitHub. 294 "groupIndexes": [ # The index of the submatch to extract as findings. When not 295 # specified, the entire match is returned. No more than 3 may be included. 296 42, 297 ], 298 }, 299 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings. 300 # part of a detection rule. 301 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of 302 # levels. For example, if a finding would be `POSSIBLE` without the 303 # detection rule and `relative_likelihood` is 1, then it is upgraded to 304 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. 305 # Likelihood may never drop below `VERY_UNLIKELY` or exceed 306 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an 307 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in 308 # a final likelihood of `LIKELY`. 309 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value. 310 }, 311 }, 312 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule. 313 # `InspectionRuleSet` are removed from results. 314 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule. 315 "pattern": "A String", # Pattern defining the regular expression. Its syntax 316 # (https://github.com/google/re2/wiki/Syntax) can be found under the 317 # google/re2 repository on GitHub. 318 "groupIndexes": [ # The index of the submatch to extract as findings. When not 319 # specified, the entire match is returned. No more than 3 may be included. 320 42, 321 ], 322 }, 323 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule. 324 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or 325 # contained within with a finding of an infoType from this list. For 326 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and 327 # `exclusion_rule` containing `exclude_info_types.info_types` with 328 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap 329 # with EMAIL_ADDRESS finding. 330 # That leads to "555-222-2222@example.org" to generate only a single 331 # finding, namely email address. 332 { # Type of information detected by the API. 333 "name": "A String", # Name of the information type. Either a name of your choosing when 334 # creating a CustomInfoType, or one of the names listed 335 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 336 # a built-in type. InfoType names should conform to the pattern 337 # [a-zA-Z0-9_]{1,64}. 338 }, 339 ], 340 }, 341 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule. 342 # be used to match sensitive information specific to the data, such as a list 343 # of employee IDs or job titles. 344 # 345 # Dictionary words are case-insensitive and all characters other than letters 346 # and digits in the unicode [Basic Multilingual 347 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) 348 # will be replaced with whitespace when scanning for matches, so the 349 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", 350 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters 351 # surrounding any match must be of a different type than the adjacent 352 # characters within the word, so letters must be next to non-letters and 353 # digits next to non-digits. For example, the dictionary word "jen" will 354 # match the first three letters of the text "jen123" but will return no 355 # matches for "jennifer". 356 # 357 # Dictionary words containing a large number of characters that are not 358 # letters or digits may result in unexpected findings because such characters 359 # are treated as whitespace. The 360 # [limits](https://cloud.google.com/dlp/limits) page contains details about 361 # the size limits of dictionaries. For dictionaries that do not fit within 362 # these constraints, consider using `LargeCustomDictionaryConfig` in the 363 # `StoredInfoType` API. 364 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for. 365 "words": [ # Words or phrases defining the dictionary. The dictionary must contain 366 # at least one phrase and every phrase must contain at least 2 characters 367 # that are letters or digits. [required] 368 "A String", 369 ], 370 }, 371 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file 372 # is accepted. 373 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage. 374 # Example: gs://[BUCKET_NAME]/dictionary.txt 375 }, 376 }, 377 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details. 378 }, 379 }, 380 ], 381 "infoTypes": [ # List of infoTypes this rule set is applied to. 382 { # Type of information detected by the API. 383 "name": "A String", # Name of the information type. Either a name of your choosing when 384 # creating a CustomInfoType, or one of the names listed 385 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 386 # a built-in type. InfoType names should conform to the pattern 387 # [a-zA-Z0-9_]{1,64}. 388 }, 389 ], 390 }, 391 ], 392 "contentOptions": [ # List of options defining data content to scan. 393 # If empty, text, images, and other content will be included. 394 "A String", 395 ], 396 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to 397 # InfoType values returned by ListInfoTypes or listed at 398 # https://cloud.google.com/dlp/docs/infotypes-reference. 399 # 400 # When no InfoTypes or CustomInfoTypes are specified in a request, the 401 # system may automatically choose what detectors to run. By default this may 402 # be all types, but may change over time as detectors are updated. 403 # 404 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors, 405 # but may change over time as new InfoTypes are added. If you need precise 406 # control and predictability as to what detectors are run you should specify 407 # specific InfoTypes listed in the reference. 408 { # Type of information detected by the API. 409 "name": "A String", # Name of the information type. Either a name of your choosing when 410 # creating a CustomInfoType, or one of the names listed 411 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 412 # a built-in type. InfoType names should conform to the pattern 413 # [a-zA-Z0-9_]{1,64}. 414 }, 415 ], 416 }, 417 "includeFindings": True or False, # Whether the response should include findings along with the redacted 418 # image. 419 "imageRedactionConfigs": [ # The configuration for specifying what content to redact from images. 420 { # Configuration for determining how redaction of images should occur. 421 "infoType": { # Type of information detected by the API. # Only one per info_type should be provided per request. If not 422 # specified, and redact_all_text is false, the DLP API will redact all 423 # text that it matches against all info_types that are found, but not 424 # specified in another ImageRedactionConfig. 425 "name": "A String", # Name of the information type. Either a name of your choosing when 426 # creating a CustomInfoType, or one of the names listed 427 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 428 # a built-in type. InfoType names should conform to the pattern 429 # [a-zA-Z0-9_]{1,64}. 430 }, 431 "redactAllText": True or False, # If true, all text found in the image, regardless whether it matches an 432 # info_type, is redacted. Only one should be provided. 433 "redactionColor": { # Represents a color in the RGB color space. # The color to use when redacting content from an image. If not specified, 434 # the default is black. 435 "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1]. 436 "green": 3.14, # The amount of green in the color as a value in the interval [0, 1]. 437 "red": 3.14, # The amount of red in the color as a value in the interval [0, 1]. 438 }, 439 }, 440 ], 441 } 442 443 x__xgafv: string, V1 error format. 444 Allowed values 445 1 - v1 error format 446 2 - v2 error format 447 448Returns: 449 An object of the form: 450 451 { # Results of redacting an image. 452 "extractedText": "A String", # If an image was being inspected and the InspectConfig's include_quote was 453 # set to true, then this field will include all text, if any, that was found 454 # in the image. 455 "inspectResult": { # All the findings for a single scanned item. # The findings. Populated when include_findings in the request is true. 456 "findingsTruncated": True or False, # If true, then this item might have more findings than were returned, 457 # and the findings returned are an arbitrary subset of all findings. 458 # The findings list might be truncated because the input items were too 459 # large, or because the server reached the maximum amount of resources 460 # allowed for a single API call. For best results, divide the input into 461 # smaller batches. 462 "findings": [ # List of findings for an item. 463 { # Represents a piece of potentially sensitive content. 464 "infoType": { # Type of information detected by the API. # The type of content that might have been found. 465 # Provided if `excluded_types` is false. 466 "name": "A String", # Name of the information type. Either a name of your choosing when 467 # creating a CustomInfoType, or one of the names listed 468 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying 469 # a built-in type. InfoType names should conform to the pattern 470 # [a-zA-Z0-9_]{1,64}. 471 }, 472 "quote": "A String", # The content that was found. Even if the content is not textual, it 473 # may be converted to a textual representation here. 474 # Provided if `include_quote` is true and the finding is 475 # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes 476 # in length, the quote may be omitted. 477 "quoteInfo": { # Message for infoType-dependent details parsed from quote. # Contains data parsed from quotes. Only populated if include_quote was set 478 # to true and a supported infoType was requested. Currently supported 479 # infoTypes: DATE, DATE_OF_BIRTH and TIME. 480 "dateTime": { # Message for a date time object. # The date time indicated by the quote. 481 # e.g. 2018-01-01, 5th August. 482 "dayOfWeek": "A String", 483 "timeZone": { 484 "offsetMinutes": 42, # Set only if the offset can be determined. Positive for time ahead of UTC. 485 # E.g. For "UTC-9", this value is -540. 486 }, 487 "date": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # One or more of the following must be set. All fields are optional, but 488 # when set must be valid date or time values. 489 # and time zone are either specified elsewhere or are not significant. The date 490 # is relative to the Proleptic Gregorian Calendar. This can represent: 491 # 492 # * A full date, with non-zero year, month and day values 493 # * A month and day value, with a zero year, e.g. an anniversary 494 # * A year on its own, with zero month and day values 495 # * A year and month value, with a zero day, e.g. a credit card expiration date 496 # 497 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. 498 "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without 499 # a year. 500 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 501 # if specifying a year by itself or a year and month where the day is not 502 # significant. 503 "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a 504 # month and day. 505 }, 506 "time": { # Represents a time of day. The date and time zone are either not significant 507 # or are specified elsewhere. An API may choose to allow leap seconds. Related 508 # types are google.type.Date and `google.protobuf.Timestamp`. 509 "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose 510 # to allow the value "24:00:00" for scenarios like business closing time. 511 "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. 512 "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may 513 # allow the value 60 if it allows leap-seconds. 514 "minutes": 42, # Minutes of hour of day. Must be from 0 to 59. 515 }, 516 }, 517 }, 518 "location": { # Specifies the location of the finding. # Where the content was found. 519 "byteRange": { # Generic half-open interval [start, end) # Zero-based byte offsets delimiting the finding. 520 # These are relative to the finding's containing element. 521 # Note that when the content is not textual, this references 522 # the UTF-8 encoded textual representation of the content. 523 # Omitted if content is an image. 524 "start": "A String", # Index of the first character of the range (inclusive). 525 "end": "A String", # Index of the last character of the range (exclusive). 526 }, 527 "codepointRange": { # Generic half-open interval [start, end) # Unicode character offsets delimiting the finding. 528 # These are relative to the finding's containing element. 529 # Provided when the content is text. 530 "start": "A String", # Index of the first character of the range (inclusive). 531 "end": "A String", # Index of the last character of the range (exclusive). 532 }, 533 "contentLocations": [ # List of nested objects pointing to the precise location of the finding 534 # within the file or record. 535 { # Findings container location data. 536 "containerName": "A String", # Name of the container where the finding is located. 537 # The top level name is the source file name or table name. Names of some 538 # common storage containers are formatted as follows: 539 # 540 # * BigQuery tables: `<project_id>:<dataset_id>.<table_id>` 541 # * Cloud Storage files: `gs://<bucket>/<path>` 542 # * Datastore namespace: <namespace> 543 # 544 # Nested names could be absent if the embedded object has no string 545 # identifier (for an example an image contained within a document). 546 "containerVersion": "A String", # Findings container version, if available 547 # ("generation" for Google Cloud Storage). 548 "containerTimestamp": "A String", # Findings container modification timestamp, if applicable. 549 # For Google Cloud Storage contains last file modification timestamp. 550 # For BigQuery table contains last_modified_time property. 551 # For Datastore - not populated. 552 "documentLocation": { # Location of a finding within a document. # Location data for document files. 553 "fileOffset": "A String", # Offset of the line, from the beginning of the file, where the finding 554 # is located. 555 }, 556 "imageLocation": { # Location of the finding within an image. # Location within an image's pixels. 557 "boundingBoxes": [ # Bounding boxes locating the pixels within the image containing the finding. 558 { # Bounding box encompassing detected text within an image. 559 "width": 42, # Width of the bounding box in pixels. 560 "top": 42, # Top coordinate of the bounding box. (0,0) is upper left. 561 "left": 42, # Left coordinate of the bounding box. (0,0) is upper left. 562 "height": 42, # Height of the bounding box in pixels. 563 }, 564 ], 565 }, 566 "recordLocation": { # Location of a finding within a row or record. # Location within a row or record of a database table. 567 "fieldId": { # General identifier of a data field in a storage service. # Field id of the field containing the finding. 568 "name": "A String", # Name describing the field. 569 }, 570 "tableLocation": { # Location of a finding within a table. # Location within a `ContentItem.Table`. 571 "rowIndex": "A String", # The zero-based index of the row where the finding is located. 572 }, 573 "recordKey": { # Message for a unique key indicating a record that contains a finding. # Key of the finding. 574 "bigQueryKey": { # Row key for identifying a record in BigQuery table. 575 "tableReference": { # Message defining the location of a BigQuery table. A table is uniquely # Complete BigQuery table reference. 576 # identified by its project_id, dataset_id, and table_name. Within a query 577 # a table is often referenced with a string in the format of: 578 # `<project_id>:<dataset_id>.<table_id>` or 579 # `<project_id>.<dataset_id>.<table_id>`. 580 "projectId": "A String", # The Google Cloud Platform project ID of the project containing the table. 581 # If omitted, project ID is inferred from the API call. 582 "tableId": "A String", # Name of the table. 583 "datasetId": "A String", # Dataset ID of the table. 584 }, 585 "rowNumber": "A String", # Absolute number of the row from the beginning of the table at the time 586 # of scanning. 587 }, 588 "idValues": [ # Values of identifying columns in the given row. Order of values matches 589 # the order of field identifiers specified in the scanning request. 590 "A String", 591 ], 592 "datastoreKey": { # Record key for a finding in Cloud Datastore. 593 "entityKey": { # A unique identifier for a Datastore entity. # Datastore entity key. 594 # If a key's partition ID or any of its path kinds or names are 595 # reserved/read-only, the key is reserved/read-only. 596 # A reserved/read-only key is forbidden in certain documented contexts. 597 "path": [ # The entity path. 598 # An entity path consists of one or more elements composed of a kind and a 599 # string or numerical identifier, which identify entities. The first 600 # element identifies a _root entity_, the second element identifies 601 # a _child_ of the root entity, the third element identifies a child of the 602 # second entity, and so forth. The entities identified by all prefixes of 603 # the path are called the element's _ancestors_. 604 # 605 # A path can never be empty, and a path can have at most 100 elements. 606 { # A (kind, ID/name) pair used to construct a key path. 607 # 608 # If either name or ID is set, the element is complete. 609 # If neither is set, the element is incomplete. 610 "kind": "A String", # The kind of the entity. 611 # A kind matching regex `__.*__` is reserved/read-only. 612 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 613 # Cannot be `""`. 614 "name": "A String", # The name of the entity. 615 # A name matching regex `__.*__` is reserved/read-only. 616 # A name must not be more than 1500 bytes when UTF-8 encoded. 617 # Cannot be `""`. 618 "id": "A String", # The auto-allocated ID of the entity. 619 # Never equal to zero. Values less than zero are discouraged and may not 620 # be supported in the future. 621 }, 622 ], 623 "partitionId": { # Datastore partition ID. # Entities are partitioned into subsets, currently identified by a project 624 # ID and namespace ID. 625 # Queries are scoped to a single partition. 626 # A partition ID identifies a grouping of entities. The grouping is always 627 # by project and namespace, however the namespace ID may be empty. 628 # 629 # A partition ID contains several dimensions: 630 # project ID and namespace ID. 631 "projectId": "A String", # The ID of the project to which the entities belong. 632 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 633 }, 634 }, 635 }, 636 }, 637 }, 638 }, 639 ], 640 }, 641 "likelihood": "A String", # Confidence of how likely it is that the `info_type` is correct. 642 "createTime": "A String", # Timestamp when finding was detected. 643 }, 644 ], 645 }, 646 "redactedImage": "A String", # The redacted image. The type will be the same as the original image. 647 }</pre> 648</div> 649 650</body></html>