google-cloud-dlp 0.4.0 → 0.5.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.
@@ -19,34 +19,38 @@ module Google
19
19
  # Type of information detected by the API.
20
20
  # @!attribute [rw] name
21
21
  # @return [String]
22
- # Name of the information type.
22
+ # Name of the information type. Either a name of your choosing when
23
+ # creating a CustomInfoType, or one of the names listed
24
+ # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
25
+ # a built-in type.
23
26
  class InfoType; end
24
27
 
25
28
  # Custom information type provided by the user. Used to find domain-specific
26
29
  # sensitive information configurable to the data in question.
27
30
  # @!attribute [rw] info_type
28
31
  # @return [Google::Privacy::Dlp::V2::InfoType]
29
- # Info type configuration. All custom info types must have configurations
30
- # that do not conflict with built-in info types or other custom info types.
32
+ # All CustomInfoTypes must have a name
33
+ # that does not conflict with built-in InfoTypes or other CustomInfoTypes.
31
34
  # @!attribute [rw] likelihood
32
35
  # @return [Google::Privacy::Dlp::V2::Likelihood]
33
- # Likelihood to return for this custom info type. This base value can be
36
+ # Likelihood to return for this CustomInfoType. This base value can be
34
37
  # altered by a detection rule if the finding meets the criteria specified by
35
38
  # the rule. Defaults to +VERY_LIKELY+ if not specified.
36
39
  # @!attribute [rw] dictionary
37
40
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::Dictionary]
38
- # Dictionary-based custom info type.
41
+ # A list of phrases to detect as a CustomInfoType.
39
42
  # @!attribute [rw] regex
40
43
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::Regex]
41
- # Regex-based custom info type.
44
+ # Regular expression based CustomInfoType.
42
45
  # @!attribute [rw] surrogate_type
43
46
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::SurrogateType]
44
- # Surrogate info type.
47
+ # Message for detecting output from deidentification transformations that
48
+ # support reversing.
45
49
  # @!attribute [rw] detection_rules
46
50
  # @return [Array<Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule>]
47
- # Set of detection rules to apply to all findings of this custom info type.
51
+ # Set of detection rules to apply to all findings of this CustomInfoType.
48
52
  # Rules are applied in order that they are specified. Not supported for the
49
- # +surrogate_type+ custom info type.
53
+ # +surrogate_type+ CustomInfoType.
50
54
  class CustomInfoType
51
55
  # Custom information type based on a dictionary of words or phrases. This can
52
56
  # be used to match sensitive information specific to the data, such as a list
@@ -96,11 +100,11 @@ module Google
96
100
  # These types of transformations are
97
101
  # those that perform pseudonymization, thereby producing a "surrogate" as
98
102
  # output. This should be used in conjunction with a field on the
99
- # transformation such as +surrogate_info_type+. This custom info type does
103
+ # transformation such as +surrogate_info_type+. This CustomInfoType does
100
104
  # not support the use of +detection_rules+.
101
105
  class SurrogateType; end
102
106
 
103
- # Rule for modifying a custom info type to alter behavior under certain
107
+ # Rule for modifying a CustomInfoType to alter behavior under certain
104
108
  # circumstances, depending on the specific details of the rule. Not supported
105
109
  # for the +surrogate_type+ custom info type.
106
110
  # @!attribute [rw] hotword_rule
@@ -134,11 +138,11 @@ module Google
134
138
  # a final likelihood of +LIKELY+.
135
139
  class LikelihoodAdjustment; end
136
140
 
137
- # Detection rule that adjusts the likelihood of findings within a certain
141
+ # The rule that adjusts the likelihood of findings within a certain
138
142
  # proximity of hotwords.
139
143
  # @!attribute [rw] hotword_regex
140
144
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::Regex]
141
- # Regex pattern defining what qualifies as a hotword.
145
+ # Regular expression pattern defining what qualifies as a hotword.
142
146
  # @!attribute [rw] proximity
143
147
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
144
148
  # Proximity of the finding within which the entire hotword must reside.
@@ -205,6 +209,13 @@ module Google
205
209
  # List of file type groups to include in the scan.
206
210
  # If empty, all files are scanned and available data format processors
207
211
  # are applied.
