google-cloud-dlp 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,151 @@
1
+ {
2
+ "interfaces": {
3
+ "google.privacy.dlp.v2.DlpService": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
+ },
11
+ "retry_params": {
12
+ "default": {
13
+ "initial_retry_delay_millis": 100,
14
+ "retry_delay_multiplier": 1.3,
15
+ "max_retry_delay_millis": 60000,
16
+ "initial_rpc_timeout_millis": 20000,
17
+ "rpc_timeout_multiplier": 1.0,
18
+ "max_rpc_timeout_millis": 20000,
19
+ "total_timeout_millis": 600000
20
+ }
21
+ },
22
+ "methods": {
23
+ "InspectContent": {
24
+ "timeout_millis": 300000,
25
+ "retry_codes_name": "idempotent",
26
+ "retry_params_name": "default"
27
+ },
28
+ "RedactImage": {
29
+ "timeout_millis": 300000,
30
+ "retry_codes_name": "idempotent",
31
+ "retry_params_name": "default"
32
+ },
33
+ "DeidentifyContent": {
34
+ "timeout_millis": 300000,
35
+ "retry_codes_name": "idempotent",
36
+ "retry_params_name": "default"
37
+ },
38
+ "ReidentifyContent": {
39
+ "timeout_millis": 300000,
40
+ "retry_codes_name": "idempotent",
41
+ "retry_params_name": "default"
42
+ },
43
+ "ListInfoTypes": {
44
+ "timeout_millis": 300000,
45
+ "retry_codes_name": "idempotent",
46
+ "retry_params_name": "default"
47
+ },
48
+ "CreateInspectTemplate": {
49
+ "timeout_millis": 300000,
50
+ "retry_codes_name": "non_idempotent",
51
+ "retry_params_name": "default"
52
+ },
53
+ "UpdateInspectTemplate": {
54
+ "timeout_millis": 300000,
55
+ "retry_codes_name": "non_idempotent",
56
+ "retry_params_name": "default"
57
+ },
58
+ "GetInspectTemplate": {
59
+ "timeout_millis": 300000,
60
+ "retry_codes_name": "idempotent",
61
+ "retry_params_name": "default"
62
+ },
63
+ "ListInspectTemplates": {
64
+ "timeout_millis": 300000,
65
+ "retry_codes_name": "idempotent",
66
+ "retry_params_name": "default"
67
+ },
68
+ "DeleteInspectTemplate": {
69
+ "timeout_millis": 300000,
70
+ "retry_codes_name": "idempotent",
71
+ "retry_params_name": "default"
72
+ },
73
+ "CreateDeidentifyTemplate": {
74
+ "timeout_millis": 300000,
75
+ "retry_codes_name": "non_idempotent",
76
+ "retry_params_name": "default"
77
+ },
78
+ "UpdateDeidentifyTemplate": {
79
+ "timeout_millis": 300000,
80
+ "retry_codes_name": "non_idempotent",
81
+ "retry_params_name": "default"
82
+ },
83
+ "GetDeidentifyTemplate": {
84
+ "timeout_millis": 300000,
85
+ "retry_codes_name": "idempotent",
86
+ "retry_params_name": "default"
87
+ },
88
+ "ListDeidentifyTemplates": {
89
+ "timeout_millis": 300000,
90
+ "retry_codes_name": "idempotent",
91
+ "retry_params_name": "default"
92
+ },
93
+ "DeleteDeidentifyTemplate": {
94
+ "timeout_millis": 300000,
95
+ "retry_codes_name": "idempotent",
96
+ "retry_params_name": "default"
97
+ },
98
+ "CreateDlpJob": {
99
+ "timeout_millis": 300000,
100
+ "retry_codes_name": "non_idempotent",
101
+ "retry_params_name": "default"
102
+ },
103
+ "ListDlpJobs": {
104
+ "timeout_millis": 300000,
105
+ "retry_codes_name": "idempotent",
106
+ "retry_params_name": "default"
107
+ },
108
+ "GetDlpJob": {
109
+ "timeout_millis": 300000,
110
+ "retry_codes_name": "idempotent",
111
+ "retry_params_name": "default"
112
+ },
113
+ "DeleteDlpJob": {
114
+ "timeout_millis": 300000,
115
+ "retry_codes_name": "idempotent",
116
+ "retry_params_name": "default"
117
+ },
118
+ "CancelDlpJob": {
119
+ "timeout_millis": 300000,
120
+ "retry_codes_name": "non_idempotent",
121
+ "retry_params_name": "default"
122
+ },
123
+ "ListJobTriggers": {
124
+ "timeout_millis": 300000,
125
+ "retry_codes_name": "idempotent",
126
+ "retry_params_name": "default"
127
+ },
128
+ "GetJobTrigger": {
129
+ "timeout_millis": 300000,
130
+ "retry_codes_name": "idempotent",
131
+ "retry_params_name": "default"
132
+ },
133
+ "DeleteJobTrigger": {
134
+ "timeout_millis": 300000,
135
+ "retry_codes_name": "idempotent",
136
+ "retry_params_name": "default"
137
+ },
138
+ "UpdateJobTrigger": {
139
+ "timeout_millis": 300000,
140
+ "retry_codes_name": "non_idempotent",
141
+ "retry_params_name": "default"
142
+ },
143
+ "CreateJobTrigger": {
144
+ "timeout_millis": 300000,
145
+ "retry_codes_name": "non_idempotent",
146
+ "retry_params_name": "default"
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,2068 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Privacy
17
+ module Dlp
18
+ ##
19
+ # # DLP API Contents
20
+ #
21
+ # | Class | Description |
22
+ # | ----- | ----------- |
23
+ # | [DlpServiceClient][] | The DLP API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. |
24
+ # | [Data Types][] | Data types for Google::Cloud::Dlp::V2 |
25
+ #
26
+ # [DlpServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2/dlpserviceclient
27
+ # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2/datatypes
28
+ #
29
+ module V2
30
+ # Configuration description of the scanning process.
31
+ # When used with redactContent only info_types and min_likelihood are currently
32
+ # used.
33
+ # @!attribute [rw] info_types
34
+ # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
35
+ # Restricts what info_types to look for. The values must correspond to
36
+ # InfoType values returned by ListInfoTypes or found in documentation.
37
+ # Empty info_types runs all enabled detectors.
38
+ # @!attribute [rw] min_likelihood
39
+ # @return [Google::Privacy::Dlp::V2::Likelihood]
40
+ # Only returns findings equal or above this threshold. The default is
41
+ # POSSIBLE.
42
+ # @!attribute [rw] limits
43
+ # @return [Google::Privacy::Dlp::V2::InspectConfig::FindingLimits]
44
+ # @!attribute [rw] include_quote
45
+ # @return [true, false]
46
+ # When true, a contextual quote from the data that triggered a finding is
47
+ # included in the response; see Finding.quote.
48
+ # @!attribute [rw] exclude_info_types
49
+ # @return [true, false]
50
+ # When true, excludes type information of the findings.
51
+ # @!attribute [rw] custom_info_types
52
+ # @return [Array<Google::Privacy::Dlp::V2::CustomInfoType>]
53
+ # Custom infoTypes provided by the user.
54
+ # @!attribute [rw] content_options
55
+ # @return [Array<Google::Privacy::Dlp::V2::ContentOption>]
56
+ # List of options defining data content to scan.
57
+ # If empty, text, images, and other content will be included.
58
+ class InspectConfig
59
+ # @!attribute [rw] max_findings_per_item
60
+ # @return [Integer]
61
+ # Max number of findings that will be returned for each item scanned.
62
+ # @!attribute [rw] max_findings_per_request
63
+ # @return [Integer]
64
+ # Max total number of findings that will be returned per request/job.
65
+ # @!attribute [rw] max_findings_per_info_type
66
+ # @return [Array<Google::Privacy::Dlp::V2::InspectConfig::FindingLimits::InfoTypeLimit>]
67
+ # Configuration of findings limit given for specified infoTypes.
68
+ class FindingLimits
69
+ # Max findings configuration per infoType, per content item or long
70
+ # running DlpJob.
71
+ # @!attribute [rw] info_type
72
+ # @return [Google::Privacy::Dlp::V2::InfoType]
73
+ # Type of information the findings limit applies to. Only one limit per
74
+ # info_type should be provided. If InfoTypeLimit does not have an
75
+ # info_type, the DLP API applies the limit against all info_types that
76
+ # are found but not specified in another InfoTypeLimit.
77
+ # @!attribute [rw] max_findings
78
+ # @return [Integer]
79
+ # Max findings limit for the given infoType.
80
+ class InfoTypeLimit; end
81
+ end
82
+ end
83
+
84
+ # Container for bytes to inspect or redact.
85
+ # @!attribute [rw] type
86
+ # @return [Google::Privacy::Dlp::V2::ByteContentItem::BytesType]
87
+ # The type of data stored in the bytes string. Default will be TEXT_UTF8.
88
+ # @!attribute [rw] data
89
+ # @return [String]
90
+ # Content data to inspect or redact.
91
+ class ByteContentItem
92
+ module BytesType
93
+ BYTES_TYPE_UNSPECIFIED = 0
94
+
95
+ IMAGE_JPEG = 1
96
+
97
+ IMAGE_BMP = 2
98
+
99
+ IMAGE_PNG = 3
100
+
101
+ IMAGE_SVG = 4
102
+
103
+ TEXT_UTF8 = 5
104
+ end
105
+ end
106
+
107
+ # Container structure for the content to inspect.
108
+ # @!attribute [rw] value
109
+ # @return [String]
110
+ # String data to inspect or redact.
111
+ # @!attribute [rw] table
112
+ # @return [Google::Privacy::Dlp::V2::Table]
113
+ # Structured content for inspection.
114
+ # @!attribute [rw] byte_item
115
+ # @return [Google::Privacy::Dlp::V2::ByteContentItem]
116
+ # Content data to inspect or redact. Replaces +type+ and +data+.
117
+ class ContentItem; end
118
+
119
+ # Structured content to inspect. Up to 50,000 +Value+s per request allowed.
120
+ # @!attribute [rw] headers
121
+ # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
122
+ # @!attribute [rw] rows
123
+ # @return [Array<Google::Privacy::Dlp::V2::Table::Row>]
124
+ class Table
125
+ # @!attribute [rw] values
126
+ # @return [Array<Google::Privacy::Dlp::V2::Value>]
127
+ class Row; end
128
+ end
129
+
130
+ # All the findings for a single scanned item.
131
+ # @!attribute [rw] findings
132
+ # @return [Array<Google::Privacy::Dlp::V2::Finding>]
133
+ # List of findings for an item.
134
+ # @!attribute [rw] findings_truncated
135
+ # @return [true, false]
136
+ # If true, then this item might have more findings than were returned,
137
+ # and the findings returned are an arbitrary subset of all findings.
138
+ # The findings list might be truncated because the input items were too
139
+ # large, or because the server reached the maximum amount of resources
140
+ # allowed for a single API call. For best results, divide the input into
141
+ # smaller batches.
142
+ class InspectResult; end
143
+
144
+ # Represents a piece of potentially sensitive content.
145
+ # @!attribute [rw] quote
146
+ # @return [String]
147
+ # The content that was found. Even if the content is not textual, it
148
+ # may be converted to a textual representation here.
149
+ # Provided if requested by the +InspectConfig+ and the finding is
150
+ # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
151
+ # in length, the quote may be omitted.
152
+ # @!attribute [rw] info_type
153
+ # @return [Google::Privacy::Dlp::V2::InfoType]
154
+ # The type of content that might have been found.
155
+ # Provided if requested by the +InspectConfig+.
156
+ # @!attribute [rw] likelihood
157
+ # @return [Google::Privacy::Dlp::V2::Likelihood]
158
+ # Estimate of how likely it is that the +info_type+ is correct.
159
+ # @!attribute [rw] location
160
+ # @return [Google::Privacy::Dlp::V2::Location]
161
+ # Where the content was found.
162
+ # @!attribute [rw] create_time
163
+ # @return [Google::Protobuf::Timestamp]
164
+ # Timestamp when finding was detected.
165
+ # @!attribute [rw] quote_info
166
+ # @return [Google::Privacy::Dlp::V2::QuoteInfo]
167
+ # InfoType-dependent details parsed from quote.
168
+ class Finding; end
169
+
170
+ # Specifies the location of the finding.
171
+ # @!attribute [rw] byte_range
172
+ # @return [Google::Privacy::Dlp::V2::Range]
173
+ # Zero-based byte offsets delimiting the finding.
174
+ # These are relative to the finding's containing element.
175
+ # Note that when the content is not textual, this references
176
+ # the UTF-8 encoded textual representation of the content.
177
+ # Omitted if content is an image.
178
+ # @!attribute [rw] codepoint_range
179
+ # @return [Google::Privacy::Dlp::V2::Range]
180
+ # Unicode character offsets delimiting the finding.
181
+ # These are relative to the finding's containing element.
182
+ # Provided when the content is text.
183
+ # @!attribute [rw] content_locations
184
+ # @return [Array<Google::Privacy::Dlp::V2::ContentLocation>]
185
+ # List of nested objects pointing to the precise location of the finding
186
+ # within the file or record.
187
+ class Location; end
188
+
189
+ # Findings container location data.
190
+ # @!attribute [rw] container_name
191
+ # @return [String]
192
+ # Name of the container where the finding is located.
193
+ # The top level name is the source file name or table name. Nested names
194
+ # could be absent if the embedded object has no string identifier
195
+ # (for an example an image contained within a document).
196
+ # @!attribute [rw] record_location
197
+ # @return [Google::Privacy::Dlp::V2::RecordLocation]
198
+ # Location within a row or record of a database table.
199
+ # @!attribute [rw] image_location
200
+ # @return [Google::Privacy::Dlp::V2::ImageLocation]
201
+ # Location within an image's pixels.
202
+ # @!attribute [rw] document_location
203
+ # @return [Google::Privacy::Dlp::V2::DocumentLocation]
204
+ # Location data for document files.
205
+ # @!attribute [rw] container_timestamp
206
+ # @return [Google::Protobuf::Timestamp]
207
+ # Findings container modification timestamp, if applicable.
208
+ # For Google Cloud Storage contains last file modification timestamp.
209
+ # For BigQuery table contains last_modified_time property.
210
+ # For Datastore - not populated.
211
+ # @!attribute [rw] container_version
212
+ # @return [String]
213
+ # Findings container version, if available
214
+ # ("generation" for Google Cloud Storage).
215
+ class ContentLocation; end
216
+
217
+ # Location of a finding within a document.
218
+ # @!attribute [rw] file_offset
219
+ # @return [Integer]
220
+ # Offset of the line, from the beginning of the file, where the finding
221
+ # is located.
222
+ class DocumentLocation; end
223
+
224
+ # Location of a finding within a row or record.
225
+ # @!attribute [rw] record_key
226
+ # @return [Google::Privacy::Dlp::V2::RecordKey]
227
+ # Key of the finding.
228
+ # @!attribute [rw] field_id
229
+ # @return [Google::Privacy::Dlp::V2::FieldId]
230
+ # Field id of the field containing the finding.
231
+ # @!attribute [rw] table_location
232
+ # @return [Google::Privacy::Dlp::V2::TableLocation]
233
+ # Location within a +ContentItem.Table+.
234
+ class RecordLocation; end
235
+
236
+ # Location of a finding within a table.
237
+ # @!attribute [rw] row_index
238
+ # @return [Integer]
239
+ # The zero-based index of the row where the finding is located.
240
+ class TableLocation; end
241
+
242
+ # Generic half-open interval [start, end)
243
+ # @!attribute [rw] start
244
+ # @return [Integer]
245
+ # Index of the first character of the range (inclusive).
246
+ # @!attribute [rw] end
247
+ # @return [Integer]
248
+ # Index of the last character of the range (exclusive).
249
+ class Range; end
250
+
251
+ # Location of the finding within an image.
252
+ # @!attribute [rw] bounding_boxes
253
+ # @return [Array<Google::Privacy::Dlp::V2::BoundingBox>]
254
+ # Bounding boxes locating the pixels within the image containing the finding.
255
+ class ImageLocation; end
256
+
257
+ # Bounding box encompassing detected text within an image.
258
+ # @!attribute [rw] top
259
+ # @return [Integer]
260
+ # Top coordinate of the bounding box. (0,0) is upper left.
261
+ # @!attribute [rw] left
262
+ # @return [Integer]
263
+ # Left coordinate of the bounding box. (0,0) is upper left.
264
+ # @!attribute [rw] width
265
+ # @return [Integer]
266
+ # Width of the bounding box in pixels.
267
+ # @!attribute [rw] height
268
+ # @return [Integer]
269
+ # Height of the bounding box in pixels.
270
+ class BoundingBox; end
271
+
272
+ # Request to search for potentially sensitive info in a list of items
273
+ # and replace it with a default or provided content.
274
+ # @!attribute [rw] parent
275
+ # @return [String]
276
+ # The parent resource name, for example projects/my-project-id.
277
+ # @!attribute [rw] inspect_config
278
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
279
+ # Configuration for the inspector.
280
+ # @!attribute [rw] image_redaction_configs
281
+ # @return [Array<Google::Privacy::Dlp::V2::RedactImageRequest::ImageRedactionConfig>]
282
+ # The configuration for specifying what content to redact from images.
283
+ # @!attribute [rw] byte_item
284
+ # @return [Google::Privacy::Dlp::V2::ByteContentItem]
285
+ # The content must be PNG, JPEG, SVG or BMP.
286
+ class RedactImageRequest
287
+ # Configuration for determining how redaction of images should occur.
288
+ # @!attribute [rw] info_type
289
+ # @return [Google::Privacy::Dlp::V2::InfoType]
290
+ # Only one per info_type should be provided per request. If not
291
+ # specified, and redact_all_text is false, the DLP API will redact all
292
+ # text that it matches against all info_types that are found, but not
293
+ # specified in another ImageRedactionConfig.
294
+ # @!attribute [rw] redact_all_text
295
+ # @return [true, false]
296
+ # If true, all text found in the image, regardless whether it matches an
297
+ # info_type, is redacted.
298
+ # @!attribute [rw] redaction_color
299
+ # @return [Google::Privacy::Dlp::V2::Color]
300
+ # The color to use when redacting content from an image. If not specified,
301
+ # the default is black.
302
+ class ImageRedactionConfig; end
303
+ end
304
+
305
+ # Represents a color in the RGB color space.
306
+ # @!attribute [rw] red
307
+ # @return [Float]
308
+ # The amount of red in the color as a value in the interval [0, 1].
309
+ # @!attribute [rw] green
310
+ # @return [Float]
311
+ # The amount of green in the color as a value in the interval [0, 1].
312
+ # @!attribute [rw] blue
313
+ # @return [Float]
314
+ # The amount of blue in the color as a value in the interval [0, 1].
315
+ class Color; end
316
+
317
+ # Results of redacting an image.
318
+ # @!attribute [rw] redacted_image
319
+ # @return [String]
320
+ # The redacted image. The type will be the same as the original image.
321
+ # @!attribute [rw] extracted_text
322
+ # @return [String]
323
+ # If an image was being inspected and the InspectConfig's include_quote was
324
+ # set to true, then this field will include all text, if any, that was found
325
+ # in the image.
326
+ class RedactImageResponse; end
327
+
328
+ # Request to de-identify a list of items.
329
+ # @!attribute [rw] parent
330
+ # @return [String]
331
+ # The parent resource name, for example projects/my-project-id.
332
+ # @!attribute [rw] deidentify_config
333
+ # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
334
+ # Configuration for the de-identification of the content item.
335
+ # Items specified here will override the template referenced by the
336
+ # deidentify_template_name argument.
337
+ # @!attribute [rw] inspect_config
338
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
339
+ # Configuration for the inspector.
340
+ # Items specified here will override the template referenced by the
341
+ # inspect_template_name argument.
342
+ # @!attribute [rw] item
343
+ # @return [Google::Privacy::Dlp::V2::ContentItem]
344
+ # The item to de-identify. Will be treated as text.
345
+ # @!attribute [rw] inspect_template_name
346
+ # @return [String]
347
+ # Optional template to use. Any configuration directly specified in
348
+ # inspect_config will override those set in the template. Singular fields
349
+ # that are set in this request will replace their corresponding fields in the
350
+ # template. Repeated fields are appended. Singular sub-messages and groups
351
+ # are recursively merged.
352
+ # @!attribute [rw] deidentify_template_name
353
+ # @return [String]
354
+ # Optional template to use. Any configuration directly specified in
355
+ # deidentify_config will override those set in the template. Singular fields
356
+ # that are set in this request will replace their corresponding fields in the
357
+ # template. Repeated fields are appended. Singular sub-messages and groups
358
+ # are recursively merged.
359
+ class DeidentifyContentRequest; end
360
+
361
+ # Results of de-identifying a ContentItem.
362
+ # @!attribute [rw] item
363
+ # @return [Google::Privacy::Dlp::V2::ContentItem]
364
+ # The de-identified item.
365
+ # @!attribute [rw] overview
366
+ # @return [Google::Privacy::Dlp::V2::TransformationOverview]
367
+ # An overview of the changes that were made on the +item+.
368
+ class DeidentifyContentResponse; end
369
+
370
+ # Request to re-identify an item.
371
+ # @!attribute [rw] parent
372
+ # @return [String]
373
+ # The parent resource name.
374
+ # @!attribute [rw] reidentify_config
375
+ # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
376
+ # Configuration for the re-identification of the content item.
377
+ # This field shares the same proto message type that is used for
378
+ # de-identification, however its usage here is for the reversal of the
379
+ # previous de-identification. Re-identification is performed by examining
380
+ # the transformations used to de-identify the items and executing the
381
+ # reverse. This requires that only reversible transformations
382
+ # be provided here. The reversible transformations are:
383
+ #
384
+ # * +CryptoReplaceFfxFpeConfig+
385
+ # @!attribute [rw] inspect_config
386
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
387
+ # Configuration for the inspector.
388
+ # @!attribute [rw] item
389
+ # @return [Google::Privacy::Dlp::V2::ContentItem]
390
+ # The item to re-identify. Will be treated as text.
391
+ # @!attribute [rw] inspect_template_name
392
+ # @return [String]
393
+ # Optional template to use. Any configuration directly specified in
394
+ # +inspect_config+ will override those set in the template. Singular fields
395
+ # that are set in this request will replace their corresponding fields in the
396
+ # template. Repeated fields are appended. Singular sub-messages and groups
397
+ # are recursively merged.
398
+ # @!attribute [rw] reidentify_template_name
399
+ # @return [String]
400
+ # Optional template to use. References an instance of +DeidentifyTemplate+.
401
+ # Any configuration directly specified in +reidentify_config+ or
402
+ # +inspect_config+ will override those set in the template. Singular fields
403
+ # that are set in this request will replace their corresponding fields in the
404
+ # template. Repeated fields are appended. Singular sub-messages and groups
405
+ # are recursively merged.
406
+ class ReidentifyContentRequest; end
407
+
408
+ # Results of re-identifying a item.
409
+ # @!attribute [rw] item
410
+ # @return [Google::Privacy::Dlp::V2::ContentItem]
411
+ # The re-identified item.
412
+ # @!attribute [rw] overview
413
+ # @return [Google::Privacy::Dlp::V2::TransformationOverview]
414
+ # An overview of the changes that were made to the +item+.
415
+ class ReidentifyContentResponse; end
416
+
417
+ # Request to search for potentially sensitive info in a ContentItem.
418
+ # @!attribute [rw] parent
419
+ # @return [String]
420
+ # The parent resource name, for example projects/my-project-id.
421
+ # @!attribute [rw] inspect_config
422
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
423
+ # Configuration for the inspector. What specified here will override
424
+ # the template referenced by the inspect_template_name argument.
425
+ # @!attribute [rw] item
426
+ # @return [Google::Privacy::Dlp::V2::ContentItem]
427
+ # The item to inspect.
428
+ # @!attribute [rw] inspect_template_name
429
+ # @return [String]
430
+ # Optional template to use. Any configuration directly specified in
431
+ # inspect_config will override those set in the template. Singular fields
432
+ # that are set in this request will replace their corresponding fields in the
433
+ # template. Repeated fields are appended. Singular sub-messages and groups
434
+ # are recursively merged.
435
+ class InspectContentRequest; end
436
+
437
+ # Results of inspecting an item.
438
+ # @!attribute [rw] result
439
+ # @return [Google::Privacy::Dlp::V2::InspectResult]
440
+ # The findings.
441
+ class InspectContentResponse; end
442
+
443
+ # Cloud repository for storing output.
444
+ # @!attribute [rw] table
445
+ # @return [Google::Privacy::Dlp::V2::BigQueryTable]
446
+ # Store findings in an existing table or a new table in an existing
447
+ # dataset. Each column in an existing table must have the same name, type,
448
+ # and mode of a field in the +Finding+ object. If table_id is not set a new
449
+ # one will be generated for you with the following format:
450
+ # dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
451
+ # generating the date details.
452
+ # @!attribute [rw] output_schema
453
+ # @return [Google::Privacy::Dlp::V2::OutputStorageConfig::OutputSchema]
454
+ # Schema used for writing the findings. Columns are derived from the
455
+ # +Finding+ object. If appending to an existing table, any columns from the
456
+ # predefined schema that are missing will be added. No columns in the
457
+ # existing table will be deleted.
458
+ #
459
+ # If unspecified, then all available columns will be used for a new table,
460
+ # and no changes will be made to an existing table.
461
+ class OutputStorageConfig
462
+ # Predefined schemas for storing findings.
463
+ module OutputSchema
464
+ OUTPUT_SCHEMA_UNSPECIFIED = 0
465
+
466
+ # Basic schema including only +info_type+, +quote+, +certainty+, and
467
+ # +timestamp+.
468
+ BASIC_COLUMNS = 1
469
+
470
+ # Schema tailored to findings from scanning Google Cloud Storage.
471
+ GCS_COLUMNS = 2
472
+
473
+ # Schema tailored to findings from scanning Google Datastore.
474
+ DATASTORE_COLUMNS = 3
475
+
476
+ # Schema tailored to findings from scanning Google BigQuery.
477
+ BIG_QUERY_COLUMNS = 4
478
+
479
+ # Schema containing all columns.
480
+ ALL_COLUMNS = 5
481
+ end
482
+ end
483
+
484
+ # Statistics regarding a specific InfoType.
485
+ # @!attribute [rw] info_type
486
+ # @return [Google::Privacy::Dlp::V2::InfoType]
487
+ # The type of finding this stat is for.
488
+ # @!attribute [rw] count
489
+ # @return [Integer]
490
+ # Number of findings for this infoType.
491
+ class InfoTypeStats; end
492
+
493
+ # The results of an inspect DataSource job.
494
+ # @!attribute [rw] requested_options
495
+ # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails::RequestedOptions]
496
+ # The configuration used for this job.
497
+ # @!attribute [rw] result
498
+ # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails::Result]
499
+ # A summary of the outcome of this inspect job.
500
+ class InspectDataSourceDetails
501
+ # @!attribute [rw] snapshot_inspect_template
502
+ # @return [Google::Privacy::Dlp::V2::InspectTemplate]
503
+ # If run with an inspect template, a snapshot of it's state at the time of
504
+ # this run.
505
+ # @!attribute [rw] job_config
506
+ # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
507
+ class RequestedOptions; end
508
+
509
+ # @!attribute [rw] processed_bytes
510
+ # @return [Integer]
511
+ # Total size in bytes that were processed.
512
+ # @!attribute [rw] total_estimated_bytes
513
+ # @return [Integer]
514
+ # Estimate of the number of bytes to process.
515
+ # @!attribute [rw] info_type_stats
516
+ # @return [Array<Google::Privacy::Dlp::V2::InfoTypeStats>]
517
+ # Statistics of how many instances of each info type were found during
518
+ # inspect job.
519
+ class Result; end
520
+ end
521
+
522
+ # InfoType description.
523
+ # @!attribute [rw] name
524
+ # @return [String]
525
+ # Internal name of the infoType.
526
+ # @!attribute [rw] display_name
527
+ # @return [String]
528
+ # Human readable form of the infoType name.
529
+ # @!attribute [rw] supported_by
530
+ # @return [Array<Google::Privacy::Dlp::V2::InfoTypeSupportedBy>]
531
+ # Which parts of the API supports this InfoType.
532
+ class InfoTypeDescription; end
533
+
534
+ # Request for the list of infoTypes.
535
+ # @!attribute [rw] language_code
536
+ # @return [String]
537
+ # Optional BCP-47 language code for localized infoType friendly
538
+ # names. If omitted, or if localized strings are not available,
539
+ # en-US strings will be returned.
540
+ # @!attribute [rw] filter
541
+ # @return [String]
542
+ # Optional filter to only return infoTypes supported by certain parts of the
543
+ # API. Defaults to supported_by=INSPECT.
544
+ class ListInfoTypesRequest; end
545
+
546
+ # Response to the ListInfoTypes request.
547
+ # @!attribute [rw] info_types
548
+ # @return [Array<Google::Privacy::Dlp::V2::InfoTypeDescription>]
549
+ # Set of sensitive infoTypes.
550
+ class ListInfoTypesResponse; end
551
+
552
+ # Configuration for a risk analysis job.
553
+ # @!attribute [rw] privacy_metric
554
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric]
555
+ # Privacy metric to compute.
556
+ # @!attribute [rw] source_table
557
+ # @return [Google::Privacy::Dlp::V2::BigQueryTable]
558
+ # Input dataset to compute metrics over.
559
+ # @!attribute [rw] actions
560
+ # @return [Array<Google::Privacy::Dlp::V2::Action>]
561
+ # Actions to execute at the completion of the job. Are executed in the order
562
+ # provided.
563
+ class RiskAnalysisJobConfig; end
564
+
565
+ # Privacy metric to compute for reidentification risk analysis.
566
+ # @!attribute [rw] numerical_stats_config
567
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric::NumericalStatsConfig]
568
+ # @!attribute [rw] categorical_stats_config
569
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric::CategoricalStatsConfig]
570
+ # @!attribute [rw] k_anonymity_config
571
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric::KAnonymityConfig]
572
+ # @!attribute [rw] l_diversity_config
573
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric::LDiversityConfig]
574
+ # @!attribute [rw] k_map_estimation_config
575
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig]
576
+ class PrivacyMetric
577
+ # Compute numerical stats over an individual column, including
578
+ # min, max, and quantiles.
579
+ # @!attribute [rw] field
580
+ # @return [Google::Privacy::Dlp::V2::FieldId]
581
+ # Field to compute numerical stats on. Supported types are
582
+ # integer, float, date, datetime, timestamp, time.
583
+ class NumericalStatsConfig; end
584
+
585
+ # Compute numerical stats over an individual column, including
586
+ # number of distinct values and value count distribution.
587
+ # @!attribute [rw] field
588
+ # @return [Google::Privacy::Dlp::V2::FieldId]
589
+ # Field to compute categorical stats on. All column types are
590
+ # supported except for arrays and structs. However, it may be more
591
+ # informative to use NumericalStats when the field type is supported,
592
+ # depending on the data.
593
+ class CategoricalStatsConfig; end
594
+
595
+ # k-anonymity metric, used for analysis of reidentification risk.
596
+ # @!attribute [rw] quasi_ids
597
+ # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
598
+ # Set of fields to compute k-anonymity over. When multiple fields are
599
+ # specified, they are considered a single composite key. Structs and
600
+ # repeated data types are not supported; however, nested fields are
601
+ # supported so long as they are not structs themselves or nested within
602
+ # a repeated field.
603
+ class KAnonymityConfig; end
604
+
605
+ # l-diversity metric, used for analysis of reidentification risk.
606
+ # @!attribute [rw] quasi_ids
607
+ # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
608
+ # Set of quasi-identifiers indicating how equivalence classes are
609
+ # defined for the l-diversity computation. When multiple fields are
610
+ # specified, they are considered a single composite key.
611
+ # @!attribute [rw] sensitive_attribute
612
+ # @return [Google::Privacy::Dlp::V2::FieldId]
613
+ # Sensitive field for computing the l-value.
614
+ class LDiversityConfig; end
615
+
616
+ # Reidentifiability metric. This corresponds to a risk model similar to what
617
+ # is called "journalist risk" in the literature, except the attack dataset is
618
+ # statistically modeled instead of being perfectly known. This can be done
619
+ # using publicly available data (like the US Census), or using a custom
620
+ # statistical model (indicated as one or several BigQuery tables), or by
621
+ # extrapolating from the distribution of values in the input dataset.
622
+ # @!attribute [rw] quasi_ids
623
+ # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
624
+ # Fields considered to be quasi-identifiers. No two columns can have the
625
+ # same tag. [required]
626
+ # @!attribute [rw] region_code
627
+ # @return [String]
628
+ # ISO 3166-1 alpha-2 region code to use in the statistical modeling.
629
+ # Required if no column is tagged with a region-specific InfoType (like
630
+ # US_ZIP_5) or a region code.
631
+ # @!attribute [rw] auxiliary_tables
632
+ # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
633
+ # Several auxiliary tables can be used in the analysis. Each custom_tag
634
+ # used to tag a quasi-identifiers column must appear in exactly one column
635
+ # of one auxiliary table.
636
+ class KMapEstimationConfig
637
+ # A column with a semantic tag attached.
638
+ # @!attribute [rw] field
639
+ # @return [Google::Privacy::Dlp::V2::FieldId]
640
+ # Identifies the column. [required]
641
+ # @!attribute [rw] info_type
642
+ # @return [Google::Privacy::Dlp::V2::InfoType]
643
+ # A column can be tagged with a InfoType to use the relevant public
644
+ # dataset as a statistical model of population, if available. We
645
+ # currently support US ZIP codes, region codes, ages and genders.
646
+ # To programmatically obtain the list of supported InfoTypes, use
647
+ # ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
648
+ # @!attribute [rw] custom_tag
649
+ # @return [String]
650
+ # A column can be tagged with a custom tag. In this case, the user must
651
+ # indicate an auxiliary table that contains statistical information on
652
+ # the possible values of this column (below).
653
+ # @!attribute [rw] inferred
654
+ # @return [Google::Protobuf::Empty]
655
+ # If no semantic tag is indicated, we infer the statistical model from
656
+ # the distribution of values in the input data
657
+ class TaggedField; end
658
+
659
+ # An auxiliary table contains statistical information on the relative
660
+ # frequency of different quasi-identifiers values. It has one or several
661
+ # quasi-identifiers columns, and one column that indicates the relative
662
+ # frequency of each quasi-identifier tuple.
663
+ # If a tuple is present in the data but not in the auxiliary table, the
664
+ # corresponding relative frequency is assumed to be zero (and thus, the
665
+ # tuple is highly reidentifiable).
666
+ # @!attribute [rw] table
667
+ # @return [Google::Privacy::Dlp::V2::BigQueryTable]
668
+ # Auxiliary table location. [required]
669
+ # @!attribute [rw] quasi_ids
670
+ # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
671
+ # Quasi-identifier columns. [required]
672
+ # @!attribute [rw] relative_frequency
673
+ # @return [Google::Privacy::Dlp::V2::FieldId]
674
+ # The relative frequency column must contain a floating-point number
675
+ # between 0 and 1 (inclusive). Null values are assumed to be zero.
676
+ # [required]
677
+ class AuxiliaryTable
678
+ # A quasi-identifier column has a custom_tag, used to know which column
679
+ # in the data corresponds to which column in the statistical model.
680
+ # @!attribute [rw] field
681
+ # @return [Google::Privacy::Dlp::V2::FieldId]
682
+ # @!attribute [rw] custom_tag
683
+ # @return [String]
684
+ class QuasiIdField; end
685
+ end
686
+ end
687
+ end
688
+
689
+ # Result of a risk analysis operation request.
690
+ # @!attribute [rw] requested_privacy_metric
691
+ # @return [Google::Privacy::Dlp::V2::PrivacyMetric]
692
+ # Privacy metric to compute.
693
+ # @!attribute [rw] requested_source_table
694
+ # @return [Google::Privacy::Dlp::V2::BigQueryTable]
695
+ # Input dataset to compute metrics over.
696
+ # @!attribute [rw] numerical_stats_result
697
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::NumericalStatsResult]
698
+ # @!attribute [rw] categorical_stats_result
699
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult]
700
+ # @!attribute [rw] k_anonymity_result
701
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult]
702
+ # @!attribute [rw] l_diversity_result
703
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult]
704
+ # @!attribute [rw] k_map_estimation_result
705
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult]
706
+ class AnalyzeDataSourceRiskDetails
707
+ # Result of the numerical stats computation.
708
+ # @!attribute [rw] min_value
709
+ # @return [Google::Privacy::Dlp::V2::Value]
710
+ # Minimum value appearing in the column.
711
+ # @!attribute [rw] max_value
712
+ # @return [Google::Privacy::Dlp::V2::Value]
713
+ # Maximum value appearing in the column.
714
+ # @!attribute [rw] quantile_values
715
+ # @return [Array<Google::Privacy::Dlp::V2::Value>]
716
+ # List of 99 values that partition the set of field values into 100 equal
717
+ # sized buckets.
718
+ class NumericalStatsResult; end
719
+
720
+ # Result of the categorical stats computation.
721
+ # @!attribute [rw] value_frequency_histogram_buckets
722
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket>]
723
+ # Histogram of value frequencies in the column.
724
+ class CategoricalStatsResult
725
+ # @!attribute [rw] value_frequency_lower_bound
726
+ # @return [Integer]
727
+ # Lower bound on the value frequency of the values in this bucket.
728
+ # @!attribute [rw] value_frequency_upper_bound
729
+ # @return [Integer]
730
+ # Upper bound on the value frequency of the values in this bucket.
731
+ # @!attribute [rw] bucket_size
732
+ # @return [Integer]
733
+ # Total number of values in this bucket.
734
+ # @!attribute [rw] bucket_values
735
+ # @return [Array<Google::Privacy::Dlp::V2::ValueFrequency>]
736
+ # Sample of value frequencies in this bucket. The total number of
737
+ # values returned per bucket is capped at 20.
738
+ class CategoricalStatsHistogramBucket; end
739
+ end
740
+
741
+ # Result of the k-anonymity computation.
742
+ # @!attribute [rw] equivalence_class_histogram_buckets
743
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket>]
744
+ # Histogram of k-anonymity equivalence classes.
745
+ class KAnonymityResult
746
+ # The set of columns' values that share the same ldiversity value
747
+ # @!attribute [rw] quasi_ids_values
748
+ # @return [Array<Google::Privacy::Dlp::V2::Value>]
749
+ # Set of values defining the equivalence class. One value per
750
+ # quasi-identifier column in the original KAnonymity metric message.
751
+ # The order is always the same as the original request.
752
+ # @!attribute [rw] equivalence_class_size
753
+ # @return [Integer]
754
+ # Size of the equivalence class, for example number of rows with the
755
+ # above set of values.
756
+ class KAnonymityEquivalenceClass; end
757
+
758
+ # @!attribute [rw] equivalence_class_size_lower_bound
759
+ # @return [Integer]
760
+ # Lower bound on the size of the equivalence classes in this bucket.
761
+ # @!attribute [rw] equivalence_class_size_upper_bound
762
+ # @return [Integer]
763
+ # Upper bound on the size of the equivalence classes in this bucket.
764
+ # @!attribute [rw] bucket_size
765
+ # @return [Integer]
766
+ # Total number of equivalence classes in this bucket.
767
+ # @!attribute [rw] bucket_values
768
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass>]
769
+ # Sample of equivalence classes in this bucket. The total number of
770
+ # classes returned per bucket is capped at 20.
771
+ class KAnonymityHistogramBucket; end
772
+ end
773
+
774
+ # Result of the l-diversity computation.
775
+ # @!attribute [rw] sensitive_value_frequency_histogram_buckets
776
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket>]
777
+ # Histogram of l-diversity equivalence class sensitive value frequencies.
778
+ class LDiversityResult
779
+ # The set of columns' values that share the same ldiversity value.
780
+ # @!attribute [rw] quasi_ids_values
781
+ # @return [Array<Google::Privacy::Dlp::V2::Value>]
782
+ # Quasi-identifier values defining the k-anonymity equivalence
783
+ # class. The order is always the same as the original request.
784
+ # @!attribute [rw] equivalence_class_size
785
+ # @return [Integer]
786
+ # Size of the k-anonymity equivalence class.
787
+ # @!attribute [rw] num_distinct_sensitive_values
788
+ # @return [Integer]
789
+ # Number of distinct sensitive values in this equivalence class.
790
+ # @!attribute [rw] top_sensitive_values
791
+ # @return [Array<Google::Privacy::Dlp::V2::ValueFrequency>]
792
+ # Estimated frequencies of top sensitive values.
793
+ class LDiversityEquivalenceClass; end
794
+
795
+ # @!attribute [rw] sensitive_value_frequency_lower_bound
796
+ # @return [Integer]
797
+ # Lower bound on the sensitive value frequencies of the equivalence
798
+ # classes in this bucket.
799
+ # @!attribute [rw] sensitive_value_frequency_upper_bound
800
+ # @return [Integer]
801
+ # Upper bound on the sensitive value frequencies of the equivalence
802
+ # classes in this bucket.
803
+ # @!attribute [rw] bucket_size
804
+ # @return [Integer]
805
+ # Total number of equivalence classes in this bucket.
806
+ # @!attribute [rw] bucket_values
807
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass>]
808
+ # Sample of equivalence classes in this bucket. The total number of
809
+ # classes returned per bucket is capped at 20.
810
+ class LDiversityHistogramBucket; end
811
+ end
812
+
813
+ # Result of the reidentifiability analysis. Note that these results are an
814
+ # estimation, not exact values.
815
+ # @!attribute [rw] k_map_estimation_histogram
816
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket>]
817
+ # The intervals [min_anonymity, max_anonymity] do not overlap. If a value
818
+ # doesn't correspond to any such interval, the associated frequency is
819
+ # zero. For example, the following records:
820
+ # {min_anonymity: 1, max_anonymity: 1, frequency: 17}
821
+ # {min_anonymity: 2, max_anonymity: 3, frequency: 42}
822
+ # {min_anonymity: 5, max_anonymity: 10, frequency: 99}
823
+ # mean that there are no record with an estimated anonymity of 4, 5, or
824
+ # larger than 10.
825
+ class KMapEstimationResult
826
+ # A tuple of values for the quasi-identifier columns.
827
+ # @!attribute [rw] quasi_ids_values
828
+ # @return [Array<Google::Privacy::Dlp::V2::Value>]
829
+ # The quasi-identifier values.
830
+ # @!attribute [rw] estimated_anonymity
831
+ # @return [Integer]
832
+ # The estimated anonymity for these quasi-identifier values.
833
+ class KMapEstimationQuasiIdValues; end
834
+
835
+ # A KMapEstimationHistogramBucket message with the following values:
836
+ # min_anonymity: 3
837
+ # max_anonymity: 5
838
+ # frequency: 42
839
+ # means that there are 42 records whose quasi-identifier values correspond
840
+ # to 3, 4 or 5 people in the overlying population. An important particular
841
+ # case is when min_anonymity = max_anonymity = 1: the frequency field then
842
+ # corresponds to the number of uniquely identifiable records.
843
+ # @!attribute [rw] min_anonymity
844
+ # @return [Integer]
845
+ # Always positive.
846
+ # @!attribute [rw] max_anonymity
847
+ # @return [Integer]
848
+ # Always greater than or equal to min_anonymity.
849
+ # @!attribute [rw] bucket_size
850
+ # @return [Integer]
851
+ # Number of records within these anonymity bounds.
852
+ # @!attribute [rw] bucket_values
853
+ # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues>]
854
+ # Sample of quasi-identifier tuple values in this bucket. The total
855
+ # number of classes returned per bucket is capped at 20.
856
+ class KMapEstimationHistogramBucket; end
857
+ end
858
+ end
859
+
860
+ # A value of a field, including its frequency.
861
+ # @!attribute [rw] value
862
+ # @return [Google::Privacy::Dlp::V2::Value]
863
+ # A value contained in the field in question.
864
+ # @!attribute [rw] count
865
+ # @return [Integer]
866
+ # How many times the value is contained in the field.
867
+ class ValueFrequency; end
868
+
869
+ # Set of primitive values supported by the system.
870
+ # Note that for the purposes of inspection or transformation, the number
871
+ # of bytes considered to comprise a 'Value' is based on its representation
872
+ # as a UTF-8 encoded string. For example, if 'integer_value' is set to
873
+ # 123456789, the number of bytes would be counted as 9, even though an
874
+ # int64 only holds up to 8 bytes of data.
875
+ # @!attribute [rw] integer_value
876
+ # @return [Integer]
877
+ # @!attribute [rw] float_value
878
+ # @return [Float]
879
+ # @!attribute [rw] string_value
880
+ # @return [String]
881
+ # @!attribute [rw] boolean_value
882
+ # @return [true, false]
883
+ # @!attribute [rw] timestamp_value
884
+ # @return [Google::Protobuf::Timestamp]
885
+ # @!attribute [rw] time_value
886
+ # @return [Google::Type::TimeOfDay]
887
+ # @!attribute [rw] date_value
888
+ # @return [Google::Type::Date]
889
+ # @!attribute [rw] day_of_week_value
890
+ # @return [Google::Type::DayOfWeek]
891
+ class Value; end
892
+
893
+ # Message for infoType-dependent details parsed from quote.
894
+ # @!attribute [rw] date_time
895
+ # @return [Google::Privacy::Dlp::V2::DateTime]
896
+ class QuoteInfo; end
897
+
898
+ # Message for a date time object.
899
+ # @!attribute [rw] date
900
+ # @return [Google::Type::Date]
901
+ # One or more of the following must be set. All fields are optional, but
902
+ # when set must be valid date or time values.
903
+ # @!attribute [rw] day_of_week
904
+ # @return [Google::Type::DayOfWeek]
905
+ # @!attribute [rw] time
906
+ # @return [Google::Type::TimeOfDay]
907
+ # @!attribute [rw] time_zone
908
+ # @return [Google::Privacy::Dlp::V2::DateTime::TimeZone]
909
+ class DateTime
910
+ # @!attribute [rw] offset_minutes
911
+ # @return [Integer]
912
+ # Set only if the offset can be determined. Positive for time ahead of UTC.
913
+ # E.g. For "UTC-9", this value is -540.
914
+ class TimeZone; end
915
+ end
916
+
917
+ # The configuration that controls how the data will change.
918
+ # @!attribute [rw] info_type_transformations
919
+ # @return [Google::Privacy::Dlp::V2::InfoTypeTransformations]
920
+ # Treat the dataset as free-form text and apply the same free text
921
+ # transformation everywhere.
922
+ # @!attribute [rw] record_transformations
923
+ # @return [Google::Privacy::Dlp::V2::RecordTransformations]
924
+ # Treat the dataset as structured. Transformations can be applied to
925
+ # specific locations within structured datasets, such as transforming
926
+ # a column within a table.
927
+ class DeidentifyConfig; end
928
+
929
+ # A rule for transforming a value.
930
+ # @!attribute [rw] replace_config
931
+ # @return [Google::Privacy::Dlp::V2::ReplaceValueConfig]
932
+ # @!attribute [rw] redact_config
933
+ # @return [Google::Privacy::Dlp::V2::RedactConfig]
934
+ # @!attribute [rw] character_mask_config
935
+ # @return [Google::Privacy::Dlp::V2::CharacterMaskConfig]
936
+ # @!attribute [rw] crypto_replace_ffx_fpe_config
937
+ # @return [Google::Privacy::Dlp::V2::CryptoReplaceFfxFpeConfig]
938
+ # @!attribute [rw] fixed_size_bucketing_config
939
+ # @return [Google::Privacy::Dlp::V2::FixedSizeBucketingConfig]
940
+ # @!attribute [rw] bucketing_config
941
+ # @return [Google::Privacy::Dlp::V2::BucketingConfig]
942
+ # @!attribute [rw] replace_with_info_type_config
943
+ # @return [Google::Privacy::Dlp::V2::ReplaceWithInfoTypeConfig]
944
+ # @!attribute [rw] time_part_config
945
+ # @return [Google::Privacy::Dlp::V2::TimePartConfig]
946
+ # @!attribute [rw] crypto_hash_config
947
+ # @return [Google::Privacy::Dlp::V2::CryptoHashConfig]
948
+ # @!attribute [rw] date_shift_config
949
+ # @return [Google::Privacy::Dlp::V2::DateShiftConfig]
950
+ class PrimitiveTransformation; end
951
+
952
+ # For use with +Date+, +Timestamp+, and +TimeOfDay+, extract or preserve a
953
+ # portion of the value.
954
+ # @!attribute [rw] part_to_extract
955
+ # @return [Google::Privacy::Dlp::V2::TimePartConfig::TimePart]
956
+ class TimePartConfig
957
+ module TimePart
958
+ TIME_PART_UNSPECIFIED = 0
959
+
960
+ # [0-9999]
961
+ YEAR = 1
962
+
963
+ # [1-12]
964
+ MONTH = 2
965
+
966
+ # [1-31]
967
+ DAY_OF_MONTH = 3
968
+
969
+ # [1-7]
970
+ DAY_OF_WEEK = 4
971
+
972
+ # [1-52]
973
+ WEEK_OF_YEAR = 5
974
+
975
+ # [0-23]
976
+ HOUR_OF_DAY = 6
977
+ end
978
+ end
979
+
980
+ # Pseudonymization method that generates surrogates via cryptographic hashing.
981
+ # Uses SHA-256.
982
+ # The key size must be either 32 or 64 bytes.
983
+ # Outputs a 32 byte digest as an uppercase hex string
984
+ # (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
985
+ # Currently, only string and integer values can be hashed.
986
+ # @!attribute [rw] crypto_key
987
+ # @return [Google::Privacy::Dlp::V2::CryptoKey]
988
+ # The key used by the hash function.
989
+ class CryptoHashConfig; end
990
+
991
+ # Replace each input value with a given +Value+.
992
+ # @!attribute [rw] new_value
993
+ # @return [Google::Privacy::Dlp::V2::Value]
994
+ # Value to replace it with.
995
+ class ReplaceValueConfig; end
996
+
997
+ # Replace each matching finding with the name of the info_type.
998
+ class ReplaceWithInfoTypeConfig; end
999
+
1000
+ # Redact a given value. For example, if used with an +InfoTypeTransformation+
1001
+ # transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
1002
+ # output would be 'My phone number is '.
1003
+ class RedactConfig; end
1004
+
1005
+ # Characters to skip when doing deidentification of a value. These will be left
1006
+ # alone and skipped.
1007
+ # @!attribute [rw] characters_to_skip
1008
+ # @return [String]
1009
+ # @!attribute [rw] common_characters_to_ignore
1010
+ # @return [Google::Privacy::Dlp::V2::CharsToIgnore::CommonCharsToIgnore]
1011
+ class CharsToIgnore
1012
+ module CommonCharsToIgnore
1013
+ COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0
1014
+
1015
+ # 0-9
1016
+ NUMERIC = 1
1017
+
1018
+ # A-Z
1019
+ ALPHA_UPPER_CASE = 2
1020
+
1021
+ # a-z
1022
+ ALPHA_LOWER_CASE = 3
1023
+
1024
+ # US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_+{|}~
1025
+ PUNCTUATION = 4
1026
+
1027
+ # Whitespace character, one of [ \t\n\x0B\f\r]
1028
+ WHITESPACE = 5
1029
+ end
1030
+ end
1031
+
1032
+ # Partially mask a string by replacing a given number of characters with a
1033
+ # fixed character. Masking can start from the beginning or end of the string.
1034
+ # This can be used on data of any type (numbers, longs, and so on) and when
1035
+ # de-identifying structured data we'll attempt to preserve the original data's
1036
+ # type. (This allows you to take a long like 123 and modify it to a string like
1037
+ # **3.
1038
+ # @!attribute [rw] masking_character
1039
+ # @return [String]
1040
+ # Character to mask the sensitive values&mdash;for example, "*" for an
1041
+ # alphabetic string such as name, or "0" for a numeric string such as ZIP
1042
+ # code or credit card number. String must have length 1. If not supplied, we
1043
+ # will default to "*" for strings, 0 for digits.
1044
+ # @!attribute [rw] number_to_mask
1045
+ # @return [Integer]
1046
+ # Number of characters to mask. If not set, all matching chars will be
1047
+ # masked. Skipped characters do not count towards this tally.
1048
+ # @!attribute [rw] reverse_order
1049
+ # @return [true, false]
1050
+ # Mask characters in reverse order. For example, if +masking_character+ is
1051
+ # '0', number_to_mask is 14, and +reverse_order+ is false, then
1052
+ # 1234-5678-9012-3456 -> 00000000000000-3456
1053
+ # If +masking_character+ is '*', +number_to_mask+ is 3, and +reverse_order+
1054
+ # is true, then 12345 -> 12***
1055
+ # @!attribute [rw] characters_to_ignore
1056
+ # @return [Array<Google::Privacy::Dlp::V2::CharsToIgnore>]
1057
+ # When masking a string, items in this list will be skipped when replacing.
1058
+ # For example, if your string is 555-555-5555 and you ask us to skip +-+ and
1059
+ # mask 5 chars with * we would produce ***-*55-5555.
1060
+ class CharacterMaskConfig; end
1061
+
1062
+ # Buckets values based on fixed size ranges. The
1063
+ # Bucketing transformation can provide all of this functionality,
1064
+ # but requires more configuration. This message is provided as a convenience to
1065
+ # the user for simple bucketing strategies.
1066
+ #
1067
+ # The transformed value will be a hyphenated string of
1068
+ # <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound = 20
1069
+ # all values that are within this bucket will be replaced with "10-20".
1070
+ #
1071
+ # This can be used on data of type: double, long.
1072
+ #
1073
+ # If the bound Value type differs from the type of data
1074
+ # being transformed, we will first attempt converting the type of the data to
1075
+ # be transformed to match the type of the bound before comparing.
1076
+ # @!attribute [rw] lower_bound
1077
+ # @return [Google::Privacy::Dlp::V2::Value]
1078
+ # Lower bound value of buckets. All values less than +lower_bound+ are
1079
+ # grouped together into a single bucket; for example if +lower_bound+ = 10,
1080
+ # then all values less than 10 are replaced with the value “-10”. [Required].
1081
+ # @!attribute [rw] upper_bound
1082
+ # @return [Google::Privacy::Dlp::V2::Value]
1083
+ # Upper bound value of buckets. All values greater than upper_bound are
1084
+ # grouped together into a single bucket; for example if +upper_bound+ = 89,
1085
+ # then all values greater than 89 are replaced with the value “89+”.
1086
+ # [Required].
1087
+ # @!attribute [rw] bucket_size
1088
+ # @return [Float]
1089
+ # Size of each bucket (except for minimum and maximum buckets). So if
1090
+ # +lower_bound+ = 10, +upper_bound+ = 89, and +bucket_size+ = 10, then the
1091
+ # following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
1092
+ # 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required].
1093
+ class FixedSizeBucketingConfig; end
1094
+
1095
+ # Generalization function that buckets values based on ranges. The ranges and
1096
+ # replacement values are dynamically provided by the user for custom behavior,
1097
+ # such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
1098
+ # This can be used on
1099
+ # data of type: number, long, string, timestamp.
1100
+ # If the bound +Value+ type differs from the type of data being transformed, we
1101
+ # will first attempt converting the type of the data to be transformed to match
1102
+ # the type of the bound before comparing.
1103
+ # @!attribute [rw] buckets
1104
+ # @return [Array<Google::Privacy::Dlp::V2::BucketingConfig::Bucket>]
1105
+ # Set of buckets. Ranges must be non-overlapping.
1106
+ class BucketingConfig
1107
+ # Bucket is represented as a range, along with replacement values.
1108
+ # @!attribute [rw] min
1109
+ # @return [Google::Privacy::Dlp::V2::Value]
1110
+ # Lower bound of the range, inclusive. Type should be the same as max if
1111
+ # used.
1112
+ # @!attribute [rw] max
1113
+ # @return [Google::Privacy::Dlp::V2::Value]
1114
+ # Upper bound of the range, exclusive; type must match min.
1115
+ # @!attribute [rw] replacement_value
1116
+ # @return [Google::Privacy::Dlp::V2::Value]
1117
+ # Replacement value for this bucket. If not provided
1118
+ # the default behavior will be to hyphenate the min-max range.
1119
+ class Bucket; end
1120
+ end
1121
+
1122
+ # Replaces an identifier with a surrogate using FPE with the FFX
1123
+ # mode of operation; however when used in the +ReidentifyContent+ API method,
1124
+ # it serves the opposite function by reversing the surrogate back into
1125
+ # the original identifier.
1126
+ # The identifier must be encoded as ASCII.
1127
+ # For a given crypto key and context, the same identifier will be
1128
+ # replaced with the same surrogate.
1129
+ # Identifiers must be at least two characters long.
1130
+ # In the case that the identifier is the empty string, it will be skipped.
1131
+ # @!attribute [rw] crypto_key
1132
+ # @return [Google::Privacy::Dlp::V2::CryptoKey]
1133
+ # The key used by the encryption algorithm. [required]
1134
+ # @!attribute [rw] context
1135
+ # @return [Google::Privacy::Dlp::V2::FieldId]
1136
+ # The 'tweak', a context may be used for higher security since the same
1137
+ # identifier in two different contexts won't be given the same surrogate. If
1138
+ # the context is not set, a default tweak will be used.
1139
+ #
1140
+ # If the context is set but:
1141
+ #
1142
+ # 1. there is no record present when transforming a given value or
1143
+ # 1. the field is not present when transforming a given value,
1144
+ #
1145
+ # a default tweak will be used.
1146
+ #
1147
+ # Note that case (1) is expected when an +InfoTypeTransformation+ is
1148
+ # applied to both structured and non-structured +ContentItem+s.
1149
+ # Currently, the referenced field may be of value type integer or string.
1150
+ #
1151
+ # The tweak is constructed as a sequence of bytes in big endian byte order
1152
+ # such that:
1153
+ #
1154
+ # * a 64 bit integer is encoded followed by a single byte of value 1
1155
+ # * a string is encoded in UTF-8 format followed by a single byte of value
1156
+ # å 2
1157
+ # @!attribute [rw] common_alphabet
1158
+ # @return [Google::Privacy::Dlp::V2::CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet]
1159
+ # @!attribute [rw] custom_alphabet
1160
+ # @return [String]
1161
+ # This is supported by mapping these to the alphanumeric characters
1162
+ # that the FFX mode natively supports. This happens before/after
1163
+ # encryption/decryption.
1164
+ # Each character listed must appear only once.
1165
+ # Number of characters must be in the range [2, 62].
1166
+ # This must be encoded as ASCII.
1167
+ # The order of characters does not matter.
1168
+ # @!attribute [rw] radix
1169
+ # @return [Integer]
1170
+ # The native way to select the alphabet. Must be in the range [2, 62].
1171
+ # @!attribute [rw] surrogate_info_type
1172
+ # @return [Google::Privacy::Dlp::V2::InfoType]
1173
+ # The custom infoType to annotate the surrogate with.
1174
+ # This annotation will be applied to the surrogate by prefixing it with
1175
+ # the name of the custom infoType followed by the number of
1176
+ # characters comprising the surrogate. The following scheme defines the
1177
+ # format: info_type_name(surrogate_character_count):surrogate
1178
+ #
1179
+ # For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
1180
+ # the surrogate is 'abc', the full replacement value
1181
+ # will be: 'MY_TOKEN_INFO_TYPE(3):abc'
1182
+ #
1183
+ # This annotation identifies the surrogate when inspecting content using the
1184
+ # custom infoType
1185
+ # [+SurrogateType+](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
1186
+ # This facilitates reversal of the surrogate when it occurs in free text.
1187
+ #
1188
+ # In order for inspection to work properly, the name of this infoType must
1189
+ # not occur naturally anywhere in your data; otherwise, inspection may
1190
+ # find a surrogate that does not correspond to an actual identifier.
1191
+ # Therefore, choose your custom infoType name carefully after considering
1192
+ # what your data looks like. One way to select a name that has a high chance
1193
+ # of yielding reliable detection is to include one or more unicode characters
1194
+ # that are highly improbable to exist in your data.
1195
+ # For example, assuming your data is entered from a regular ASCII keyboard,
1196
+ # the symbol with the hex code point 29DD might be used like so:
1197
+ # ⧝MY_TOKEN_TYPE
1198
+ class CryptoReplaceFfxFpeConfig
1199
+ # These are commonly used subsets of the alphabet that the FFX mode
1200
+ # natively supports. In the algorithm, the alphabet is selected using
1201
+ # the "radix". Therefore each corresponds to particular radix.
1202
+ module FfxCommonNativeAlphabet
1203
+ FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0
1204
+
1205
+ # [0-9] (radix of 10)
1206
+ NUMERIC = 1
1207
+
1208
+ # [0-9A-F] (radix of 16)
1209
+ HEXADECIMAL = 2
1210
+
1211
+ # [0-9A-Z] (radix of 36)
1212
+ UPPER_CASE_ALPHA_NUMERIC = 3
1213
+
1214
+ # [0-9A-Za-z] (radix of 62)
1215
+ ALPHA_NUMERIC = 4
1216
+ end
1217
+ end
1218
+
1219
+ # This is a data encryption key (DEK) (as opposed to
1220
+ # a key encryption key (KEK) stored by KMS).
1221
+ # When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
1222
+ # IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot
1223
+ # unwrap the data crypto key.
1224
+ # @!attribute [rw] transient
1225
+ # @return [Google::Privacy::Dlp::V2::TransientCryptoKey]
1226
+ # @!attribute [rw] unwrapped
1227
+ # @return [Google::Privacy::Dlp::V2::UnwrappedCryptoKey]
1228
+ # @!attribute [rw] kms_wrapped
1229
+ # @return [Google::Privacy::Dlp::V2::KmsWrappedCryptoKey]
1230
+ class CryptoKey; end
1231
+
1232
+ # Use this to have a random data crypto key generated.
1233
+ # It will be discarded after the request finishes.
1234
+ # @!attribute [rw] name
1235
+ # @return [String]
1236
+ # Name of the key. [required]
1237
+ # This is an arbitrary string used to differentiate different keys.
1238
+ # A unique key is generated per name: two separate +TransientCryptoKey+
1239
+ # protos share the same generated key if their names are the same.
1240
+ # When the data crypto key is generated, this name is not used in any way
1241
+ # (repeating the api call will result in a different key being generated).
1242
+ class TransientCryptoKey; end
1243
+
1244
+ # Using raw keys is prone to security risks due to accidentally
1245
+ # leaking the key. Choose another type of key if possible.
1246
+ # @!attribute [rw] key
1247
+ # @return [String]
1248
+ # The AES 128/192/256 bit key. [required]
1249
+ class UnwrappedCryptoKey; end
1250
+
1251
+ # Include to use an existing data crypto key wrapped by KMS.
1252
+ # Authorization requires the following IAM permissions when sending a request
1253
+ # to perform a crypto transformation using a kms-wrapped crypto key:
1254
+ # dlp.kms.encrypt
1255
+ # @!attribute [rw] wrapped_key
1256
+ # @return [String]
1257
+ # The wrapped data crypto key. [required]
1258
+ # @!attribute [rw] crypto_key_name
1259
+ # @return [String]
1260
+ # The resource name of the KMS CryptoKey to use for unwrapping. [required]
1261
+ class KmsWrappedCryptoKey; end
1262
+
1263
+ # Shifts dates by random number of days, with option to be consistent for the
1264
+ # same context.
1265
+ # @!attribute [rw] upper_bound_days
1266
+ # @return [Integer]
1267
+ # Range of shift in days. Actual shift will be selected at random within this
1268
+ # range (inclusive ends). Negative means shift to earlier in time. Must not
1269
+ # be more than 365250 days (1000 years) each direction.
1270
+ #
1271
+ # For example, 3 means shift date to at most 3 days into the future.
1272
+ # [Required]
1273
+ # @!attribute [rw] lower_bound_days
1274
+ # @return [Integer]
1275
+ # For example, -5 means shift date to at most 5 days back in the past.
1276
+ # [Required]
1277
+ # @!attribute [rw] context
1278
+ # @return [Google::Privacy::Dlp::V2::FieldId]
1279
+ # Points to the field that contains the context, for example, an entity id.
1280
+ # If set, must also set method. If set, shift will be consistent for the
1281
+ # given context.
1282
+ # @!attribute [rw] crypto_key
1283
+ # @return [Google::Privacy::Dlp::V2::CryptoKey]
1284
+ # Causes the shift to be computed based on this key and the context. This
1285
+ # results in the same shift for the same context and crypto_key.
1286
+ class DateShiftConfig; end
1287
+
1288
+ # A type of transformation that will scan unstructured text and
1289
+ # apply various +PrimitiveTransformation+s to each finding, where the
1290
+ # transformation is applied to only values that were identified as a specific
1291
+ # info_type.
1292
+ # @!attribute [rw] transformations
1293
+ # @return [Array<Google::Privacy::Dlp::V2::InfoTypeTransformations::InfoTypeTransformation>]
1294
+ # Transformation for each infoType. Cannot specify more than one
1295
+ # for a given infoType. [required]
1296
+ class InfoTypeTransformations
1297
+ # A transformation to apply to text that is identified as a specific
1298
+ # info_type.
1299
+ # @!attribute [rw] info_types
1300
+ # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
1301
+ # InfoTypes to apply the transformation to. Empty list will match all
1302
+ # available infoTypes for this transformation.
1303
+ # @!attribute [rw] primitive_transformation
1304
+ # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1305
+ # Primitive transformation to apply to the infoType. [required]
1306
+ class InfoTypeTransformation; end
1307
+ end
1308
+
1309
+ # The transformation to apply to the field.
1310
+ # @!attribute [rw] fields
1311
+ # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
1312
+ # Input field(s) to apply the transformation to. [required]
1313
+ # @!attribute [rw] condition
1314
+ # @return [Google::Privacy::Dlp::V2::RecordCondition]
1315
+ # Only apply the transformation if the condition evaluates to true for the
1316
+ # given +RecordCondition+. The conditions are allowed to reference fields
1317
+ # that are not used in the actual transformation. [optional]
1318
+ #
1319
+ # Example Use Cases:
1320
+ #
1321
+ # * Apply a different bucket transformation to an age column if the zip code
1322
+ # column for the same record is within a specific range.
1323
+ # * Redact a field if the date of birth field is greater than 85.
1324
+ # @!attribute [rw] primitive_transformation
1325
+ # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1326
+ # Apply the transformation to the entire field.
1327
+ # @!attribute [rw] info_type_transformations
1328
+ # @return [Google::Privacy::Dlp::V2::InfoTypeTransformations]
1329
+ # Treat the contents of the field as free text, and selectively
1330
+ # transform content that matches an +InfoType+.
1331
+ class FieldTransformation; end
1332
+
1333
+ # A type of transformation that is applied over structured data such as a
1334
+ # table.
1335
+ # @!attribute [rw] field_transformations
1336
+ # @return [Array<Google::Privacy::Dlp::V2::FieldTransformation>]
1337
+ # Transform the record by applying various field transformations.
1338
+ # @!attribute [rw] record_suppressions
1339
+ # @return [Array<Google::Privacy::Dlp::V2::RecordSuppression>]
1340
+ # Configuration defining which records get suppressed entirely. Records that
1341
+ # match any suppression rule are omitted from the output [optional].
1342
+ class RecordTransformations; end
1343
+
1344
+ # Configuration to suppress records whose suppression conditions evaluate to
1345
+ # true.
1346
+ # @!attribute [rw] condition
1347
+ # @return [Google::Privacy::Dlp::V2::RecordCondition]
1348
+ # A condition that when it evaluates to true will result in the record being
1349
+ # evaluated to be suppressed from the transformed content.
1350
+ class RecordSuppression; end
1351
+
1352
+ # A condition for determining whether a transformation should be applied to
1353
+ # a field.
1354
+ # @!attribute [rw] expressions
1355
+ # @return [Google::Privacy::Dlp::V2::RecordCondition::Expressions]
1356
+ # An expression.
1357
+ class RecordCondition
1358
+ # The field type of +value+ and +field+ do not need to match to be
1359
+ # considered equal, but not all comparisons are possible.
1360
+ #
1361
+ # A +value+ of type:
1362
+ #
1363
+ # * +string+ can be compared against all other types
1364
+ # * +boolean+ can only be compared against other booleans
1365
+ # * +integer+ can be compared against doubles or a string if the string value
1366
+ # can be parsed as an integer.
1367
+ # * +double+ can be compared against integers or a string if the string can
1368
+ # be parsed as a double.
1369
+ # * +Timestamp+ can be compared against strings in RFC 3339 date string
1370
+ # format.
1371
+ # * +TimeOfDay+ can be compared against timestamps and strings in the format
1372
+ # of 'HH:mm:ss'.
1373
+ #
1374
+ # If we fail to compare do to type mismatch, a warning will be given and
1375
+ # the condition will evaluate to false.
1376
+ # @!attribute [rw] field
1377
+ # @return [Google::Privacy::Dlp::V2::FieldId]
1378
+ # Field within the record this condition is evaluated against. [required]
1379
+ # @!attribute [rw] operator
1380
+ # @return [Google::Privacy::Dlp::V2::RelationalOperator]
1381
+ # Operator used to compare the field or infoType to the value. [required]
1382
+ # @!attribute [rw] value
1383
+ # @return [Google::Privacy::Dlp::V2::Value]
1384
+ # Value to compare against. [Required, except for +EXISTS+ tests.]
1385
+ class Condition; end
1386
+
1387
+ # A collection of conditions.
1388
+ # @!attribute [rw] conditions
1389
+ # @return [Array<Google::Privacy::Dlp::V2::RecordCondition::Condition>]
1390
+ class Conditions; end
1391
+
1392
+ # An expression, consisting or an operator and conditions.
1393
+ # @!attribute [rw] logical_operator
1394
+ # @return [Google::Privacy::Dlp::V2::RecordCondition::Expressions::LogicalOperator]
1395
+ # The operator to apply to the result of conditions. Default and currently
1396
+ # only supported value is +AND+.
1397
+ # @!attribute [rw] conditions
1398
+ # @return [Google::Privacy::Dlp::V2::RecordCondition::Conditions]
1399
+ class Expressions
1400
+ module LogicalOperator
1401
+ LOGICAL_OPERATOR_UNSPECIFIED = 0
1402
+
1403
+ AND = 1
1404
+ end
1405
+ end
1406
+ end
1407
+
1408
+ # Overview of the modifications that occurred.
1409
+ # @!attribute [rw] transformed_bytes
1410
+ # @return [Integer]
1411
+ # Total size in bytes that were transformed in some way.
1412
+ # @!attribute [rw] transformation_summaries
1413
+ # @return [Array<Google::Privacy::Dlp::V2::TransformationSummary>]
1414
+ # Transformations applied to the dataset.
1415
+ class TransformationOverview; end
1416
+
1417
+ # Summary of a single tranformation.
1418
+ # Only one of 'transformation', 'field_transformation', or 'record_suppress'
1419
+ # will be set.
1420
+ # @!attribute [rw] info_type
1421
+ # @return [Google::Privacy::Dlp::V2::InfoType]
1422
+ # Set if the transformation was limited to a specific info_type.
1423
+ # @!attribute [rw] field
1424
+ # @return [Google::Privacy::Dlp::V2::FieldId]
1425
+ # Set if the transformation was limited to a specific FieldId.
1426
+ # @!attribute [rw] transformation
1427
+ # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1428
+ # The specific transformation these stats apply to.
1429
+ # @!attribute [rw] field_transformations
1430
+ # @return [Array<Google::Privacy::Dlp::V2::FieldTransformation>]
1431
+ # The field transformation that was applied.
1432
+ # If multiple field transformations are requested for a single field,
1433
+ # this list will contain all of them; otherwise, only one is supplied.
1434
+ # @!attribute [rw] record_suppress
1435
+ # @return [Google::Privacy::Dlp::V2::RecordSuppression]
1436
+ # The specific suppression option these stats apply to.
1437
+ # @!attribute [rw] results
1438
+ # @return [Array<Google::Privacy::Dlp::V2::TransformationSummary::SummaryResult>]
1439
+ # @!attribute [rw] transformed_bytes
1440
+ # @return [Integer]
1441
+ # Total size in bytes that were transformed in some way.
1442
+ class TransformationSummary
1443
+ # A collection that informs the user the number of times a particular
1444
+ # +TransformationResultCode+ and error details occurred.
1445
+ # @!attribute [rw] count
1446
+ # @return [Integer]
1447
+ # @!attribute [rw] code
1448
+ # @return [Google::Privacy::Dlp::V2::TransformationSummary::TransformationResultCode]
1449
+ # @!attribute [rw] details
1450
+ # @return [String]
1451
+ # A place for warnings or errors to show up if a transformation didn't
1452
+ # work as expected.
1453
+ class SummaryResult; end
1454
+
1455
+ # Possible outcomes of transformations.
1456
+ module TransformationResultCode
1457
+ TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0
1458
+
1459
+ SUCCESS = 1
1460
+
1461
+ ERROR = 2
1462
+ end
1463
+ end
1464
+
1465
+ # Schedule for triggeredJobs.
1466
+ # @!attribute [rw] recurrence_period_duration
1467
+ # @return [Google::Protobuf::Duration]
1468
+ # With this option a job is started a regular periodic basis. For
1469
+ # example: every 10 minutes.
1470
+ #
1471
+ # A scheduled start time will be skipped if the previous
1472
+ # execution has not ended when its scheduled time occurs.
1473
+ #
1474
+ # This value must be set to a time duration greater than or equal
1475
+ # to 60 minutes and can be no longer than 60 days.
1476
+ class Schedule; end
1477
+
1478
+ # The inspectTemplate contains a configuration (set of types of sensitive data
1479
+ # to be detected) to be used anywhere you otherwise would normally specify
1480
+ # InspectConfig.
1481
+ # @!attribute [rw] name
1482
+ # @return [String]
1483
+ # The template name. Output only.
1484
+ #
1485
+ # The template will have one of the following formats:
1486
+ # +projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID+ OR
1487
+ # +organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID+
1488
+ # @!attribute [rw] display_name
1489
+ # @return [String]
1490
+ # Display name (max 256 chars).
1491
+ # @!attribute [rw] description
1492
+ # @return [String]
1493
+ # Short description (max 256 chars).
1494
+ # @!attribute [rw] create_time
1495
+ # @return [Google::Protobuf::Timestamp]
1496
+ # The creation timestamp of a inspectTemplate, output only field.
1497
+ # @!attribute [rw] update_time
1498
+ # @return [Google::Protobuf::Timestamp]
1499
+ # The last update timestamp of a inspectTemplate, output only field.
1500
+ # @!attribute [rw] inspect_config
1501
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
1502
+ # The core content of the template. Configuration of the scanning process.
1503
+ class InspectTemplate; end
1504
+
1505
+ # The DeidentifyTemplates contains instructions on how to deidentify content.
1506
+ # @!attribute [rw] name
1507
+ # @return [String]
1508
+ # The template name. Output only.
1509
+ #
1510
+ # The template will have one of the following formats:
1511
+ # +projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID+ OR
1512
+ # +organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID+
1513
+ # @!attribute [rw] display_name
1514
+ # @return [String]
1515
+ # Display name (max 256 chars).
1516
+ # @!attribute [rw] description
1517
+ # @return [String]
1518
+ # Short description (max 256 chars).
1519
+ # @!attribute [rw] create_time
1520
+ # @return [Google::Protobuf::Timestamp]
1521
+ # The creation timestamp of a inspectTemplate, output only field.
1522
+ # @!attribute [rw] update_time
1523
+ # @return [Google::Protobuf::Timestamp]
1524
+ # The last update timestamp of a inspectTemplate, output only field.
1525
+ # @!attribute [rw] deidentify_config
1526
+ # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
1527
+ # ///////////// // The core content of the template // ///////////////
1528
+ class DeidentifyTemplate; end
1529
+
1530
+ # Details information about an error encountered during job execution or
1531
+ # the results of an unsuccessful activation of the JobTrigger.
1532
+ # Output only field.
1533
+ # @!attribute [rw] details
1534
+ # @return [Google::Rpc::Status]
1535
+ # @!attribute [rw] timestamps
1536
+ # @return [Array<Google::Protobuf::Timestamp>]
1537
+ # The times the error occurred.
1538
+ class Error; end
1539
+
1540
+ # Contains a configuration to make dlp api calls on a repeating basis.
1541
+ # @!attribute [rw] name
1542
+ # @return [String]
1543
+ # Unique resource name for the triggeredJob, assigned by the service when the
1544
+ # triggeredJob is created, for example
1545
+ # +projects/dlp-test-project/triggeredJobs/53234423+.
1546
+ # @!attribute [rw] display_name
1547
+ # @return [String]
1548
+ # Display name (max 100 chars)
1549
+ # @!attribute [rw] description
1550
+ # @return [String]
1551
+ # User provided description (max 256 chars)
1552
+ # @!attribute [rw] inspect_job
1553
+ # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
1554
+ # @!attribute [rw] triggers
1555
+ # @return [Array<Google::Privacy::Dlp::V2::JobTrigger::Trigger>]
1556
+ # A list of triggers which will be OR'ed together. Only one in the list
1557
+ # needs to trigger for a job to be started. The list may contain only
1558
+ # a single Schedule trigger and must have at least one object.
1559
+ # @!attribute [rw] errors
1560
+ # @return [Array<Google::Privacy::Dlp::V2::Error>]
1561
+ # A stream of errors encountered when the trigger was activated. Repeated
1562
+ # errors may result in the JobTrigger automaticaly being paused.
1563
+ # Will return the last 100 errors. Whenever the JobTrigger is modified
1564
+ # this list will be cleared. Output only field.
1565
+ # @!attribute [rw] create_time
1566
+ # @return [Google::Protobuf::Timestamp]
1567
+ # The creation timestamp of a triggeredJob, output only field.
1568
+ # @!attribute [rw] update_time
1569
+ # @return [Google::Protobuf::Timestamp]
1570
+ # The last update timestamp of a triggeredJob, output only field.
1571
+ # @!attribute [rw] last_run_time
1572
+ # @return [Google::Protobuf::Timestamp]
1573
+ # The timestamp of the last time this trigger executed, output only field.
1574
+ # @!attribute [rw] status
1575
+ # @return [Google::Privacy::Dlp::V2::JobTrigger::Status]
1576
+ # A status for this trigger. [required]
1577
+ class JobTrigger
1578
+ # What event needs to occur for a new job to be started.
1579
+ # @!attribute [rw] schedule
1580
+ # @return [Google::Privacy::Dlp::V2::Schedule]
1581
+ # Create a job on a repeating basis based on the elapse of time.
1582
+ class Trigger; end
1583
+
1584
+ # Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs
1585
+ # will be created with this configuration. The service may automatically
1586
+ # pause triggers experiencing frequent errors. To restart a job, set the
1587
+ # status to HEALTHY after correcting user errors.
1588
+ module Status
1589
+ STATUS_UNSPECIFIED = 0
1590
+
1591
+ # Trigger is healthy.
1592
+ HEALTHY = 1
1593
+
1594
+ # Trigger is temporarily paused.
1595
+ PAUSED = 2
1596
+
1597
+ # Trigger is cancelled and can not be resumed.
1598
+ CANCELLED = 3
1599
+ end
1600
+ end
1601
+
1602
+ # A task to execute on the completion of a job.
1603
+ # @!attribute [rw] save_findings
1604
+ # @return [Google::Privacy::Dlp::V2::Action::SaveFindings]
1605
+ # Save resulting findings in a provided location.
1606
+ # @!attribute [rw] pub_sub
1607
+ # @return [Google::Privacy::Dlp::V2::Action::PublishToPubSub]
1608
+ # Publish a notification to a pubsub topic.
1609
+ class Action
1610
+ # If set, the detailed findings will be persisted to the specified
1611
+ # OutputStorageConfig. Compatible with: Inspect
1612
+ # @!attribute [rw] output_config
1613
+ # @return [Google::Privacy::Dlp::V2::OutputStorageConfig]
1614
+ class SaveFindings; end
1615
+
1616
+ # Publish the results of a DlpJob to a pub sub channel.
1617
+ # Compatible with: Inpect, Risk
1618
+ # @!attribute [rw] topic
1619
+ # @return [String]
1620
+ # Cloud Pub/Sub topic to send notifications to. The topic must have given
1621
+ # publishing access rights to the DLP API service account executing
1622
+ # the long running DlpJob sending the notifications.
1623
+ # Format is projects/{project}/topics/{topic}.
1624
+ class PublishToPubSub; end
1625
+ end
1626
+
1627
+ # Request message for CreateInspectTemplate.
1628
+ # @!attribute [rw] parent
1629
+ # @return [String]
1630
+ # The parent resource name, for example projects/my-project-id or
1631
+ # organizations/my-org-id.
1632
+ # @!attribute [rw] inspect_template
1633
+ # @return [Google::Privacy::Dlp::V2::InspectTemplate]
1634
+ # The InspectTemplate to create.
1635
+ # @!attribute [rw] template_id
1636
+ # @return [String]
1637
+ # The template id can contain uppercase and lowercase letters,
1638
+ # numbers, and hyphens; that is, it must match the regular
1639
+ # expression: +[a-zA-Z\\d-]++. The maximum length is 100
1640
+ # characters. Can be empty to allow the system to generate one.
1641
+ class CreateInspectTemplateRequest; end
1642
+
1643
+ # Request message for UpdateInspectTemplate.
1644
+ # @!attribute [rw] name
1645
+ # @return [String]
1646
+ # Resource name of organization and inspectTemplate to be updated, for
1647
+ # example +organizations/433245324/inspectTemplates/432452342+ or
1648
+ # projects/project-id/inspectTemplates/432452342.
1649
+ # @!attribute [rw] inspect_template
1650
+ # @return [Google::Privacy::Dlp::V2::InspectTemplate]
1651
+ # New InspectTemplate value.
1652
+ # @!attribute [rw] update_mask
1653
+ # @return [Google::Protobuf::FieldMask]
1654
+ # Mask to control which fields get updated.
1655
+ class UpdateInspectTemplateRequest; end
1656
+
1657
+ # Request message for GetInspectTemplate.
1658
+ # @!attribute [rw] name
1659
+ # @return [String]
1660
+ # Resource name of the organization and inspectTemplate to be read, for
1661
+ # example +organizations/433245324/inspectTemplates/432452342+ or
1662
+ # projects/project-id/inspectTemplates/432452342.
1663
+ class GetInspectTemplateRequest; end
1664
+
1665
+ # Request message for ListInspectTemplates.
1666
+ # @!attribute [rw] parent
1667
+ # @return [String]
1668
+ # The parent resource name, for example projects/my-project-id or
1669
+ # organizations/my-org-id.
1670
+ # @!attribute [rw] page_token
1671
+ # @return [String]
1672
+ # Optional page token to continue retrieval. Comes from previous call
1673
+ # to +ListInspectTemplates+.
1674
+ # @!attribute [rw] page_size
1675
+ # @return [Integer]
1676
+ # Optional size of the page, can be limited by server. If zero server returns
1677
+ # a page of max size 100.
1678
+ class ListInspectTemplatesRequest; end
1679
+
1680
+ # Response message for ListInspectTemplates.
1681
+ # @!attribute [rw] inspect_templates
1682
+ # @return [Array<Google::Privacy::Dlp::V2::InspectTemplate>]
1683
+ # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
1684
+ # @!attribute [rw] next_page_token
1685
+ # @return [String]
1686
+ # If the next page is available then the next page token to be used
1687
+ # in following ListInspectTemplates request.
1688
+ class ListInspectTemplatesResponse; end
1689
+
1690
+ # Request message for DeleteInspectTemplate.
1691
+ # @!attribute [rw] name
1692
+ # @return [String]
1693
+ # Resource name of the organization and inspectTemplate to be deleted, for
1694
+ # example +organizations/433245324/inspectTemplates/432452342+ or
1695
+ # projects/project-id/inspectTemplates/432452342.
1696
+ class DeleteInspectTemplateRequest; end
1697
+
1698
+ # Request message for CreateJobTrigger.
1699
+ # @!attribute [rw] parent
1700
+ # @return [String]
1701
+ # The parent resource name, for example projects/my-project-id.
1702
+ # @!attribute [rw] job_trigger
1703
+ # @return [Google::Privacy::Dlp::V2::JobTrigger]
1704
+ # The JobTrigger to create.
1705
+ # @!attribute [rw] trigger_id
1706
+ # @return [String]
1707
+ # The trigger id can contain uppercase and lowercase letters,
1708
+ # numbers, and hyphens; that is, it must match the regular
1709
+ # expression: +[a-zA-Z\\d-]++. The maximum length is 100
1710
+ # characters. Can be empty to allow the system to generate one.
1711
+ class CreateJobTriggerRequest; end
1712
+
1713
+ # Request message for UpdateJobTrigger.
1714
+ # @!attribute [rw] name
1715
+ # @return [String]
1716
+ # Resource name of the project and the triggeredJob, for example
1717
+ # +projects/dlp-test-project/jobTriggers/53234423+.
1718
+ # @!attribute [rw] job_trigger
1719
+ # @return [Google::Privacy::Dlp::V2::JobTrigger]
1720
+ # New JobTrigger value.
1721
+ # @!attribute [rw] update_mask
1722
+ # @return [Google::Protobuf::FieldMask]
1723
+ # Mask to control which fields get updated.
1724
+ class UpdateJobTriggerRequest; end
1725
+
1726
+ # Request message for GetJobTrigger.
1727
+ # @!attribute [rw] name
1728
+ # @return [String]
1729
+ # Resource name of the project and the triggeredJob, for example
1730
+ # +projects/dlp-test-project/jobTriggers/53234423+.
1731
+ class GetJobTriggerRequest; end
1732
+
1733
+ # Request message for CreateDlpJobRequest. Used to initiate long running
1734
+ # jobs such as calculating risk metrics or inspecting Google Cloud
1735
+ # Storage.
1736
+ # @!attribute [rw] parent
1737
+ # @return [String]
1738
+ # The parent resource name, for example projects/my-project-id.
1739
+ # @!attribute [rw] inspect_job
1740
+ # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
1741
+ # @!attribute [rw] risk_job
1742
+ # @return [Google::Privacy::Dlp::V2::RiskAnalysisJobConfig]
1743
+ # @!attribute [rw] job_id
1744
+ # @return [String]
1745
+ # The job id can contain uppercase and lowercase letters,
1746
+ # numbers, and hyphens; that is, it must match the regular
1747
+ # expression: +[a-zA-Z\\d-]++. The maximum length is 100
1748
+ # characters. Can be empty to allow the system to generate one.
1749
+ class CreateDlpJobRequest; end
1750
+
1751
+ # Request message for ListJobTriggers.
1752
+ # @!attribute [rw] parent
1753
+ # @return [String]
1754
+ # The parent resource name, for example projects/my-project-id.
1755
+ # @!attribute [rw] page_token
1756
+ # @return [String]
1757
+ # Optional page token to continue retrieval. Comes from previous call
1758
+ # to ListJobTriggers. +order_by+ and +filter+ should not change for
1759
+ # subsequent calls, but can be omitted if token is specified.
1760
+ # @!attribute [rw] page_size
1761
+ # @return [Integer]
1762
+ # Optional size of the page, can be limited by a server.
1763
+ # @!attribute [rw] order_by
1764
+ # @return [String]
1765
+ # Optional comma separated list of triggeredJob fields to order by,
1766
+ # followed by 'asc/desc' postfix, i.e.
1767
+ # +"create_time asc,name desc,schedule_mode asc"+. This list is
1768
+ # case-insensitive.
1769
+ #
1770
+ # Example: +"name asc,schedule_mode desc, status desc"+
1771
+ #
1772
+ # Supported filters keys and values are:
1773
+ #
1774
+ # * +create_time+: corresponds to time the triggeredJob was created.
1775
+ # * +update_time+: corresponds to time the triggeredJob was last updated.
1776
+ # * +name+: corresponds to JobTrigger's display name.
1777
+ # * +status+: corresponds to the triggeredJob status.
1778
+ class ListJobTriggersRequest; end
1779
+
1780
+ # Response message for ListJobTriggers.
1781
+ # @!attribute [rw] job_triggers
1782
+ # @return [Array<Google::Privacy::Dlp::V2::JobTrigger>]
1783
+ # List of triggeredJobs, up to page_size in ListJobTriggersRequest.
1784
+ # @!attribute [rw] next_page_token
1785
+ # @return [String]
1786
+ # If the next page is available then the next page token to be used
1787
+ # in following ListJobTriggers request.
1788
+ class ListJobTriggersResponse; end
1789
+
1790
+ # Request message for DeleteJobTrigger.
1791
+ # @!attribute [rw] name
1792
+ # @return [String]
1793
+ # Resource name of the project and the triggeredJob, for example
1794
+ # +projects/dlp-test-project/jobTriggers/53234423+.
1795
+ class DeleteJobTriggerRequest; end
1796
+
1797
+ # @!attribute [rw] storage_config
1798
+ # @return [Google::Privacy::Dlp::V2::StorageConfig]
1799
+ # The data to scan.
1800
+ # @!attribute [rw] inspect_config
1801
+ # @return [Google::Privacy::Dlp::V2::InspectConfig]
1802
+ # How and what to scan for.
1803
+ # @!attribute [rw] inspect_template_name
1804
+ # @return [String]
1805
+ # If provided, will be used as the default for all values in InspectConfig.
1806
+ # +inspect_config+ will be merged into the values persisted as part of the
1807
+ # template.
1808
+ # @!attribute [rw] actions
1809
+ # @return [Array<Google::Privacy::Dlp::V2::Action>]
1810
+ # Actions to execute at the completion of the job. Are executed in the order
1811
+ # provided.
1812
+ class InspectJobConfig; end
1813
+
1814
+ # Combines all of the information about a DLP job.
1815
+ # @!attribute [rw] name
1816
+ # @return [String]
1817
+ # The server-assigned name.
1818
+ # @!attribute [rw] type
1819
+ # @return [Google::Privacy::Dlp::V2::DlpJobType]
1820
+ # The type of job.
1821
+ # @!attribute [rw] state
1822
+ # @return [Google::Privacy::Dlp::V2::DlpJob::JobState]
1823
+ # State of a job.
1824
+ # @!attribute [rw] risk_details
1825
+ # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails]
1826
+ # Results from analyzing risk of a data source.
1827
+ # @!attribute [rw] inspect_details
1828
+ # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails]
1829
+ # Results from inspecting a data source.
1830
+ # @!attribute [rw] create_time
1831
+ # @return [Google::Protobuf::Timestamp]
1832
+ # Time when the job was created.
1833
+ # @!attribute [rw] start_time
1834
+ # @return [Google::Protobuf::Timestamp]
1835
+ # Time when the job started.
1836
+ # @!attribute [rw] end_time
1837
+ # @return [Google::Protobuf::Timestamp]
1838
+ # Time when the job finished.
1839
+ # @!attribute [rw] job_trigger_name
1840
+ # @return [String]
1841
+ # If created by a job trigger, the resource name of the trigger that
1842
+ # instantiated the job.
1843
+ # @!attribute [rw] errors
1844
+ # @return [Array<Google::Privacy::Dlp::V2::Error>]
1845
+ # A stream of errors encountered running the job.
1846
+ class DlpJob
1847
+ module JobState
1848
+ JOB_STATE_UNSPECIFIED = 0
1849
+
1850
+ # The job has not yet started.
1851
+ PENDING = 1
1852
+
1853
+ # The job is currently running.
1854
+ RUNNING = 2
1855
+
1856
+ # The job is no longer running.
1857
+ DONE = 3
1858
+
1859
+ # The job was canceled before it could complete.
1860
+ CANCELED = 4
1861
+
1862
+ # The job had an error and did not complete.
1863
+ FAILED = 5
1864
+ end
1865
+ end
1866
+
1867
+ # The request message for {DlpJobs::GetDlpJob}.
1868
+ # @!attribute [rw] name
1869
+ # @return [String]
1870
+ # The name of the DlpJob resource.
1871
+ class GetDlpJobRequest; end
1872
+
1873
+ # The request message for listing DLP jobs.
1874
+ # @!attribute [rw] parent
1875
+ # @return [String]
1876
+ # The parent resource name, for example projects/my-project-id.
1877
+ # @!attribute [rw] filter
1878
+ # @return [String]
1879
+ # Optional. Allows filtering.
1880
+ #
1881
+ # Supported syntax:
1882
+ #
1883
+ # * Filter expressions are made up of one or more restrictions.
1884
+ # * Restrictions can be combined by +AND+ or +OR+ logical operators. A
1885
+ # sequence of restrictions implicitly uses +AND+.
1886
+ # * A restriction has the form of +<field> <operator> <value>+.
1887
+ # * Supported fields/values for inspect jobs:
1888
+ # * +state+ - PENDING|RUNNING|CANCELED|FINISHED|FAILED
1889
+ # * +inspected_storage+ - DATASTORE|CLOUD_STORAGE|BIGQUERY
1890
+ # * +trigger_name+ - The resource name of the trigger that created job.
1891
+ # * Supported fields for risk analysis jobs:
1892
+ # * +state+ - RUNNING|CANCELED|FINISHED|FAILED
1893
+ # * The operator must be +=+ or +!=+.
1894
+ #
1895
+ # Examples:
1896
+ #
1897
+ # * inspected_storage = cloud_storage AND state = done
1898
+ # * inspected_storage = cloud_storage OR inspected_storage = bigquery
1899
+ # * inspected_storage = cloud_storage AND (state = done OR state = canceled)
1900
+ #
1901
+ # The length of this field should be no more than 500 characters.
1902
+ # @!attribute [rw] page_size
1903
+ # @return [Integer]
1904
+ # The standard list page size.
1905
+ # @!attribute [rw] page_token
1906
+ # @return [String]
1907
+ # The standard list page token.
1908
+ # @!attribute [rw] type
1909
+ # @return [Google::Privacy::Dlp::V2::DlpJobType]
1910
+ # The type of job. Defaults to +DlpJobType.INSPECT+
1911
+ class ListDlpJobsRequest; end
1912
+
1913
+ # The response message for listing DLP jobs.
1914
+ # @!attribute [rw] jobs
1915
+ # @return [Array<Google::Privacy::Dlp::V2::DlpJob>]
1916
+ # A list of DlpJobs that matches the specified filter in the request.
1917
+ # @!attribute [rw] next_page_token
1918
+ # @return [String]
1919
+ # The standard List next-page token.
1920
+ class ListDlpJobsResponse; end
1921
+
1922
+ # The request message for canceling a DLP job.
1923
+ # @!attribute [rw] name
1924
+ # @return [String]
1925
+ # The name of the DlpJob resource to be cancelled.
1926
+ class CancelDlpJobRequest; end
1927
+
1928
+ # The request message for deleting a DLP job.
1929
+ # @!attribute [rw] name
1930
+ # @return [String]
1931
+ # The name of the DlpJob resource to be deleted.
1932
+ class DeleteDlpJobRequest; end
1933
+
1934
+ # Request message for CreateDeidentifyTemplate.
1935
+ # @!attribute [rw] parent
1936
+ # @return [String]
1937
+ # The parent resource name, for example projects/my-project-id or
1938
+ # organizations/my-org-id.
1939
+ # @!attribute [rw] deidentify_template
1940
+ # @return [Google::Privacy::Dlp::V2::DeidentifyTemplate]
1941
+ # The DeidentifyTemplate to create.
1942
+ # @!attribute [rw] template_id
1943
+ # @return [String]
1944
+ # The template id can contain uppercase and lowercase letters,
1945
+ # numbers, and hyphens; that is, it must match the regular
1946
+ # expression: +[a-zA-Z\\d-]++. The maximum length is 100
1947
+ # characters. Can be empty to allow the system to generate one.
1948
+ class CreateDeidentifyTemplateRequest; end
1949
+
1950
+ # Request message for UpdateDeidentifyTemplate.
1951
+ # @!attribute [rw] name
1952
+ # @return [String]
1953
+ # Resource name of organization and deidentify template to be updated, for
1954
+ # example +organizations/433245324/deidentifyTemplates/432452342+ or
1955
+ # projects/project-id/deidentifyTemplates/432452342.
1956
+ # @!attribute [rw] deidentify_template
1957
+ # @return [Google::Privacy::Dlp::V2::DeidentifyTemplate]
1958
+ # New DeidentifyTemplate value.
1959
+ # @!attribute [rw] update_mask
1960
+ # @return [Google::Protobuf::FieldMask]
1961
+ # Mask to control which fields get updated.
1962
+ class UpdateDeidentifyTemplateRequest; end
1963
+
1964
+ # Request message for GetDeidentifyTemplate.
1965
+ # @!attribute [rw] name
1966
+ # @return [String]
1967
+ # Resource name of the organization and deidentify template to be read, for
1968
+ # example +organizations/433245324/deidentifyTemplates/432452342+ or
1969
+ # projects/project-id/deidentifyTemplates/432452342.
1970
+ class GetDeidentifyTemplateRequest; end
1971
+
1972
+ # Request message for ListDeidentifyTemplates.
1973
+ # @!attribute [rw] parent
1974
+ # @return [String]
1975
+ # The parent resource name, for example projects/my-project-id or
1976
+ # organizations/my-org-id.
1977
+ # @!attribute [rw] page_token
1978
+ # @return [String]
1979
+ # Optional page token to continue retrieval. Comes from previous call
1980
+ # to +ListDeidentifyTemplates+.
1981
+ # @!attribute [rw] page_size
1982
+ # @return [Integer]
1983
+ # Optional size of the page, can be limited by server. If zero server returns
1984
+ # a page of max size 100.
1985
+ class ListDeidentifyTemplatesRequest; end
1986
+
1987
+ # Response message for ListDeidentifyTemplates.
1988
+ # @!attribute [rw] deidentify_templates
1989
+ # @return [Array<Google::Privacy::Dlp::V2::DeidentifyTemplate>]
1990
+ # List of deidentify templates, up to page_size in
1991
+ # ListDeidentifyTemplatesRequest.
1992
+ # @!attribute [rw] next_page_token
1993
+ # @return [String]
1994
+ # If the next page is available then the next page token to be used
1995
+ # in following ListDeidentifyTemplates request.
1996
+ class ListDeidentifyTemplatesResponse; end
1997
+
1998
+ # Request message for DeleteDeidentifyTemplate.
1999
+ # @!attribute [rw] name
2000
+ # @return [String]
2001
+ # Resource name of the organization and deidentify template to be deleted,
2002
+ # for example +organizations/433245324/deidentifyTemplates/432452342+ or
2003
+ # projects/project-id/deidentifyTemplates/432452342.
2004
+ class DeleteDeidentifyTemplateRequest; end
2005
+
2006
+ # Options describing which parts of the provided content should be scanned.
2007
+ module ContentOption
2008
+ # Includes entire content of a file or a data stream.
2009
+ CONTENT_UNSPECIFIED = 0
2010
+
2011
+ # Text content within the data, excluding any metadata.
2012
+ CONTENT_TEXT = 1
2013
+
2014
+ # Images found in the data.
2015
+ CONTENT_IMAGE = 2
2016
+ end
2017
+
2018
+ # Parts of the APIs which use certain infoTypes.
2019
+ module InfoTypeSupportedBy
2020
+ ENUM_TYPE_UNSPECIFIED = 0
2021
+
2022
+ # Supported by the inspect operations.
2023
+ INSPECT = 1
2024
+
2025
+ # Supported by the risk analysis operations.
2026
+ RISK_ANALYSIS = 2
2027
+ end
2028
+
2029
+ # Operators available for comparing the value of fields.
2030
+ module RelationalOperator
2031
+ RELATIONAL_OPERATOR_UNSPECIFIED = 0
2032
+
2033
+ # Equal.
2034
+ EQUAL_TO = 1
2035
+
2036
+ # Not equal to.
2037
+ NOT_EQUAL_TO = 2
2038
+
2039
+ # Greater than.
2040
+ GREATER_THAN = 3
2041
+
2042
+ # Less than.
2043
+ LESS_THAN = 4
2044
+
2045
+ # Greater than or equals.
2046
+ GREATER_THAN_OR_EQUALS = 5
2047
+
2048
+ # Less than or equals.
2049
+ LESS_THAN_OR_EQUALS = 6
2050
+
2051
+ # Exists
2052
+ EXISTS = 7
2053
+ end
2054
+
2055
+ # An enum to represent the various type of DLP jobs.
2056
+ module DlpJobType
2057
+ DLP_JOB_TYPE_UNSPECIFIED = 0
2058
+
2059
+ # The job inspected Google Cloud for sensitive data.
2060
+ INSPECT_JOB = 1
2061
+
2062
+ # The job executed a Risk Analysis computation.
2063
+ RISK_ANALYSIS_JOB = 2
2064
+ end
2065
+ end
2066
+ end
2067
+ end
2068
+ end