Skip to content

Commit fdc1b11

Browse files
feat: new Bytes and File types POWERPOINT and EXCEL (#355)
* feat: new Bytes and File types: POWERPOINT and EXCEL PiperOrigin-RevId: 437260831 Source-Link: googleapis/googleapis@3c34a40 Source-Link: googleapis/googleapis-gen@a403521 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTQwMzUyMTNlNjg2Yjk2YWZjM2VkNjZkMGQwNDMyOGU0ZmZiZDRkMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent c4beaca commit fdc1b11

File tree

2 files changed

+31
-35
lines changed

2 files changed

+31
-35
lines changed

packages/google-cloud-dlp/google/cloud/dlp_v2/types/dlp.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ class MatchingType(proto.Enum):
189189

190190

191191
class ContentOption(proto.Enum):
192-
r"""Options describing which parts of the provided content should
193-
be scanned.
194-
"""
192+
r"""Deprecated and unused."""
195193
CONTENT_UNSPECIFIED = 0
196194
CONTENT_TEXT = 1
197195
CONTENT_IMAGE = 2
@@ -368,22 +366,22 @@ class InspectConfig(proto.Message):
368366
to learn more.
369367
limits (google.cloud.dlp_v2.types.InspectConfig.FindingLimits):
370368
Configuration to control the number of
371-
findings returned.
369+
findings returned. This is not used for data
370+
profiling.
372371
include_quote (bool):
373372
When true, a contextual quote from the data
374373
that triggered a finding is included in the
375-
response; see Finding.quote.
374+
response; see Finding.quote. This is not used
375+
for data profiling.
376376
exclude_info_types (bool):
377377
When true, excludes type information of the
378-
findings.
378+
findings. This is not used for data profiling.
379379
custom_info_types (Sequence[google.cloud.dlp_v2.types.CustomInfoType]):
380380
CustomInfoTypes provided by the user. See
381381
https://cloud.google.com/dlp/docs/creating-custom-infotypes
382382
to learn more.
383383
content_options (Sequence[google.cloud.dlp_v2.types.ContentOption]):
384-
List of options defining data content to
385-
scan. If empty, text, images, and other content
386-
will be included.
384+
Deprecated and unused.
387385
rule_set (Sequence[google.cloud.dlp_v2.types.InspectionRuleSet]):
388386
Set of rules to apply to the findings for
389387
this InspectConfig. Exclusion rules, contained
@@ -393,8 +391,9 @@ class InspectConfig(proto.Message):
393391
"""
394392

395393
class FindingLimits(proto.Message):
396-
r"""Configuration to control the number of findings returned.
397-
Cannot be set if de-identification is requested.
394+
r"""Configuration to control the number of findings returned for
395+
inspection. This is not used for de-identification or data
396+
profiling.
398397
399398
Attributes:
400399
max_findings_per_item (int):
@@ -476,6 +475,8 @@ class BytesType(proto.Enum):
476475
TEXT_UTF8 = 5
477476
WORD_DOCUMENT = 7
478477
PDF = 8
478+
POWERPOINT_DOCUMENT = 9
479+
EXCEL_DOCUMENT = 10
479480
AVRO = 11
480481
CSV = 12
481482
TSV = 13

packages/google-cloud-dlp/google/cloud/dlp_v2/types/storage.py

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class FileType(proto.Enum):
7575
AVRO = 7
7676
CSV = 8
7777
TSV = 9
78+
POWERPOINT = 11
79+
EXCEL = 12
7880

7981

8082
class InfoType(proto.Message):
@@ -188,23 +190,20 @@ class Dictionary(proto.Message):
188190
Plane <https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane>`__
189191
will be replaced with whitespace when scanning for matches, so the
190192
dictionary phrase "Sam Johnson" will match all three phrases "sam
191-
johnson",
192-
Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
193-
surrounding any match must be of a different type than the adjacent
194-
characters within the word, so letters must be next to non-letters
195-
and digits next to non-digits. For example, the dictionary word
196-
"jen" will match the first three letters of the text "jen123" but
197-
will return no matches for "jennifer".
193+
johnson", "Sam, Johnson", and "Sam (Johnson)". Additionally, the
194+
characters surrounding any match must be of a different type than
195+
the adjacent characters within the word, so letters must be next to
196+
non-letters and digits next to non-digits. For example, the
197+
dictionary word "jen" will match the first three letters of the text
198+
"jen123" but will return no matches for "jennifer".
198199
199200
Dictionary words containing a large number of characters that are
200201
not letters or digits may result in unexpected findings because such
201202
characters are treated as whitespace. The
202203
`limits <https://cloud.google.com/dlp/limits>`__ page contains
203204
details about the size limits of dictionaries. For dictionaries that
204205
do not fit within these constraints, consider using
205-
``LargeCustomDictionaryConfig`` in the
206-
`limits <https://cloud.google.com/dlp/limits>`__ page contains
207-
details about
206+
``LargeCustomDictionaryConfig`` in the ``StoredInfoType`` API.
208207
209208
This message has `oneof`_ fields (mutually exclusive fields).
210209
For each oneof, at most one member field can be set at the same time.
@@ -260,11 +259,9 @@ class Regex(proto.Message):
260259
be found under the google/re2 repository on
261260
GitHub.
262261
group_indexes (Sequence[int]):
263-
(https://github.com/google/re2/wiki/Syntax)
264-
can be found under the The index of the submatch
265-
to extract as findings. When not specified, the
266-
entire match is returned. No more than 3 may be
267-
included.
262+
The index of the submatch to extract as
263+
findings. When not specified, the entire match
264+
is returned. No more than 3 may be included.
268265
"""
269266

270267
pattern = proto.Field(proto.STRING, number=1,)
@@ -275,10 +272,10 @@ class SurrogateType(proto.Message):
275272
such as
276273
```CryptoReplaceFfxFpeConfig`` <https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig>`__.
277274
These types of transformations are those that perform
278-
pseudonymization, thereby producing a "surrogate" as
279-
```CryptoReplaceFfxFpeConfig`` <https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig>`__.
280-
transformation such as ``surrogate_info_type``. This CustomInfoType
281-
does not support the use of ``detection_rules``.
275+
pseudonymization, thereby producing a "surrogate" as output. This
276+
should be used in conjunction with a field on the transformation
277+
such as ``surrogate_info_type``. This CustomInfoType does not
278+
support the use of ``detection_rules``.
282279
283280
"""
284281

@@ -527,11 +524,9 @@ class CloudStorageRegexFileSet(proto.Message):
527524
guide can be found under the google/re2 repository on
528525
GitHub.
529526
exclude_regex (Sequence[str]):
530-
`syntax <https://github.com/google/re2/wiki/Syntax>`__; a
531-
guide can be found A list of regular expressions matching
532-
file paths to exclude. All files in the bucket that match at
533-
least one of these regular expressions will be excluded from
534-
the scan.
527+
A list of regular expressions matching file paths to
528+
exclude. All files in the bucket that match at least one of
529+
these regular expressions will be excluded from the scan.
535530
536531
Regular expressions use RE2
537532
`syntax <https://github.com/google/re2/wiki/Syntax>`__; a

0 commit comments

Comments
 (0)