212
+ # @!attribute [rw] sample_method
213
+ # @return [Google::Privacy::Dlp::V2::CloudStorageOptions::SampleMethod]
214
+ # @!attribute [rw] files_limit_percent
215
+ # @return [Integer]
216
+ # Limits the number of files to scan to this percentage of the input FileSet.
217
+ # Number of files scanned is rounded down. Must be between 0 and 100,
218
+ # inclusively. Both 0 and 100 means no limit. Defaults to 0.
208
219
  class CloudStorageOptions
209
220
  # Set of files to scan.
210
221
  # @!attribute [rw] url
@@ -212,9 +223,23 @@ module Google
212
223
  # The url, in the format +gs://<bucket>/<path>+. Trailing wildcard in the
213
224
  # path is allowed.
214
225
  class FileSet; end
226
+
227
+ # How to sample bytes if not all bytes are scanned. Meaningful only when used
228
+ # in conjunction with bytes_limit_per_file. If not specified, scanning would
229
+ # start from the top.
230
+ module SampleMethod
231
+ SAMPLE_METHOD_UNSPECIFIED = 0
232
+
233
+ # Scan from the top (default).
234
+ TOP = 1
235
+
236
+ # For each file larger than bytes_limit_per_file, randomly pick the offset
237
+ # to start scanning. The scanned bytes are contiguous.
238
+ RANDOM_START = 2
239
+ end
215
240
  end
216
241
 
217
- # Message representing a path in Cloud Storage.
242
+ # Message representing a single file or path in Cloud Storage.
218
243
  # @!attribute [rw] path
219
244
  # @return [String]
220
245
  # A url representing a file or path (no wildcards) in Cloud Storage.
@@ -234,7 +259,22 @@ module Google
234
259
  # Max number of rows to scan. If the table has more rows than this value, the
235
260
  # rest of the rows are omitted. If not set, or if set to 0, all rows will be
236
261
  # scanned. Cannot be used in conjunction with TimespanConfig.
237
- class BigQueryOptions; end
262
+ # @!attribute [rw] sample_method
263
+ # @return [Google::Privacy::Dlp::V2::BigQueryOptions::SampleMethod]
264
+ class BigQueryOptions
265
+ # How to sample rows if not all rows are scanned. Meaningful only when used
266
+ # in conjunction with rows_limit. If not specified, scanning would start
267
+ # from the top.
268
+ module SampleMethod
269
+ SAMPLE_METHOD_UNSPECIFIED = 0
270
+
271
+ # Scan from the top (default).
272
+ TOP = 1
273
+
274
+ # Randomly pick the row to start scanning. The scanned rows are contiguous.
275
+ RANDOM_START = 2
276
+ end
277
+ end
238
278
 
239
279
  # Shared message indicating Cloud storage type.
240
280
  # @!attribute [rw] datastore_options
@@ -374,7 +414,7 @@ module Google
374
414
  # Categorization of results based on how likely they are to represent a match,
375
415
  # based on the number of elements they contain which imply a match.
376
416
  module Likelihood
377
- # Default value; information with all likelihoods is included.
417
+ # Default value; same as POSSIBLE.
378
418
  LIKELIHOOD_UNSPECIFIED = 0
379
419
 
380
420
  # Few matching elements.
@@ -47,6 +47,31 @@ module Google
47
47
  #
48
48
  # [Product Documentation]: https://cloud.google.com/dlp
49
49
  #
50
+ # ## Enabling Logging
51
+ #
52
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
53
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
54
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
55
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
56
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
57
+ #
58
+ # Configuring a Ruby stdlib logger:
59
+ #
60
+ # ```ruby
61
+ # require "logger"
62
+ #
63
+ # module MyLogger
64
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
65
+ # def logger
66
+ # LOGGER
67
+ # end
68
+ # end
69
+ #
70
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
71
+ # module GRPC
72
+ # extend MyLogger
73
+ # end
74
+ # ```
50
75
  #
51
76
  module Dlp
52
77
  module V2
@@ -114,6 +114,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
114
114
  optional :parent, :string, 1
115
115
  optional :inspect_config, :message, 2, "google.privacy.dlp.v2.InspectConfig"
116
116
  repeated :image_redaction_configs, :message, 5, "google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig"
