google-cloud-dlp-v2 1.18.1 → 1.20.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +2 -6
  4. data/lib/google/cloud/dlp/v2/dlp_service/client.rb +546 -52
  5. data/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +1 -1
  6. data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +20 -1
  7. data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +511 -52
  8. data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +308 -1
  9. data/lib/google/cloud/dlp/v2/dlp_service/rest.rb +2 -2
  10. data/lib/google/cloud/dlp/v2/dlp_service.rb +2 -2
  11. data/lib/google/cloud/dlp/v2/rest.rb +1 -1
  12. data/lib/google/cloud/dlp/v2/version.rb +1 -1
  13. data/lib/google/cloud/dlp/v2.rb +1 -1
  14. data/lib/google/privacy/dlp/v2/dlp_pb.rb +20 -1
  15. data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +48 -38
  16. data/lib/google/privacy/dlp/v2/storage_pb.rb +5 -1
  17. data/lib/google-cloud-dlp-v2.rb +1 -1
  18. data/proto_docs/README.md +1 -1
  19. data/proto_docs/google/api/client.rb +1 -1
  20. data/proto_docs/google/api/field_behavior.rb +1 -1
  21. data/proto_docs/google/api/launch_stage.rb +1 -1
  22. data/proto_docs/google/api/resource.rb +1 -1
  23. data/proto_docs/google/privacy/dlp/v2/dlp.rb +453 -141
  24. data/proto_docs/google/privacy/dlp/v2/storage.rb +76 -20
  25. data/proto_docs/google/protobuf/any.rb +1 -1
  26. data/proto_docs/google/protobuf/duration.rb +1 -1
  27. data/proto_docs/google/protobuf/empty.rb +1 -1
  28. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  29. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  30. data/proto_docs/google/rpc/status.rb +1 -1
  31. data/proto_docs/google/type/date.rb +1 -1
  32. data/proto_docs/google/type/dayofweek.rb +1 -1
  33. data/proto_docs/google/type/timeofday.rb +1 -1
  34. metadata +8 -7
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ module Google
27
27
  # Name of the information type. Either a name of your choosing when
28
28
  # creating a CustomInfoType, or one of the names listed
29
29
  # at
30
- # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference
30
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/infotypes-reference
31
31
  # when specifying a built-in type. When sending Cloud DLP results to Data
32
32
  # Catalog, infoType names should conform to the pattern
33
33
  # `[A-Za-z0-9$_-]{1,64}`.
@@ -112,28 +112,33 @@ module Google
112
112
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary]
113
113
  # A list of phrases to detect as a CustomInfoType.
114
114
  #
115
- # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.
115
+ # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`, `file_label_info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
116
116
  # @!attribute [rw] regex
117
117
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
118
118
  # Regular expression based CustomInfoType.
119
119
  #
120
- # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.
120
+ # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`, `file_label_info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
121
121
  # @!attribute [rw] surrogate_type
122
122
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::SurrogateType]
123
123
  # Message for detecting output from deidentification transformations that
124
124
  # support reversing.
125
125
  #
126
- # Note: The following fields are mutually exclusive: `surrogate_type`, `dictionary`, `regex`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.
126
+ # Note: The following fields are mutually exclusive: `surrogate_type`, `dictionary`, `regex`, `stored_type`, `metadata_key_value_expression`, `file_label_info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
127
127
  # @!attribute [rw] stored_type
128
128
  # @return [::Google::Cloud::Dlp::V2::StoredType]
129
129
  # Loads an existing `StoredInfoType` resource.
130
130
  #
131
- # Note: The following fields are mutually exclusive: `stored_type`, `dictionary`, `regex`, `surrogate_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.
131
+ # Note: The following fields are mutually exclusive: `stored_type`, `dictionary`, `regex`, `surrogate_type`, `metadata_key_value_expression`, `file_label_info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
132
132
  # @!attribute [rw] metadata_key_value_expression
133
133
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::MetadataKeyValueExpression]
134
134
  # Key-value pair to detect in the metadata.
135
135
  #
136
- # Note: The following fields are mutually exclusive: `metadata_key_value_expression`, `dictionary`, `regex`, `surrogate_type`, `stored_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
136
+ # Note: The following fields are mutually exclusive: `metadata_key_value_expression`, `dictionary`, `regex`, `surrogate_type`, `stored_type`, `file_label_info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared.
137
+ # @!attribute [rw] file_label_info_type
138
+ # @return [::Google::Cloud::Dlp::V2::CustomInfoType::FileLabelInfoType]
139
+ # File label to detect.
140
+ #
141
+ # Note: The following fields are mutually exclusive: `file_label_info_type`, `dictionary`, `regex`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.
137
142
  # @!attribute [rw] detection_rules
138
143
  # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule>]
139
144
  # Set of detection rules to apply to all findings of this CustomInfoType.
