@google-cloud/dlp 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package google.privacy.dlp.v2;
18
18
 
19
19
  import "google/api/resource.proto";
20
20
  import "google/protobuf/timestamp.proto";
21
- import "google/api/annotations.proto";
22
21
 
23
22
  option csharp_namespace = "Google.Cloud.Dlp.V2";
24
23
  option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp";
@@ -36,18 +35,9 @@ message InfoType {
36
35
  // a built-in type. When sending Cloud DLP results to Data Catalog, infoType
37
36
  // names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
38
37
  string name = 1;
39
- }
40
-
41
- // A reference to a StoredInfoType to use with scanning.
42
- message StoredType {
43
- // Resource name of the requested `StoredInfoType`, for example
44
- // `organizations/433245324/storedInfoTypes/432452342` or
45
- // `projects/project-id/storedInfoTypes/432452342`.
46
- string name = 1;
47
38
 
48
- // Timestamp indicating when the version of the `StoredInfoType` used for
49
- // inspection was created. Output-only field, populated by the system.
50
- google.protobuf.Timestamp create_time = 2;
39
+ // Optional version name for this InfoType.
40
+ string version = 2;
51
41
  }
52
42
 
53
43
  // Categorization of results based on how likely they are to represent a match,
@@ -70,6 +60,18 @@ enum Likelihood {
70
60
  VERY_LIKELY = 5;
71
61
  }
72
62
 
63
+ // A reference to a StoredInfoType to use with scanning.
64
+ message StoredType {
65
+ // Resource name of the requested `StoredInfoType`, for example
66
+ // `organizations/433245324/storedInfoTypes/432452342` or
67
+ // `projects/project-id/storedInfoTypes/432452342`.
68
+ string name = 1;
69
+
70
+ // Timestamp indicating when the version of the `StoredInfoType` used for
71
+ // inspection was created. Output-only field, populated by the system.
72
+ google.protobuf.Timestamp create_time = 2;
73
+ }
74
+
73
75
  // Custom information type provided by the user. Used to find domain-specific
74
76
  // sensitive information configurable to the data in question.