117
+ optional :include_findings, :bool, 6
117
118
  optional :byte_item, :message, 7, "google.privacy.dlp.v2.ByteContentItem"
118
119
  end
119
120
  add_message "google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig" do
@@ -131,6 +132,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
131
132
  add_message "google.privacy.dlp.v2.RedactImageResponse" do
132
133
  optional :redacted_image, :bytes, 1
133
134
  optional :extracted_text, :string, 2
135
+ optional :inspect_result, :message, 3, "google.privacy.dlp.v2.InspectResult"
134
136
  end
135
137
  add_message "google.privacy.dlp.v2.DeidentifyContentRequest" do
136
138
  optional :parent, :string, 1
@@ -213,6 +215,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
213
215
  optional :source_table, :message, 2, "google.privacy.dlp.v2.BigQueryTable"
214
216
  repeated :actions, :message, 3, "google.privacy.dlp.v2.Action"
215
217
  end
218
+ add_message "google.privacy.dlp.v2.QuasiId" do
219
+ optional :field, :message, 1, "google.privacy.dlp.v2.FieldId"
220
+ oneof :tag do
221
+ optional :info_type, :message, 2, "google.privacy.dlp.v2.InfoType"
222
+ optional :custom_tag, :string, 3
223
+ optional :inferred, :message, 4, "google.protobuf.Empty"
224
+ end
225
+ end
226
+ add_message "google.privacy.dlp.v2.StatisticalTable" do
227
+ optional :table, :message, 3, "google.privacy.dlp.v2.BigQueryTable"
228
+ repeated :quasi_ids, :message, 1, "google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField"
229
+ optional :relative_frequency, :message, 2, "google.privacy.dlp.v2.FieldId"
230
+ end
231
+ add_message "google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField" do
232
+ optional :field, :message, 1, "google.privacy.dlp.v2.FieldId"
233
+ optional :custom_tag, :string, 2
234
+ end
216
235
  add_message "google.privacy.dlp.v2.PrivacyMetric" do
217
236
  oneof :type do
218
237
  optional :numerical_stats_config, :message, 1, "google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig"
@@ -220,6 +239,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
220
239
  optional :k_anonymity_config, :message, 3, "google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig"
221
240
  optional :l_diversity_config, :message, 4, "google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig"
222
241
  optional :k_map_estimation_config, :message, 5, "google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig"
242
+ optional :delta_presence_estimation_config, :message, 6, "google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig"
223
243
  end
224
244
  end
225
245
  add_message "google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig" do
@@ -258,6 +278,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
258
278
  optional :field, :message, 1, "google.privacy.dlp.v2.FieldId"
259
279
  optional :custom_tag, :string, 2
260
280
  end
281
+ add_message "google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig" do
282
+ repeated :quasi_ids, :message, 1, "google.privacy.dlp.v2.QuasiId"
283
+ optional :region_code, :string, 2
284
+ repeated :auxiliary_tables, :message, 3, "google.privacy.dlp.v2.StatisticalTable"
285
+ end
261
286
  add_message "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails" do
262
287
  optional :requested_privacy_metric, :message, 1, "google.privacy.dlp.v2.PrivacyMetric"
263
288
  optional :requested_source_table, :message, 2, "google.privacy.dlp.v2.BigQueryTable"
@@ -267,6 +292,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
267
292
  optional :k_anonymity_result, :message, 5, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult"
268
293
  optional :l_diversity_result, :message, 6, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult"
269
294
  optional :k_map_estimation_result, :message, 7, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult"
295
+ optional :delta_presence_estimation_result, :message, 9, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult"
270
296
  end
271
297
  end
272
298
  add_message "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult" do
@@ -328,6 +354,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
328
354
  repeated :bucket_values, :message, 6, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues"
329
355
  optional :bucket_value_count, :int64, 7
330
356
  end