@@ -174,9 +179,9 @@ module Google
174
179
  # Dictionary words containing a large number of characters that are not
175
180
  # letters or digits may result in unexpected findings because such characters
176
181
  # are treated as whitespace. The
177
- # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
178
- # contains details about the size limits of dictionaries. For dictionaries
179
- # that do not fit within these constraints, consider using
182
+ # [limits](https://docs.cloud.google.com/sensitive-data-protection/limits)
183
+ # page contains details about the size limits of dictionaries. For
184
+ # dictionaries that do not fit within these constraints, consider using
180
185
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
181
186
  # @!attribute [rw] word_list
182
187
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
@@ -222,7 +227,7 @@ module Google
222
227
 
223
228
  # Message for detecting output from deidentification transformations
224
229
  # such as
225
- # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
230
+ # [`CryptoReplaceFfxFpeConfig`](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
226
231
  # These types of transformations are
227
232
  # those that perform pseudonymization, thereby producing a "surrogate" as
228
233
  # output. This should be used in conjunction with a field on the
@@ -247,6 +252,57 @@ module Google
247
252
  extend ::Google::Protobuf::MessageExts::ClassMethods
248
253
  end
249
254
 
255
+ # Configuration for a custom infoType that detects file labels.
256
+ # @!attribute [rw] sensitivity_label
257
+ # @return [::Google::Cloud::Dlp::V2::CustomInfoType::FileLabelInfoType::SensitivityLabel]
258
+ # Sensitivity labels published by Microsoft.
259
+ #
260
+ # Note: The following fields are mutually exclusive: `sensitivity_label`, `google_drive_label`. If a field in that set is populated, all other fields in the set will automatically be cleared.
261
+ # @!attribute [rw] google_drive_label
262
+ # @return [::Google::Cloud::Dlp::V2::CustomInfoType::FileLabelInfoType::GoogleDriveLabel]
263
+ # Google Drive labels published by Google.
264
+ #
265
+ # Note: The following fields are mutually exclusive: `google_drive_label`, `sensitivity_label`. If a field in that set is populated, all other fields in the set will automatically be cleared.
266
+ class FileLabelInfoType
267
+ include ::Google::Protobuf::MessageExts
268
+ extend ::Google::Protobuf::MessageExts::ClassMethods
269
+
270
+ # Sensitivity labels published by Microsoft.
271
+ # @!attribute [rw] guid
272
+ # @return [::String]
273
+ # The GUID of the sensitivity label.
274
+ class SensitivityLabel
275
+ include ::Google::Protobuf::MessageExts
276
+ extend ::Google::Protobuf::MessageExts::ClassMethods
277
+ end
278
+
279
+ # Google Drive labels published by Google.
280
+ # @!attribute [rw] label_id
281
+ # @return [::String]
282
+ # The [label
283
+ # ID](https://developers.google.com/workspace/drive/labels/guides/overview)
284
+ # of the Google Drive label.
285
+ # @!attribute [rw] label_fields_to_match
286
+ # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType::FileLabelInfoType::GoogleDriveLabel::LabelField>]
287
+ # The field values of the Google Drive label to match.
288
+ class GoogleDriveLabel
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+
292
+ # The field values of the Google Drive label to match.
293
+ # @!attribute [rw] id
294
+ # @return [::String]
295
+ # The identifier of the Label Field.
296
+ # @!attribute [rw] value
297
+ # @return [::String]
298
+ # The value of the Label Field to match.
299
+ class LabelField
300
+ include ::Google::Protobuf::MessageExts
301
+ extend ::Google::Protobuf::MessageExts::ClassMethods
302
+ end
303
+ end
304
+ end
305
+
250
306
  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
251
307
  # `CustomInfoType` to alter behavior under certain circumstances, depending
252
308
  # on the specific details of the rule. Not supported for the `surrogate_type`
@@ -266,7 +322,7 @@ module Google
266
322
  # if you want to modify the likelihood of an entire column of findngs,
267
323
  # set this to 1. For more information, see
268
324
  # [Hotword example: Set the match likelihood of a table column]
269
- # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
325
+ # (https://docs.cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
270
326
  # @!attribute [rw] window_after
271
327
  # @return [::Integer]
272
328
  # Number of characters after the finding to consider.
@@ -318,7 +374,7 @@ module Google
318
374
  # For tabular data, if you want to modify the likelihood of an entire
319
375
  # column of findngs, see
320
376
  # [Hotword example: Set the match likelihood of a table column]
321
- # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
377
+ # (https://docs.cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
322
378
  # @!attribute [rw] likelihood_adjustment
323
379
  # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
324
380
  # Likelihood adjustment to apply to all matching findings.
@@ -460,7 +516,7 @@ module Google
460
516
  # This field can't be set if de-identification is requested. For certain file