75
77
  message CustomInfoType {
@@ -283,6 +285,67 @@ message DatastoreOptions {
283
285
  KindExpression kind = 2;
284
286
  }
285
287
 
288
+ // Definitions of file type groups to scan. New types will be added to this
289
+ // list.
290
+ enum FileType {
291
+ // Includes all files.
292
+ FILE_TYPE_UNSPECIFIED = 0;
293
+
294
+ // Includes all file extensions not covered by another entry. Binary
295
+ // scanning attempts to convert the content of the file to utf_8 to scan
296
+ // the file.
297
+ // If you wish to avoid this fall back, specify one or more of the other
298
+ // FileType's in your storage scan.
299
+ BINARY_FILE = 1;
300
+
301
+ // Included file extensions:
302
+ // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
303
+ // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
304
+ // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
305
+ // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex,
306
+ // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
307
+ // txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
308
+ TEXT_FILE = 2;
309
+
310
+ // Included file extensions:
311
+ // bmp, gif, jpg, jpeg, jpe, png.
312
+ // bytes_limit_per_file has no effect on image files.
313
+ // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
314
+ IMAGE = 3;
315
+
316
+ // Word files >30 MB will be scanned as binary files.
317
+ // Included file extensions:
318
+ // docx, dotx, docm, dotm
319
+ WORD = 5;
320
+
321
+ // PDF files >30 MB will be scanned as binary files.
322
+ // Included file extensions:
323
+ // pdf
324
+ PDF = 6;
325
+
326
+ // Included file extensions:
327
+ // avro
328
+ AVRO = 7;
329
+
330
+ // Included file extensions:
331
+ // csv
332
+ CSV = 8;
333
+
334
+ // Included file extensions:
335
+ // tsv
336
+ TSV = 9;
337
+
338
+ // Powerpoint files >30 MB will be scanned as binary files.
339
+ // Included file extensions:
340
+ // pptx, pptm, potx, potm, pot
341
+ POWERPOINT = 11;
342
+
343
+ // Excel files >30 MB will be scanned as binary files.
344
+ // Included file extensions:
345
+ // xlsx, xlsm, xltx, xltm
346
+ EXCEL = 12;
347
+ }
348
+
286
349
  // Message representing a set of files in a Cloud Storage bucket. Regular
287
350
  // expressions are used to allow fine-grained control over which files in the
288
351
  // bucket to include.
@@ -382,12 +445,14 @@ message CloudStorageOptions {
382
445
  // Max number of bytes to scan from a file. If a scanned file's size is bigger
383
446
  // than this value then the rest of the bytes are omitted. Only one
384
447
  // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
448
+ // Cannot be set if de-identification is requested.
385
449
  int64 bytes_limit_per_file = 4;
386
450
 
387
451
  // Max percentage of bytes to scan from a file. The rest are omitted. The
388
452
  // number of bytes scanned is rounded down. Must be between 0 and 100,
389
453
  // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
390
454
  // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
455
+ // Cannot be set if de-identification is requested.
391
456
  int32 bytes_limit_per_file_percent = 8;
392
457
 
393
458
  // List of file type groups to include in the scan.
@@ -466,6 +531,9 @@ message BigQueryOptions {
466
531
  // References to fields excluded from scanning. This allows you to skip
467
532
  // inspection of entire columns which you know have no findings.
468
533
  repeated FieldId excluded_fields = 5;
534
+
535
+ // Limit scanning only to these fields.
536
+ repeated FieldId included_fields = 7;
469
537
  }
470
538
 
471
539
  // Shared message indicating Cloud storage type.
@@ -518,65 +586,12 @@ message StorageConfig {
518
586
  BigQueryOptions big_query_options = 4;
519
587
 
520
588
  // Hybrid inspection options.
521
- // Early access feature is in a pre-release state and might change or have
522
- // limited support. For more information, see
523
- // https://cloud.google.com/products#product-launch-stages.
524
589
  HybridOptions hybrid_options = 9;
525
590
  }
526
591
 
527
592
  TimespanConfig timespan_config = 6;
528
593
  }
529
594
 
530
- // Definitions of file type groups to scan. New types will be added to this
531
- // list.
532
- enum FileType {
533
- // Includes all files.
534
- FILE_TYPE_UNSPECIFIED = 0;
535
-
536
- // Includes all file extensions not covered by another entry. Binary
537
- // scanning attempts to convert the content of the file to utf_8 to scan
538
- // the file.
539
- // If you wish to avoid this fall back, specify one or more of the other
540
- // FileType's in your storage scan.
541
- BINARY_FILE = 1;
542
-
543
- // Included file extensions:
544
- // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp,
545
- // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json,
546
- // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw,
547
- // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml,
548
- // xml, xsl, xsd, yml, yaml.
549
- TEXT_FILE = 2;
550
-
551
- // Included file extensions:
552
- // bmp, gif, jpg, jpeg, jpe, png.
553
- // bytes_limit_per_file has no effect on image files.
554
- // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
555
- IMAGE = 3;
556
-
557
- // Word files >30 MB will be scanned as binary files.
558
- // Included file extensions:
559
- // docx, dotx, docm, dotm
560
- WORD = 5;
561
-
562
- // PDF files >30 MB will be scanned as binary files.
563
- // Included file extensions:
564
- // pdf
565
- PDF = 6;
566
-
567
- // Included file extensions:
568
- // avro
569
- AVRO = 7;
570
-
571
- // Included file extensions:
572
- // csv
573
- CSV = 8;
574
-
575
- // Included file extensions:
576
- // tsv
577
- TSV = 9;
578
- }
579
-
580
595
  // Configuration to control jobs where the content being inspected is outside
581
596
  // of Google Cloud Platform.
582
597
  message HybridOptions {