357
+ add_message "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult" do
358
+ repeated :delta_presence_estimation_histogram, :message, 1, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket"
359
+ end
360
+ add_message "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues" do
361
+ repeated :quasi_ids_values, :message, 1, "google.privacy.dlp.v2.Value"
362
+ optional :estimated_probability, :double, 2
363
+ end
364
+ add_message "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket" do
365
+ optional :min_probability, :double, 1
366
+ optional :max_probability, :double, 2
367
+ optional :bucket_size, :int64, 5
368
+ repeated :bucket_values, :message, 6, "google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues"
369
+ optional :bucket_value_count, :int64, 7
370
+ end
331
371
  add_message "google.privacy.dlp.v2.ValueFrequency" do
332
372
  optional :value, :message, 1, "google.privacy.dlp.v2.Value"
333
373
  optional :count, :int64, 2
@@ -807,6 +847,9 @@ module Google
807
847
  ListInfoTypesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesRequest").msgclass
808
848
  ListInfoTypesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesResponse").msgclass
809
849
  RiskAnalysisJobConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RiskAnalysisJobConfig").msgclass
850
+ QuasiId = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuasiId").msgclass
851
+ StatisticalTable = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable").msgclass
852
+ StatisticalTable::QuasiIdentifierField = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField").msgclass
810
853
  PrivacyMetric = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric").msgclass
811
854
  PrivacyMetric::NumericalStatsConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig").msgclass
812
855
  PrivacyMetric::CategoricalStatsConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig").msgclass
@@ -816,6 +859,7 @@ module Google
816
859
  PrivacyMetric::KMapEstimationConfig::TaggedField = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField").msgclass
817
860
  PrivacyMetric::KMapEstimationConfig::AuxiliaryTable = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable").msgclass
818
861
  PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField").msgclass
862
+ PrivacyMetric::DeltaPresenceEstimationConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig").msgclass
819
863
  AnalyzeDataSourceRiskDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails").msgclass
820
864
  AnalyzeDataSourceRiskDetails::NumericalStatsResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult").msgclass
821
865
  AnalyzeDataSourceRiskDetails::CategoricalStatsResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult").msgclass
@@ -829,6 +873,9 @@ module Google
829
873
  AnalyzeDataSourceRiskDetails::KMapEstimationResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult").msgclass
830
874
  AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues").msgclass
831
875
  AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket").msgclass
876
+ AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult").msgclass
877
+ AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues").msgclass
878
+ AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket").msgclass
832
879
  ValueFrequency = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ValueFrequency").msgclass
833
880
  Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Value").msgclass
834
881
  QuoteInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuoteInfo").msgclass
@@ -30,6 +30,9 @@ module Google
30
30
  # blocks or images.
31
31
  # The service also includes methods for sensitive data redaction and
32
32
  # scheduling of data scans on Google Cloud Platform based data sets.
33
+ #
34
+ # To learn more about concepts and find how-to guides see
35
+ # https://cloud.google.com/dlp/docs/.
33
36
  class Service
34
37
 
35
38
  include GRPC::GenericService
@@ -40,70 +43,121 @@ module Google
40
43
 
41
44
  # Finds potentially sensitive info in content.
42
45
  # This method has limits on input size, processing time, and output size.
43
- # [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
44
- # images](/dlp/docs/inspecting-images)
46
+ #
47
+ # When no InfoTypes or CustomInfoTypes are specified in this request, the
48
+ # system will automatically choose what detectors to run. By default this may
49
+ # be all types, but may change over time as detectors are updated.
50
+ #
51
+ # For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
52
+ # and https://cloud.google.com/dlp/docs/inspecting-text,
45
53
  rpc :InspectContent, InspectContentRequest, InspectContentResponse
46
54
  # Redacts potentially sensitive info from an image.
47
55
  # This method has limits on input size, processing time, and output size.
48
- # [How-to guide](/dlp/docs/redacting-sensitive-data-images)
56
+ # See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
57
+ # learn more.
58
+ #
59
+ # When no InfoTypes or CustomInfoTypes are specified in this request, the
60
+ # system will automatically choose what detectors to run. By default this may
61
+ # be all types, but may change over time as detectors are updated.
49
62
  rpc :RedactImage, RedactImageRequest, RedactImageResponse
50
63
  # De-identifies potentially sensitive info from a ContentItem.
51
64
  # This method has limits on input size and output size.