461
517
  # types, setting this field has no effect. For more information, see [Limits
462
518
  # on bytes scanned per
463
- # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
519
+ # file](https://docs.cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
464
520
  # @!attribute [rw] bytes_limit_per_file_percent
465
521
  # @return [::Integer]
466
522
  # Max percentage of bytes to scan from a file. The rest are omitted. The
@@ -470,7 +526,7 @@ module Google
470
526
  # This field can't be set if de-identification is requested. For certain file
471
527
  # types, setting this field has no effect. For more information, see [Limits
472
528
  # on bytes scanned per
473
- # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
529
+ # file](https://docs.cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
474
530
  # @!attribute [rw] file_types
475
531
  # @return [::Array<::Google::Cloud::Dlp::V2::FileType>]
476
532
  # List of file type groups to include in the scan.
@@ -576,7 +632,7 @@ module Google
576
632
  # TimespanConfig.
577
633
  #
578
634
  # Caution: A [known
579
- # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling)
635
+ # issue](https://docs.cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling)
580
636
  # is causing the `rowsLimitPercent` field to behave unexpectedly. We
581
637
  # recommend using `rowsLimit` instead.
582
638
  # @!attribute [rw] sample_method
@@ -670,7 +726,7 @@ module Google
670
726
  # `TIMESTAMP`, and `DATETIME`.
671
727
  #
672
728
  # If your BigQuery table is [partitioned at ingestion
673
- # time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
729
+ # time](https://docs.cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
674
730
  # you can use any of the following pseudo-columns as your timestamp field.
675
731
  # When used with Cloud DLP, these pseudo-column names are case sensitive.
676
732
  #
@@ -687,7 +743,7 @@ module Google
687
743
  #
688
744
  # See the
689
745
  # [known
690
- # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan)
746
+ # issue](https://docs.cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan)
691
747
  # related to this operation.
692
748
  # @!attribute [rw] enable_auto_population_of_timespan_config
693
749
  # @return [::Boolean]
@@ -705,7 +761,7 @@ module Google
705
761
  # timestamp will result in skipped rows.
706
762
  #
707
763
  # See the [known
708
- # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data)
764
+ # issue](https://docs.cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data)
709
765
  # related to this operation.
710
766
  class TimespanConfig
711
767
  include ::Google::Protobuf::MessageExts
@@ -952,7 +1008,7 @@ module Google
952
1008
  #
953
1009
  # For more information about each likelihood level
954
1010
  # and how likelihood works, see [Match
955
- # likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood).
1011
+ # likelihood](https://docs.cloud.google.com/sensitive-data-protection/docs/likelihood).
956
1012
  module Likelihood
957
1013
  # Default value; same as POSSIBLE.
958
1014
  LIKELIHOOD_UNSPECIFIED = 0
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -110,14 +110,15 @@ module Google
110
110
  # ) to obtain a formatter capable of generating timestamps in this format.
111
111
  # @!attribute [rw] seconds
112
112
  # @return [::Integer]
113
- # Represents seconds of UTC time since Unix epoch
114
- # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
115
- # 9999-12-31T23:59:59Z inclusive.
113
+ # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
114
+ # be between -315576000000 and 315576000000 inclusive (which corresponds to
115
+ # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
116
116
  # @!attribute [rw] nanos
117
117
  # @return [::Integer]
118
- # Non-negative fractions of a second at nanosecond resolution. Negative
119
- # second values with fractions must still have non-negative nanos values
120
- # that count forward in time. Must be from 0 to 999,999,999
118
+ # Non-negative fractions of a second at nanosecond resolution. This field is
119
+ # the nanosecond portion of the duration, not an alternative to seconds.
120
+ # Negative second values with fractions must still have non-negative nanos
121
+ # values that count forward in time. Must be between 0 and 999,999,999
121
122
  # inclusive.
122
123
  class Timestamp
123
124
  include ::Google::Protobuf::MessageExts
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dlp-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.1
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.3'
18
+ version: '1.6'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '1.3'
25
+ version: '1.6'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: google-cloud-errors
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -51,10 +51,11 @@ dependencies:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.0'
54
- description: Provides methods for detection of privacy-sensitive fragments in text,
55
- images, and Google Cloud Platform storage repositories. Note that google-cloud-dlp-v2
56
- is a version-specific client library. For most uses, we recommend installing the
57
- main client library google-cloud-dlp instead. See the readme for more details.
54
+ description: Discover and protect your sensitive data. A fully managed service designed
55
+ to help you discover, classify, and protect your valuable data assets with ease.
56
+ Note that google-cloud-dlp-v2 is a version-specific client library. For most uses,
57
+ we recommend installing the main client library google-cloud-dlp instead. See the
58
+ readme for more details.
58
59
  email: googleapis-packages@google.com
59
60
  executables: []
60
61
  extensions: []