52
- # [How-to guide](/dlp/docs/deidentify-sensitive-data)
65
+ # See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
66
+ # learn more.
67
+ #
68
+ # When no InfoTypes or CustomInfoTypes are specified in this request, the
69
+ # system will automatically choose what detectors to run. By default this may
70
+ # be all types, but may change over time as detectors are updated.
53
71
  rpc :DeidentifyContent, DeidentifyContentRequest, DeidentifyContentResponse
54
72
  # Re-identifies content that has been de-identified.
73
+ # See
74
+ # https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
75
+ # to learn more.
55
76
  rpc :ReidentifyContent, ReidentifyContentRequest, ReidentifyContentResponse
56
77
  # Returns a list of the sensitive information types that the DLP API
57
- # supports. For more information, see [Listing supported predefined
58
- # infoTypes](/dlp/docs/listing-infotypes).
78
+ # supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
79
+ # learn more.
59
80
  rpc :ListInfoTypes, ListInfoTypesRequest, ListInfoTypesResponse
60
81
  # Creates an InspectTemplate for re-using frequently used configuration
61
82
  # for inspecting content, images, and storage.
83
+ # See https://cloud.google.com/dlp/docs/creating-templates to learn more.
62
84
  rpc :CreateInspectTemplate, CreateInspectTemplateRequest, InspectTemplate
63
85
  # Updates the InspectTemplate.
86
+ # See https://cloud.google.com/dlp/docs/creating-templates to learn more.
64
87
  rpc :UpdateInspectTemplate, UpdateInspectTemplateRequest, InspectTemplate
65
88
  # Gets an InspectTemplate.
89
+ # See https://cloud.google.com/dlp/docs/creating-templates to learn more.
66
90
  rpc :GetInspectTemplate, GetInspectTemplateRequest, InspectTemplate
67
91
  # Lists InspectTemplates.
92
+ # See https://cloud.google.com/dlp/docs/creating-templates to learn more.
68
93
  rpc :ListInspectTemplates, ListInspectTemplatesRequest, ListInspectTemplatesResponse
69
94
  # Deletes an InspectTemplate.
95
+ # See https://cloud.google.com/dlp/docs/creating-templates to learn more.
70
96
  rpc :DeleteInspectTemplate, DeleteInspectTemplateRequest, Google::Protobuf::Empty
71
97
  # Creates a DeidentifyTemplate for re-using frequently used configuration
72
98
  # for de-identifying content, images, and storage.
99
+ # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
100
+ # more.
73
101
  rpc :CreateDeidentifyTemplate, CreateDeidentifyTemplateRequest, DeidentifyTemplate
74
102
  # Updates the DeidentifyTemplate.
103
+ # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
104
+ # more.
75
105
  rpc :UpdateDeidentifyTemplate, UpdateDeidentifyTemplateRequest, DeidentifyTemplate
76
106
  # Gets a DeidentifyTemplate.
107
+ # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
108
+ # more.
77
109
  rpc :GetDeidentifyTemplate, GetDeidentifyTemplateRequest, DeidentifyTemplate
78
110
  # Lists DeidentifyTemplates.
111
+ # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
112
+ # more.
79
113
  rpc :ListDeidentifyTemplates, ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse
80
114
  # Deletes a DeidentifyTemplate.
115
+ # See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
116
+ # more.
81
117
  rpc :DeleteDeidentifyTemplate, DeleteDeidentifyTemplateRequest, Google::Protobuf::Empty
82
118
  # Creates a job trigger to run DLP actions such as scanning storage for
83
119
  # sensitive information on a set schedule.
120
+ # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
84
121
  rpc :CreateJobTrigger, CreateJobTriggerRequest, JobTrigger
85
122
  # Updates a job trigger.
123
+ # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
86
124
  rpc :UpdateJobTrigger, UpdateJobTriggerRequest, JobTrigger
87
125
  # Gets a job trigger.
126
+ # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
88
127
  rpc :GetJobTrigger, GetJobTriggerRequest, JobTrigger
89
128
  # Lists job triggers.
129
+ # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
90
130
  rpc :ListJobTriggers, ListJobTriggersRequest, ListJobTriggersResponse
91
131
  # Deletes a job trigger.
132
+ # See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
92
133
  rpc :DeleteJobTrigger, DeleteJobTriggerRequest, Google::Protobuf::Empty
93
134
  # Creates a new job to inspect storage or calculate risk metrics.
94
- # [How-to guide](/dlp/docs/compute-risk-analysis).
135
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and
136
+ # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
137
+ #
138
+ # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
139
+ # system will automatically choose what detectors to run. By default this may
140
+ # be all types, but may change over time as detectors are updated.
95
141
  rpc :CreateDlpJob, CreateDlpJobRequest, DlpJob
96
142
  # Lists DlpJobs that match the specified filter in the request.
143
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and
144
+ # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
97
145
  rpc :ListDlpJobs, ListDlpJobsRequest, ListDlpJobsResponse
98
146
  # Gets the latest state of a long-running DlpJob.
147
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and
148
+ # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
99
149
  rpc :GetDlpJob, GetDlpJobRequest, DlpJob
100
150
  # Deletes a long-running DlpJob. This method indicates that the client is
101
151
  # no longer interested in the DlpJob result. The job will be cancelled if
102
152
  # possible.
153
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and
154
+ # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
103
155
  rpc :DeleteDlpJob, DeleteDlpJobRequest, Google::Protobuf::Empty
104
156
  # Starts asynchronous cancellation on a long-running DlpJob. The server
105
157
  # makes a best effort to cancel the DlpJob, but success is not
106
158
  # guaranteed.
159
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and
160
+ # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
107
161
  rpc :CancelDlpJob, CancelDlpJobRequest, Google::Protobuf::Empty
108
162
  end
109
163
 
@@ -71,10 +71,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
71
71
  optional :file_set, :message, 1, "google.privacy.dlp.v2.CloudStorageOptions.FileSet"
72
72
  optional :bytes_limit_per_file, :int64, 4
73
73
  repeated :file_types, :enum, 5, "google.privacy.dlp.v2.FileType"
74
+ optional :sample_method, :enum, 6, "google.privacy.dlp.v2.CloudStorageOptions.SampleMethod"
75
+ optional :files_limit_percent, :int32, 7
74
76
  end
75
77
  add_message "google.privacy.dlp.v2.CloudStorageOptions.FileSet" do
76
78
  optional :url, :string, 1
77
79
  end
80
+ add_enum "google.privacy.dlp.v2.CloudStorageOptions.SampleMethod" do
81
+ value :SAMPLE_METHOD_UNSPECIFIED, 0
82
+ value :TOP, 1
83
+ value :RANDOM_START, 2
84
+ end
78
85
  add_message "google.privacy.dlp.v2.CloudStoragePath" do
79
86
  optional :path, :string, 1
80
87
  end
@@ -82,6 +89,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
82
89
  optional :table_reference, :message, 1, "google.privacy.dlp.v2.BigQueryTable"
83
90
  repeated :identifying_fields, :message, 2, "google.privacy.dlp.v2.FieldId"
84
91
  optional :rows_limit, :int64, 3
92
+ optional :sample_method, :enum, 4, "google.privacy.dlp.v2.BigQueryOptions.SampleMethod"
93
+ end
94
+ add_enum "google.privacy.dlp.v2.BigQueryOptions.SampleMethod" do
95
+ value :SAMPLE_METHOD_UNSPECIFIED, 0
96
+ value :TOP, 1
97
+ value :RANDOM_START, 2
85
98
  end
86
99
  add_message "google.privacy.dlp.v2.StorageConfig" do
87
100
  optional :timespan_config, :message, 6, "google.privacy.dlp.v2.StorageConfig.TimespanConfig"
@@ -164,8 +177,10 @@ module Google
164
177
  DatastoreOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreOptions").msgclass
165
178
  CloudStorageOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass
166
179
  CloudStorageOptions::FileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass
180
+ CloudStorageOptions::SampleMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.SampleMethod").enummodule
167
181
  CloudStoragePath = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStoragePath").msgclass
168
182
  BigQueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions").msgclass
183
+ BigQueryOptions::SampleMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions.SampleMethod").enummodule
169
184
  StorageConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig").msgclass
170
185
  StorageConfig::TimespanConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig.TimespanConfig").msgclass
171
186
  BigQueryKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryKey").msgclass