google-cloud-dlp 0.15.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,191 +0,0 @@
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
- "FinishDlpJob": {
124
- "timeout_millis": 300000,
125
- "retry_codes_name": "non_idempotent",
126
- "retry_params_name": "default"
127
- },
128
- "HybridInspectDlpJob": {
129
- "timeout_millis": 300000,
130
- "retry_codes_name": "non_idempotent",
131
- "retry_params_name": "default"
132
- },
133
- "ListJobTriggers": {
134
- "timeout_millis": 300000,
135
- "retry_codes_name": "idempotent",
136
- "retry_params_name": "default"
137
- },
138
- "GetJobTrigger": {
139
- "timeout_millis": 300000,
140
- "retry_codes_name": "idempotent",
141
- "retry_params_name": "default"
142
- },
143
- "DeleteJobTrigger": {
144
- "timeout_millis": 300000,
145
- "retry_codes_name": "idempotent",
146
- "retry_params_name": "default"
147
- },
148
- "HybridInspectJobTrigger": {
149
- "timeout_millis": 300000,
150
- "retry_codes_name": "non_idempotent",
151
- "retry_params_name": "default"
152
- },
153
- "UpdateJobTrigger": {
154
- "timeout_millis": 300000,
155
- "retry_codes_name": "non_idempotent",
156
- "retry_params_name": "default"
157
- },
158
- "CreateJobTrigger": {
159
- "timeout_millis": 300000,
160
- "retry_codes_name": "non_idempotent",
161
- "retry_params_name": "default"
162
- },
163
- "CreateStoredInfoType": {
164
- "timeout_millis": 300000,
165
- "retry_codes_name": "non_idempotent",
166
- "retry_params_name": "default"
167
- },
168
- "UpdateStoredInfoType": {
169
- "timeout_millis": 300000,
170
- "retry_codes_name": "non_idempotent",
171
- "retry_params_name": "default"
172
- },
173
- "GetStoredInfoType": {
174
- "timeout_millis": 300000,
175
- "retry_codes_name": "idempotent",
176
- "retry_params_name": "default"
177
- },
178
- "ListStoredInfoTypes": {
179
- "timeout_millis": 300000,
180
- "retry_codes_name": "idempotent",
181
- "retry_params_name": "default"
182
- },
183
- "DeleteStoredInfoType": {
184
- "timeout_millis": 300000,
185
- "retry_codes_name": "idempotent",
186
- "retry_params_name": "default"
187
- }
188
- }
189
- }
190
- }
191
- }
@@ -1,3163 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Privacy
18
- module Dlp
19
- module V2
20
- # List of exclude infoTypes.
21
- # @!attribute [rw] info_types
22
- # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
23
- # InfoType list in ExclusionRule rule drops a finding when it overlaps or
24
- # contained within with a finding of an infoType from this list. For
25
- # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
26
- # `exclusion_rule` containing `exclude_info_types.info_types` with
27
- # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
28
- # with EMAIL_ADDRESS finding.
29
- # That leads to "555-222-2222@example.org" to generate only a single
30
- # finding, namely email address.
31
- class ExcludeInfoTypes; end
32
-
33
- # The rule that specifies conditions when findings of infoTypes specified in
34
- # `InspectionRuleSet` are removed from results.
35
- # @!attribute [rw] dictionary
36
- # @return [Google::Privacy::Dlp::V2::CustomInfoType::Dictionary]
37
- # Dictionary which defines the rule.
38
- # @!attribute [rw] regex
39
- # @return [Google::Privacy::Dlp::V2::CustomInfoType::Regex]
40
- # Regular expression which defines the rule.
41
- # @!attribute [rw] exclude_info_types
42
- # @return [Google::Privacy::Dlp::V2::ExcludeInfoTypes]
43
- # Set of infoTypes for which findings would affect this rule.
44
- # @!attribute [rw] matching_type
45
- # @return [Google::Privacy::Dlp::V2::MatchingType]
46
- # How the rule is applied, see MatchingType documentation for details.
47
- class ExclusionRule; end
48
-
49
- # A single inspection rule to be applied to infoTypes, specified in
50
- # `InspectionRuleSet`.
51
- # @!attribute [rw] hotword_rule
52
- # @return [Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
53
- # Hotword-based detection rule.
54
- # @!attribute [rw] exclusion_rule
55
- # @return [Google::Privacy::Dlp::V2::ExclusionRule]
56
- # Exclusion rule.
57
- class InspectionRule; end
58
-
59
- # Rule set for modifying a set of infoTypes to alter behavior under certain
60
- # circumstances, depending on the specific details of the rules within the set.
61
- # @!attribute [rw] info_types
62
- # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
63
- # List of infoTypes this rule set is applied to.
64
- # @!attribute [rw] rules
65
- # @return [Array<Google::Privacy::Dlp::V2::InspectionRule>]
66
- # Set of rules to be applied to infoTypes. The rules are applied in order.
67
- class InspectionRuleSet; end
68
-
69
- # Configuration description of the scanning process.
70
- # When used with redactContent only info_types and min_likelihood are currently
71
- # used.
72
- # @!attribute [rw] info_types
73
- # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
74
- # Restricts what info_types to look for. The values must correspond to
75
- # InfoType values returned by ListInfoTypes or listed at
76
- # https://cloud.google.com/dlp/docs/infotypes-reference.
77
- #
78
- # When no InfoTypes or CustomInfoTypes are specified in a request, the
79
- # system may automatically choose what detectors to run. By default this may
80
- # be all types, but may change over time as detectors are updated.
81
- #
82
- # If you need precise control and predictability as to what detectors are
83
- # run you should specify specific InfoTypes listed in the reference,
84
- # otherwise a default list will be used, which may change over time.
85
- # @!attribute [rw] min_likelihood
86
- # @return [Google::Privacy::Dlp::V2::Likelihood]
87
- # Only returns findings equal or above this threshold. The default is
88
- # POSSIBLE.
89
- # See https://cloud.google.com/dlp/docs/likelihood to learn more.
90
- # @!attribute [rw] limits
91
- # @return [Google::Privacy::Dlp::V2::InspectConfig::FindingLimits]
92
- # Configuration to control the number of findings returned.
93
- # @!attribute [rw] include_quote
94
- # @return [true, false]
95
- # When true, a contextual quote from the data that triggered a finding is
96
- # included in the response; see Finding.quote.
97
- # @!attribute [rw] exclude_info_types
98
- # @return [true, false]
99
- # When true, excludes type information of the findings.
100
- # @!attribute [rw] custom_info_types
101
- # @return [Array<Google::Privacy::Dlp::V2::CustomInfoType>]
102
- # CustomInfoTypes provided by the user. See
103
- # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
104
- # @!attribute [rw] content_options
105
- # @return [Array<Google::Privacy::Dlp::V2::ContentOption>]
106
- # List of options defining data content to scan.
107
- # If empty, text, images, and other content will be included.
108
- # @!attribute [rw] rule_set
109
- # @return [Array<Google::Privacy::Dlp::V2::InspectionRuleSet>]
110
- # Set of rules to apply to the findings for this InspectConfig.
111
- # Exclusion rules, contained in the set are executed in the end, other
112
- # rules are executed in the order they are specified for each info type.
113
- class InspectConfig
114
- # Configuration to control the number of findings returned.
115
- # @!attribute [rw] max_findings_per_item
116
- # @return [Integer]
117
- # Max number of findings that will be returned for each item scanned.
118
- # When set within `InspectJobConfig`,
119
- # the maximum returned is 2000 regardless if this is set higher.
120
- # When set within `InspectContentRequest`, this field is ignored.
121
- # @!attribute [rw] max_findings_per_request
122
- # @return [Integer]
123
- # Max number of findings that will be returned per request/job.
124
- # When set within `InspectContentRequest`, the maximum returned is 2000
125
- # regardless if this is set higher.
126
- # @!attribute [rw] max_findings_per_info_type
127
- # @return [Array<Google::Privacy::Dlp::V2::InspectConfig::FindingLimits::InfoTypeLimit>]
128
- # Configuration of findings limit given for specified infoTypes.
129
- class FindingLimits
130
- # Max findings configuration per infoType, per content item or long
131
- # running DlpJob.
132
- # @!attribute [rw] info_type
133
- # @return [Google::Privacy::Dlp::V2::InfoType]
134
- # Type of information the findings limit applies to. Only one limit per
135
- # info_type should be provided. If InfoTypeLimit does not have an
136
- # info_type, the DLP API applies the limit against all info_types that
137
- # are found but not specified in another InfoTypeLimit.
138
- # @!attribute [rw] max_findings
139
- # @return [Integer]
140
- # Max findings limit for the given infoType.
141
- class InfoTypeLimit; end
142
- end
143
- end
144
-
145
- # Container for bytes to inspect or redact.
146
- # @!attribute [rw] type
147
- # @return [Google::Privacy::Dlp::V2::ByteContentItem::BytesType]
148
- # The type of data stored in the bytes string. Default will be TEXT_UTF8.
149
- # @!attribute [rw] data
150
- # @return [String]
151
- # Content data to inspect or redact.
152
- class ByteContentItem
153
- # The type of data being sent to in data.
154
- module BytesType
155
- # Unused
156
- BYTES_TYPE_UNSPECIFIED = 0
157
-
158
- # Any image type.
159
- IMAGE = 6
160
-
161
- # jpeg
162
- IMAGE_JPEG = 1
163
-
164
- # bmp
165
- IMAGE_BMP = 2
166
-
167
- # png
168
- IMAGE_PNG = 3
169
-
170
- # svg
171
- IMAGE_SVG = 4
172
-
173
- # plain text
174
- TEXT_UTF8 = 5
175
-
176
- # avro
177
- AVRO = 11
178
- end
179
- end
180
-
181
- # Container structure for the content to inspect.
182
- # @!attribute [rw] value
183
- # @return [String]
184
- # String data to inspect or redact.
185
- # @!attribute [rw] table
186
- # @return [Google::Privacy::Dlp::V2::Table]
187
- # Structured content for inspection. See
188
- # https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
189
- # learn more.
190
- # @!attribute [rw] byte_item
191
- # @return [Google::Privacy::Dlp::V2::ByteContentItem]
192
- # Content data to inspect or redact. Replaces `type` and `data`.
193
- class ContentItem; end
194
-
195
- # Structured content to inspect. Up to 50,000 `Value`s per request allowed.
196
- # See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
197
- # learn more.
198
- # @!attribute [rw] headers
199
- # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
200
- # Headers of the table.
201
- # @!attribute [rw] rows
202
- # @return [Array<Google::Privacy::Dlp::V2::Table::Row>]
203
- # Rows of the table.
204
- class Table
205
- # Values of the row.
206
- # @!attribute [rw] values
207
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
208
- # Individual cells.
209
- class Row; end
210
- end
211
-
212
- # All the findings for a single scanned item.
213
- # @!attribute [rw] findings
214
- # @return [Array<Google::Privacy::Dlp::V2::Finding>]
215
- # List of findings for an item.
216
- # @!attribute [rw] findings_truncated
217
- # @return [true, false]
218
- # If true, then this item might have more findings than were returned,
219
- # and the findings returned are an arbitrary subset of all findings.
220
- # The findings list might be truncated because the input items were too
221
- # large, or because the server reached the maximum amount of resources
222
- # allowed for a single API call. For best results, divide the input into
223
- # smaller batches.
224
- class InspectResult; end
225
-
226
- # Represents a piece of potentially sensitive content.
227
- # @!attribute [rw] name
228
- # @return [String]
229
- # Resource name in format
230
- # projects/\\{project}/locations/\\{location}/findings/\\{finding}
231
- # Populated only when viewing persisted findings.
232
- # @!attribute [rw] quote
233
- # @return [String]
234
- # The content that was found. Even if the content is not textual, it
235
- # may be converted to a textual representation here.
236
- # Provided if `include_quote` is true and the finding is
237
- # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
238
- # in length, the quote may be omitted.
239
- # @!attribute [rw] info_type
240
- # @return [Google::Privacy::Dlp::V2::InfoType]
241
- # The type of content that might have been found.
242
- # Provided if `excluded_types` is false.
243
- # @!attribute [rw] likelihood
244
- # @return [Google::Privacy::Dlp::V2::Likelihood]
245
- # Confidence of how likely it is that the `info_type` is correct.
246
- # @!attribute [rw] location
247
- # @return [Google::Privacy::Dlp::V2::Location]
248
- # Where the content was found.
249
- # @!attribute [rw] create_time
250
- # @return [Google::Protobuf::Timestamp]
251
- # Timestamp when finding was detected.
252
- # @!attribute [rw] quote_info
253
- # @return [Google::Privacy::Dlp::V2::QuoteInfo]
254
- # Contains data parsed from quotes. Only populated if include_quote was set
255
- # to true and a supported infoType was requested. Currently supported
256
- # infoTypes: DATE, DATE_OF_BIRTH and TIME.
257
- # @!attribute [rw] resource_name
258
- # @return [String]
259
- # The job that stored the finding.
260
- # @!attribute [rw] trigger_name
261
- # @return [String]
262
- # Job trigger name, if applicable, for this finding.
263
- # @!attribute [rw] labels
264
- # @return [Hash{String => String}]
265
- # The labels associated with this `InspectFinding`.
266
- #
267
- # Label keys must be between 1 and 63 characters long and must conform
268
- # to the following regular expression: \[a-z\](https://cloud.google.com\[-a-z0-9\]*\[a-z0-9\])?.
269
- #
270
- # Label values must be between 0 and 63 characters long and must conform
271
- # to the regular expression (\[a-z\](https://cloud.google.com\[-a-z0-9\]*\[a-z0-9\])?)?.
272
- #
273
- # No more than 10 labels can be associated with a given finding.
274
- #
275
- # Example: <code>"environment" : "production"</code>
276
- # Example: <code>"pipeline" : "etl"</code>
277
- # @!attribute [rw] job_create_time
278
- # @return [Google::Protobuf::Timestamp]
279
- # Time the job started that produced this finding.
280
- # @!attribute [rw] job_name
281
- # @return [String]
282
- # The job that stored the finding.
283
- class Finding; end
284
-
285
- # Specifies the location of the finding.
286
- # @!attribute [rw] byte_range
287
- # @return [Google::Privacy::Dlp::V2::Range]
288
- # Zero-based byte offsets delimiting the finding.
289
- # These are relative to the finding's containing element.
290
- # Note that when the content is not textual, this references
291
- # the UTF-8 encoded textual representation of the content.
292
- # Omitted if content is an image.
293
- # @!attribute [rw] codepoint_range
294
- # @return [Google::Privacy::Dlp::V2::Range]
295
- # Unicode character offsets delimiting the finding.
296
- # These are relative to the finding's containing element.
297
- # Provided when the content is text.
298
- # @!attribute [rw] content_locations
299
- # @return [Array<Google::Privacy::Dlp::V2::ContentLocation>]
300
- # List of nested objects pointing to the precise location of the finding
301
- # within the file or record.
302
- # @!attribute [rw] container
303
- # @return [Google::Privacy::Dlp::V2::Container]
304
- # Information about the container where this finding occurred, if available.
305
- class Location; end
306
-
307
- # Precise location of the finding within a document, record, image, or metadata
308
- # container.
309
- # @!attribute [rw] container_name
310
- # @return [String]
311
- # Name of the container where the finding is located.
312
- # The top level name is the source file name or table name. Names of some
313
- # common storage containers are formatted as follows:
314
- #
315
- # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}`
316
- # * Cloud Storage files: `gs://{bucket}/{path}`
317
- # * Datastore namespace: \\{namespace}
318
- #
319
- # Nested names could be absent if the embedded object has no string
320
- # identifier (for an example an image contained within a document).
321
- # @!attribute [rw] record_location
322
- # @return [Google::Privacy::Dlp::V2::RecordLocation]
323
- # Location within a row or record of a database table.
324
- # @!attribute [rw] image_location
325
- # @return [Google::Privacy::Dlp::V2::ImageLocation]
326
- # Location within an image's pixels.
327
- # @!attribute [rw] document_location
328
- # @return [Google::Privacy::Dlp::V2::DocumentLocation]
329
- # Location data for document files.
330
- # @!attribute [rw] container_timestamp
331
- # @return [Google::Protobuf::Timestamp]
332
- # Findings container modification timestamp, if applicable.
333
- # For Google Cloud Storage contains last file modification timestamp.
334
- # For BigQuery table contains last_modified_time property.
335
- # For Datastore - not populated.
336
- # @!attribute [rw] container_version
337
- # @return [String]
338
- # Findings container version, if available
339
- # ("generation" for Google Cloud Storage).
340
- class ContentLocation; end
341
-
342
- # Location of a finding within a document.
343
- # @!attribute [rw] file_offset
344
- # @return [Integer]
345
- # Offset of the line, from the beginning of the file, where the finding
346
- # is located.
347
- class DocumentLocation; end
348
-
349
- # Location of a finding within a row or record.
350
- # @!attribute [rw] record_key
351
- # @return [Google::Privacy::Dlp::V2::RecordKey]
352
- # Key of the finding.
353
- # @!attribute [rw] field_id
354
- # @return [Google::Privacy::Dlp::V2::FieldId]
355
- # Field id of the field containing the finding.
356
- # @!attribute [rw] table_location
357
- # @return [Google::Privacy::Dlp::V2::TableLocation]
358
- # Location within a `ContentItem.Table`.
359
- class RecordLocation; end
360
-
361
- # Location of a finding within a table.
362
- # @!attribute [rw] row_index
363
- # @return [Integer]
364
- # The zero-based index of the row where the finding is located.
365
- class TableLocation; end
366
-
367
- # Represents a container that may contain DLP findings.
368
- # Examples of a container include a file, table, or database record.
369
- # @!attribute [rw] type
370
- # @return [String]
371
- # Container type, for example BigQuery or Google Cloud Storage.
372
- # @!attribute [rw] project_id
373
- # @return [String]
374
- # Project where the finding was found.
375
- # Can be different from the project that owns the finding.
376
- # @!attribute [rw] full_path
377
- # @return [String]
378
- # A string representation of the full container name.
379
- # Examples:
380
- # * BigQuery: 'Project:DataSetId.TableId'
381
- # * Google Cloud Storage: 'gs://Bucket/folders/filename.txt'
382
- # @!attribute [rw] root_path
383
- # @return [String]
384
- # The root of the container.
385
- # Examples:
386
- # * For BigQuery table `project_id:dataset_id.table_id`, the root is
387
- # `dataset_id`
388
- # * For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root
389
- # is `gs://bucket`
390
- # @!attribute [rw] relative_path
391
- # @return [String]
392
- # The rest of the path after the root.
393
- # Examples:
394
- # * For BigQuery table `project_id:dataset_id.table_id`, the relative path is
395
- # `table_id`
396
- # * Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
397
- # path is `folder/filename.txt`
398
- # @!attribute [rw] update_time
399
- # @return [Google::Protobuf::Timestamp]
400
- # Findings container modification timestamp, if applicable.
401
- # For Google Cloud Storage contains last file modification timestamp.
402
- # For BigQuery table contains last_modified_time property.
403
- # For Datastore - not populated.
404
- # @!attribute [rw] version
405
- # @return [String]
406
- # Findings container version, if available
407
- # ("generation" for Google Cloud Storage).
408
- class Container; end
409
-
410
- # Generic half-open interval [start, end)
411
- # @!attribute [rw] start
412
- # @return [Integer]
413
- # Index of the first character of the range (inclusive).
414
- # @!attribute [rw] end
415
- # @return [Integer]
416
- # Index of the last character of the range (exclusive).
417
- class Range; end
418
-
419
- # Location of the finding within an image.
420
- # @!attribute [rw] bounding_boxes
421
- # @return [Array<Google::Privacy::Dlp::V2::BoundingBox>]
422
- # Bounding boxes locating the pixels within the image containing the finding.
423
- class ImageLocation; end
424
-
425
- # Bounding box encompassing detected text within an image.
426
- # @!attribute [rw] top
427
- # @return [Integer]
428
- # Top coordinate of the bounding box. (0,0) is upper left.
429
- # @!attribute [rw] left
430
- # @return [Integer]
431
- # Left coordinate of the bounding box. (0,0) is upper left.
432
- # @!attribute [rw] width
433
- # @return [Integer]
434
- # Width of the bounding box in pixels.
435
- # @!attribute [rw] height
436
- # @return [Integer]
437
- # Height of the bounding box in pixels.
438
- class BoundingBox; end
439
-
440
- # Request to search for potentially sensitive info in an image and redact it
441
- # by covering it with a colored rectangle.
442
- # @!attribute [rw] parent
443
- # @return [String]
444
- # The parent resource name, for example projects/my-project-id.
445
- # @!attribute [rw] location_id
446
- # @return [String]
447
- # The geographic location to process the request. Reserved for future
448
- # extensions.
449
- # @!attribute [rw] inspect_config
450
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
451
- # Configuration for the inspector.
452
- # @!attribute [rw] image_redaction_configs
453
- # @return [Array<Google::Privacy::Dlp::V2::RedactImageRequest::ImageRedactionConfig>]
454
- # The configuration for specifying what content to redact from images.
455
- # @!attribute [rw] include_findings
456
- # @return [true, false]
457
- # Whether the response should include findings along with the redacted
458
- # image.
459
- # @!attribute [rw] byte_item
460
- # @return [Google::Privacy::Dlp::V2::ByteContentItem]
461
- # The content must be PNG, JPEG, SVG or BMP.
462
- class RedactImageRequest
463
- # Configuration for determining how redaction of images should occur.
464
- # @!attribute [rw] info_type
465
- # @return [Google::Privacy::Dlp::V2::InfoType]
466
- # Only one per info_type should be provided per request. If not
467
- # specified, and redact_all_text is false, the DLP API will redact all
468
- # text that it matches against all info_types that are found, but not
469
- # specified in another ImageRedactionConfig.
470
- # @!attribute [rw] redact_all_text
471
- # @return [true, false]
472
- # If true, all text found in the image, regardless whether it matches an
473
- # info_type, is redacted. Only one should be provided.
474
- # @!attribute [rw] redaction_color
475
- # @return [Google::Privacy::Dlp::V2::Color]
476
- # The color to use when redacting content from an image. If not specified,
477
- # the default is black.
478
- class ImageRedactionConfig; end
479
- end
480
-
481
- # Represents a color in the RGB color space.
482
- # @!attribute [rw] red
483
- # @return [Float]
484
- # The amount of red in the color as a value in the interval [0, 1].
485
- # @!attribute [rw] green
486
- # @return [Float]
487
- # The amount of green in the color as a value in the interval [0, 1].
488
- # @!attribute [rw] blue
489
- # @return [Float]
490
- # The amount of blue in the color as a value in the interval [0, 1].
491
- class Color; end
492
-
493
- # Results of redacting an image.
494
- # @!attribute [rw] redacted_image
495
- # @return [String]
496
- # The redacted image. The type will be the same as the original image.
497
- # @!attribute [rw] extracted_text
498
- # @return [String]
499
- # If an image was being inspected and the InspectConfig's include_quote was
500
- # set to true, then this field will include all text, if any, that was found
501
- # in the image.
502
- # @!attribute [rw] inspect_result
503
- # @return [Google::Privacy::Dlp::V2::InspectResult]
504
- # The findings. Populated when include_findings in the request is true.
505
- class RedactImageResponse; end
506
-
507
- # Request to de-identify a list of items.
508
- # @!attribute [rw] parent
509
- # @return [String]
510
- # The parent resource name, for example projects/my-project-id.
511
- # @!attribute [rw] deidentify_config
512
- # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
513
- # Configuration for the de-identification of the content item.
514
- # Items specified here will override the template referenced by the
515
- # deidentify_template_name argument.
516
- # @!attribute [rw] inspect_config
517
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
518
- # Configuration for the inspector.
519
- # Items specified here will override the template referenced by the
520
- # inspect_template_name argument.
521
- # @!attribute [rw] item
522
- # @return [Google::Privacy::Dlp::V2::ContentItem]
523
- # The item to de-identify. Will be treated as text.
524
- # @!attribute [rw] inspect_template_name
525
- # @return [String]
526
- # Template to use. Any configuration directly specified in
527
- # inspect_config will override those set in the template. Singular fields
528
- # that are set in this request will replace their corresponding fields in the
529
- # template. Repeated fields are appended. Singular sub-messages and groups
530
- # are recursively merged.
531
- # @!attribute [rw] deidentify_template_name
532
- # @return [String]
533
- # Template to use. Any configuration directly specified in
534
- # deidentify_config will override those set in the template. Singular fields
535
- # that are set in this request will replace their corresponding fields in the
536
- # template. Repeated fields are appended. Singular sub-messages and groups
537
- # are recursively merged.
538
- # @!attribute [rw] location_id
539
- # @return [String]
540
- # The geographic location to process de-identification. Reserved for future
541
- # extensions.
542
- class DeidentifyContentRequest; end
543
-
544
- # Results of de-identifying a ContentItem.
545
- # @!attribute [rw] item
546
- # @return [Google::Privacy::Dlp::V2::ContentItem]
547
- # The de-identified item.
548
- # @!attribute [rw] overview
549
- # @return [Google::Privacy::Dlp::V2::TransformationOverview]
550
- # An overview of the changes that were made on the `item`.
551
- class DeidentifyContentResponse; end
552
-
553
- # Request to re-identify an item.
554
- # @!attribute [rw] parent
555
- # @return [String]
556
- # Required. The parent resource name.
557
- # @!attribute [rw] reidentify_config
558
- # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
559
- # Configuration for the re-identification of the content item.
560
- # This field shares the same proto message type that is used for
561
- # de-identification, however its usage here is for the reversal of the
562
- # previous de-identification. Re-identification is performed by examining
563
- # the transformations used to de-identify the items and executing the
564
- # reverse. This requires that only reversible transformations
565
- # be provided here. The reversible transformations are:
566
- #
567
- # * `CryptoDeterministicConfig`
568
- # * `CryptoReplaceFfxFpeConfig`
569
- # @!attribute [rw] inspect_config
570
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
571
- # Configuration for the inspector.
572
- # @!attribute [rw] item
573
- # @return [Google::Privacy::Dlp::V2::ContentItem]
574
- # The item to re-identify. Will be treated as text.
575
- # @!attribute [rw] inspect_template_name
576
- # @return [String]
577
- # Template to use. Any configuration directly specified in
578
- # `inspect_config` will override those set in the template. Singular fields
579
- # that are set in this request will replace their corresponding fields in the
580
- # template. Repeated fields are appended. Singular sub-messages and groups
581
- # are recursively merged.
582
- # @!attribute [rw] reidentify_template_name
583
- # @return [String]
584
- # Template to use. References an instance of `DeidentifyTemplate`.
585
- # Any configuration directly specified in `reidentify_config` or
586
- # `inspect_config` will override those set in the template. Singular fields
587
- # that are set in this request will replace their corresponding fields in the
588
- # template. Repeated fields are appended. Singular sub-messages and groups
589
- # are recursively merged.
590
- # @!attribute [rw] location_id
591
- # @return [String]
592
- # The geographic location to process content reidentification. Reserved for
593
- # future extensions.
594
- class ReidentifyContentRequest; end
595
-
596
- # Results of re-identifying a item.
597
- # @!attribute [rw] item
598
- # @return [Google::Privacy::Dlp::V2::ContentItem]
599
- # The re-identified item.
600
- # @!attribute [rw] overview
601
- # @return [Google::Privacy::Dlp::V2::TransformationOverview]
602
- # An overview of the changes that were made to the `item`.
603
- class ReidentifyContentResponse; end
604
-
605
- # Request to search for potentially sensitive info in a ContentItem.
606
- # @!attribute [rw] parent
607
- # @return [String]
608
- # The parent resource name, for example projects/my-project-id.
609
- # @!attribute [rw] inspect_config
610
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
611
- # Configuration for the inspector. What specified here will override
612
- # the template referenced by the inspect_template_name argument.
613
- # @!attribute [rw] item
614
- # @return [Google::Privacy::Dlp::V2::ContentItem]
615
- # The item to inspect.
616
- # @!attribute [rw] inspect_template_name
617
- # @return [String]
618
- # Template to use. Any configuration directly specified in
619
- # inspect_config will override those set in the template. Singular fields
620
- # that are set in this request will replace their corresponding fields in the
621
- # template. Repeated fields are appended. Singular sub-messages and groups
622
- # are recursively merged.
623
- # @!attribute [rw] location_id
624
- # @return [String]
625
- # The geographic location to process content inspection. Reserved for future
626
- # extensions.
627
- class InspectContentRequest; end
628
-
629
- # Results of inspecting an item.
630
- # @!attribute [rw] result
631
- # @return [Google::Privacy::Dlp::V2::InspectResult]
632
- # The findings.
633
- class InspectContentResponse; end
634
-
635
- # Cloud repository for storing output.
636
- # @!attribute [rw] table
637
- # @return [Google::Privacy::Dlp::V2::BigQueryTable]
638
- # Store findings in an existing table or a new table in an existing
639
- # dataset. If table_id is not set a new one will be generated
640
- # for you with the following format:
641
- # dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
642
- # generating the date details.
643
- #
644
- # For Inspect, each column in an existing output table must have the same
645
- # name, type, and mode of a field in the `Finding` object.
646
- #
647
- # For Risk, an existing output table should be the output of a previous
648
- # Risk analysis job run on the same source table, with the same privacy
649
- # metric and quasi-identifiers. Risk jobs that analyze the same table but
650
- # compute a different privacy metric, or use different sets of
651
- # quasi-identifiers, cannot store their results in the same table.
652
- # @!attribute [rw] output_schema
653
- # @return [Google::Privacy::Dlp::V2::OutputStorageConfig::OutputSchema]
654
- # Schema used for writing the findings for Inspect jobs. This field is only
655
- # used for Inspect and must be unspecified for Risk jobs. Columns are derived
656
- # from the `Finding` object. If appending to an existing table, any columns
657
- # from the predefined schema that are missing will be added. No columns in
658
- # the existing table will be deleted.
659
- #
660
- # If unspecified, then all available columns will be used for a new table or
661
- # an (existing) table with no schema, and no changes will be made to an
662
- # existing table that has a schema.
663
- # Only for use with external storage.
664
- class OutputStorageConfig
665
- # Predefined schemas for storing findings.
666
- # Only for use with external storage.
667
- module OutputSchema
668
- # Unused.
669
- OUTPUT_SCHEMA_UNSPECIFIED = 0
670
-
671
- # Basic schema including only `info_type`, `quote`, `certainty`, and
672
- # `timestamp`.
673
- BASIC_COLUMNS = 1
674
-
675
- # Schema tailored to findings from scanning Google Cloud Storage.
676
- GCS_COLUMNS = 2
677
-
678
- # Schema tailored to findings from scanning Google Datastore.
679
- DATASTORE_COLUMNS = 3
680
-
681
- # Schema tailored to findings from scanning Google BigQuery.
682
- BIG_QUERY_COLUMNS = 4
683
-
684
- # Schema containing all columns.
685
- ALL_COLUMNS = 5
686
- end
687
- end
688
-
689
- # Statistics regarding a specific InfoType.
690
- # @!attribute [rw] info_type
691
- # @return [Google::Privacy::Dlp::V2::InfoType]
692
- # The type of finding this stat is for.
693
- # @!attribute [rw] count
694
- # @return [Integer]
695
- # Number of findings for this infoType.
696
- class InfoTypeStats; end
697
-
698
- # The results of an inspect DataSource job.
699
- # @!attribute [rw] requested_options
700
- # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails::RequestedOptions]
701
- # The configuration used for this job.
702
- # @!attribute [rw] result
703
- # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails::Result]
704
- # A summary of the outcome of this inspect job.
705
- class InspectDataSourceDetails
706
- # Snapshot of the inspection configuration.
707
- # @!attribute [rw] snapshot_inspect_template
708
- # @return [Google::Privacy::Dlp::V2::InspectTemplate]
709
- # If run with an InspectTemplate, a snapshot of its state at the time of
710
- # this run.
711
- # @!attribute [rw] job_config
712
- # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
713
- # Inspect config.
714
- class RequestedOptions; end
715
-
716
- # All result fields mentioned below are updated while the job is processing.
717
- # @!attribute [rw] processed_bytes
718
- # @return [Integer]
719
- # Total size in bytes that were processed.
720
- # @!attribute [rw] total_estimated_bytes
721
- # @return [Integer]
722
- # Estimate of the number of bytes to process.
723
- # @!attribute [rw] info_type_stats
724
- # @return [Array<Google::Privacy::Dlp::V2::InfoTypeStats>]
725
- # Statistics of how many instances of each info type were found during
726
- # inspect job.
727
- # @!attribute [rw] hybrid_stats
728
- # @return [Google::Privacy::Dlp::V2::HybridInspectStatistics]
729
- # Statistics related to the processing of hybrid inspect.
730
- # Early access feature is in a pre-release state and might change or have
731
- # limited support. For more information, see
732
- # https://cloud.google.com/products#product-launch-stages.
733
- class Result; end
734
- end
735
-
736
- # Statistics related to processing hybrid inspect requests.s
737
- # @!attribute [rw] processed_count
738
- # @return [Integer]
739
- # The number of hybrid inspection requests processed within this job.
740
- # @!attribute [rw] aborted_count
741
- # @return [Integer]
742
- # The number of hybrid inspection requests aborted because the job ran
743
- # out of quota or was ended before they could be processed.
744
- # @!attribute [rw] pending_count
745
- # @return [Integer]
746
- # The number of hybrid requests currently being processed. Only populated
747
- # when called via method `getDlpJob`.
748
- # A burst of traffic may cause hybrid inspect requests to be enqueued.
749
- # Processing will take place as quickly as possible, but resource limitations
750
- # may impact how long a request is enqueued for.
751
- class HybridInspectStatistics; end
752
-
753
- # InfoType description.
754
- # @!attribute [rw] name
755
- # @return [String]
756
- # Internal name of the infoType.
757
- # @!attribute [rw] display_name
758
- # @return [String]
759
- # Human readable form of the infoType name.
760
- # @!attribute [rw] supported_by
761
- # @return [Array<Google::Privacy::Dlp::V2::InfoTypeSupportedBy>]
762
- # Which parts of the API supports this InfoType.
763
- # @!attribute [rw] description
764
- # @return [String]
765
- # Description of the infotype. Translated when language is provided in the
766
- # request.
767
- class InfoTypeDescription; end
768
-
769
- # Request for the list of infoTypes.
770
- # @!attribute [rw] language_code
771
- # @return [String]
772
- # BCP-47 language code for localized infoType friendly
773
- # names. If omitted, or if localized strings are not available,
774
- # en-US strings will be returned.
775
- # @!attribute [rw] filter
776
- # @return [String]
777
- # filter to only return infoTypes supported by certain parts of the
778
- # API. Defaults to supported_by=INSPECT.
779
- # @!attribute [rw] location_id
780
- # @return [String]
781
- # The geographic location to list info types. Reserved for future
782
- # extensions.
783
- class ListInfoTypesRequest; end
784
-
785
- # Response to the ListInfoTypes request.
786
- # @!attribute [rw] info_types
787
- # @return [Array<Google::Privacy::Dlp::V2::InfoTypeDescription>]
788
- # Set of sensitive infoTypes.
789
- class ListInfoTypesResponse; end
790
-
791
- # Configuration for a risk analysis job. See
792
- # https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
793
- # @!attribute [rw] privacy_metric
794
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric]
795
- # Privacy metric to compute.
796
- # @!attribute [rw] source_table
797
- # @return [Google::Privacy::Dlp::V2::BigQueryTable]
798
- # Input dataset to compute metrics over.
799
- # @!attribute [rw] actions
800
- # @return [Array<Google::Privacy::Dlp::V2::Action>]
801
- # Actions to execute at the completion of the job. Are executed in the order
802
- # provided.
803
- class RiskAnalysisJobConfig; end
804
-
805
- # A column with a semantic tag attached.
806
- # @!attribute [rw] field
807
- # @return [Google::Privacy::Dlp::V2::FieldId]
808
- # Required. Identifies the column.
809
- # @!attribute [rw] info_type
810
- # @return [Google::Privacy::Dlp::V2::InfoType]
811
- # A column can be tagged with a InfoType to use the relevant public
812
- # dataset as a statistical model of population, if available. We
813
- # currently support US ZIP codes, region codes, ages and genders.
814
- # To programmatically obtain the list of supported InfoTypes, use
815
- # ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
816
- # @!attribute [rw] custom_tag
817
- # @return [String]
818
- # A column can be tagged with a custom tag. In this case, the user must
819
- # indicate an auxiliary table that contains statistical information on
820
- # the possible values of this column (below).
821
- # @!attribute [rw] inferred
822
- # @return [Google::Protobuf::Empty]
823
- # If no semantic tag is indicated, we infer the statistical model from
824
- # the distribution of values in the input data
825
- class QuasiId; end
826
-
827
- # An auxiliary table containing statistical information on the relative
828
- # frequency of different quasi-identifiers values. It has one or several
829
- # quasi-identifiers columns, and one column that indicates the relative
830
- # frequency of each quasi-identifier tuple.
831
- # If a tuple is present in the data but not in the auxiliary table, the
832
- # corresponding relative frequency is assumed to be zero (and thus, the
833
- # tuple is highly reidentifiable).
834
- # @!attribute [rw] table
835
- # @return [Google::Privacy::Dlp::V2::BigQueryTable]
836
- # Required. Auxiliary table location.
837
- # @!attribute [rw] quasi_ids
838
- # @return [Array<Google::Privacy::Dlp::V2::StatisticalTable::QuasiIdentifierField>]
839
- # Required. Quasi-identifier columns.
840
- # @!attribute [rw] relative_frequency
841
- # @return [Google::Privacy::Dlp::V2::FieldId]
842
- # Required. The relative frequency column must contain a floating-point
843
- # number between 0 and 1 (inclusive). Null values are assumed to be zero.
844
- class StatisticalTable
845
- # A quasi-identifier column has a custom_tag, used to know which column
846
- # in the data corresponds to which column in the statistical model.
847
- # @!attribute [rw] field
848
- # @return [Google::Privacy::Dlp::V2::FieldId]
849
- # Identifies the column.
850
- # @!attribute [rw] custom_tag
851
- # @return [String]
852
- # A column can be tagged with a custom tag. In this case, the user must
853
- # indicate an auxiliary table that contains statistical information on
854
- # the possible values of this column (below).
855
- class QuasiIdentifierField; end
856
- end
857
-
858
- # Privacy metric to compute for reidentification risk analysis.
859
- # @!attribute [rw] numerical_stats_config
860
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::NumericalStatsConfig]
861
- # Numerical stats
862
- # @!attribute [rw] categorical_stats_config
863
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::CategoricalStatsConfig]
864
- # Categorical stats
865
- # @!attribute [rw] k_anonymity_config
866
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::KAnonymityConfig]
867
- # K-anonymity
868
- # @!attribute [rw] l_diversity_config
869
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::LDiversityConfig]
870
- # l-diversity
871
- # @!attribute [rw] k_map_estimation_config
872
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig]
873
- # k-map
874
- # @!attribute [rw] delta_presence_estimation_config
875
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig]
876
- # delta-presence
877
- class PrivacyMetric
878
- # Compute numerical stats over an individual column, including
879
- # min, max, and quantiles.
880
- # @!attribute [rw] field
881
- # @return [Google::Privacy::Dlp::V2::FieldId]
882
- # Field to compute numerical stats on. Supported types are
883
- # integer, float, date, datetime, timestamp, time.
884
- class NumericalStatsConfig; end
885
-
886
- # Compute numerical stats over an individual column, including
887
- # number of distinct values and value count distribution.
888
- # @!attribute [rw] field
889
- # @return [Google::Privacy::Dlp::V2::FieldId]
890
- # Field to compute categorical stats on. All column types are
891
- # supported except for arrays and structs. However, it may be more
892
- # informative to use NumericalStats when the field type is supported,
893
- # depending on the data.
894
- class CategoricalStatsConfig; end
895
-
896
- # k-anonymity metric, used for analysis of reidentification risk.
897
- # @!attribute [rw] quasi_ids
898
- # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
899
- # Set of fields to compute k-anonymity over. When multiple fields are
900
- # specified, they are considered a single composite key. Structs and
901
- # repeated data types are not supported; however, nested fields are
902
- # supported so long as they are not structs themselves or nested within
903
- # a repeated field.
904
- # @!attribute [rw] entity_id
905
- # @return [Google::Privacy::Dlp::V2::EntityId]
906
- # Message indicating that multiple rows might be associated to a
907
- # single individual. If the same entity_id is associated to multiple
908
- # quasi-identifier tuples over distinct rows, we consider the entire
909
- # collection of tuples as the composite quasi-identifier. This collection
910
- # is a multiset: the order in which the different tuples appear in the
911
- # dataset is ignored, but their frequency is taken into account.
912
- #
913
- # Important note: a maximum of 1000 rows can be associated to a single
914
- # entity ID. If more rows are associated with the same entity ID, some
915
- # might be ignored.
916
- class KAnonymityConfig; end
917
-
918
- # l-diversity metric, used for analysis of reidentification risk.
919
- # @!attribute [rw] quasi_ids
920
- # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
921
- # Set of quasi-identifiers indicating how equivalence classes are
922
- # defined for the l-diversity computation. When multiple fields are
923
- # specified, they are considered a single composite key.
924
- # @!attribute [rw] sensitive_attribute
925
- # @return [Google::Privacy::Dlp::V2::FieldId]
926
- # Sensitive field for computing the l-value.
927
- class LDiversityConfig; end
928
-
929
- # Reidentifiability metric. This corresponds to a risk model similar to what
930
- # is called "journalist risk" in the literature, except the attack dataset is
931
- # statistically modeled instead of being perfectly known. This can be done
932
- # using publicly available data (like the US Census), or using a custom
933
- # statistical model (indicated as one or several BigQuery tables), or by
934
- # extrapolating from the distribution of values in the input dataset.
935
- # @!attribute [rw] quasi_ids
936
- # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
937
- # Required. Fields considered to be quasi-identifiers. No two columns can
938
- # have the same tag.
939
- # @!attribute [rw] region_code
940
- # @return [String]
941
- # ISO 3166-1 alpha-2 region code to use in the statistical modeling.
942
- # Set if no column is tagged with a region-specific InfoType (like
943
- # US_ZIP_5) or a region code.
944
- # @!attribute [rw] auxiliary_tables
945
- # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
946
- # Several auxiliary tables can be used in the analysis. Each custom_tag
947
- # used to tag a quasi-identifiers column must appear in exactly one column
948
- # of one auxiliary table.
949
- class KMapEstimationConfig
950
- # A column with a semantic tag attached.
951
- # @!attribute [rw] field
952
- # @return [Google::Privacy::Dlp::V2::FieldId]
953
- # Required. Identifies the column.
954
- # @!attribute [rw] info_type
955
- # @return [Google::Privacy::Dlp::V2::InfoType]
956
- # A column can be tagged with a InfoType to use the relevant public
957
- # dataset as a statistical model of population, if available. We
958
- # currently support US ZIP codes, region codes, ages and genders.
959
- # To programmatically obtain the list of supported InfoTypes, use
960
- # ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
961
- # @!attribute [rw] custom_tag
962
- # @return [String]
963
- # A column can be tagged with a custom tag. In this case, the user must
964
- # indicate an auxiliary table that contains statistical information on
965
- # the possible values of this column (below).
966
- # @!attribute [rw] inferred
967
- # @return [Google::Protobuf::Empty]
968
- # If no semantic tag is indicated, we infer the statistical model from
969
- # the distribution of values in the input data
970
- class TaggedField; end
971
-
972
- # An auxiliary table contains statistical information on the relative
973
- # frequency of different quasi-identifiers values. It has one or several
974
- # quasi-identifiers columns, and one column that indicates the relative
975
- # frequency of each quasi-identifier tuple.
976
- # If a tuple is present in the data but not in the auxiliary table, the
977
- # corresponding relative frequency is assumed to be zero (and thus, the
978
- # tuple is highly reidentifiable).
979
- # @!attribute [rw] table
980
- # @return [Google::Privacy::Dlp::V2::BigQueryTable]
981
- # Required. Auxiliary table location.
982
- # @!attribute [rw] quasi_ids
983
- # @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
984
- # Required. Quasi-identifier columns.
985
- # @!attribute [rw] relative_frequency
986
- # @return [Google::Privacy::Dlp::V2::FieldId]
987
- # Required. The relative frequency column must contain a floating-point
988
- # number between 0 and 1 (inclusive). Null values are assumed to be zero.
989
- class AuxiliaryTable
990
- # A quasi-identifier column has a custom_tag, used to know which column
991
- # in the data corresponds to which column in the statistical model.
992
- # @!attribute [rw] field
993
- # @return [Google::Privacy::Dlp::V2::FieldId]
994
- # Identifies the column.
995
- # @!attribute [rw] custom_tag
996
- # @return [String]
997
- # A auxiliary field.
998
- class QuasiIdField; end
999
- end
1000
- end
1001
-
1002
- # δ-presence metric, used to estimate how likely it is for an attacker to
1003
- # figure out that one given individual appears in a de-identified dataset.
1004
- # Similarly to the k-map metric, we cannot compute δ-presence exactly without
1005
- # knowing the attack dataset, so we use a statistical model instead.
1006
- # @!attribute [rw] quasi_ids
1007
- # @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
1008
- # Required. Fields considered to be quasi-identifiers. No two fields can
1009
- # have the same tag.
1010
- # @!attribute [rw] region_code
1011
- # @return [String]
1012
- # ISO 3166-1 alpha-2 region code to use in the statistical modeling.
1013
- # Set if no column is tagged with a region-specific InfoType (like
1014
- # US_ZIP_5) or a region code.
1015
- # @!attribute [rw] auxiliary_tables
1016
- # @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
1017
- # Several auxiliary tables can be used in the analysis. Each custom_tag
1018
- # used to tag a quasi-identifiers field must appear in exactly one
1019
- # field of one auxiliary table.
1020
- class DeltaPresenceEstimationConfig; end
1021
- end
1022
-
1023
- # Result of a risk analysis operation request.
1024
- # @!attribute [rw] requested_privacy_metric
1025
- # @return [Google::Privacy::Dlp::V2::PrivacyMetric]
1026
- # Privacy metric to compute.
1027
- # @!attribute [rw] requested_source_table
1028
- # @return [Google::Privacy::Dlp::V2::BigQueryTable]
1029
- # Input dataset to compute metrics over.
1030
- # @!attribute [rw] numerical_stats_result
1031
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::NumericalStatsResult]
1032
- # Numerical stats result
1033
- # @!attribute [rw] categorical_stats_result
1034
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult]
1035
- # Categorical stats result
1036
- # @!attribute [rw] k_anonymity_result
1037
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult]
1038
- # K-anonymity result
1039
- # @!attribute [rw] l_diversity_result
1040
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult]
1041
- # L-divesity result
1042
- # @!attribute [rw] k_map_estimation_result
1043
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult]
1044
- # K-map result
1045
- # @!attribute [rw] delta_presence_estimation_result
1046
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult]
1047
- # Delta-presence result
1048
- class AnalyzeDataSourceRiskDetails
1049
- # Result of the numerical stats computation.
1050
- # @!attribute [rw] min_value
1051
- # @return [Google::Privacy::Dlp::V2::Value]
1052
- # Minimum value appearing in the column.
1053
- # @!attribute [rw] max_value
1054
- # @return [Google::Privacy::Dlp::V2::Value]
1055
- # Maximum value appearing in the column.
1056
- # @!attribute [rw] quantile_values
1057
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
1058
- # List of 99 values that partition the set of field values into 100 equal
1059
- # sized buckets.
1060
- class NumericalStatsResult; end
1061
-
1062
- # Result of the categorical stats computation.
1063
- # @!attribute [rw] value_frequency_histogram_buckets
1064
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket>]
1065
- # Histogram of value frequencies in the column.
1066
- class CategoricalStatsResult
1067
- # Histogram of value frequencies in the column.
1068
- # @!attribute [rw] value_frequency_lower_bound
1069
- # @return [Integer]
1070
- # Lower bound on the value frequency of the values in this bucket.
1071
- # @!attribute [rw] value_frequency_upper_bound
1072
- # @return [Integer]
1073
- # Upper bound on the value frequency of the values in this bucket.
1074
- # @!attribute [rw] bucket_size
1075
- # @return [Integer]
1076
- # Total number of values in this bucket.
1077
- # @!attribute [rw] bucket_values
1078
- # @return [Array<Google::Privacy::Dlp::V2::ValueFrequency>]
1079
- # Sample of value frequencies in this bucket. The total number of
1080
- # values returned per bucket is capped at 20.
1081
- # @!attribute [rw] bucket_value_count
1082
- # @return [Integer]
1083
- # Total number of distinct values in this bucket.
1084
- class CategoricalStatsHistogramBucket; end
1085
- end
1086
-
1087
- # Result of the k-anonymity computation.
1088
- # @!attribute [rw] equivalence_class_histogram_buckets
1089
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket>]
1090
- # Histogram of k-anonymity equivalence classes.
1091
- class KAnonymityResult
1092
- # The set of columns' values that share the same ldiversity value
1093
- # @!attribute [rw] quasi_ids_values
1094
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
1095
- # Set of values defining the equivalence class. One value per
1096
- # quasi-identifier column in the original KAnonymity metric message.
1097
- # The order is always the same as the original request.
1098
- # @!attribute [rw] equivalence_class_size
1099
- # @return [Integer]
1100
- # Size of the equivalence class, for example number of rows with the
1101
- # above set of values.
1102
- class KAnonymityEquivalenceClass; end
1103
-
1104
- # Histogram of k-anonymity equivalence classes.
1105
- # @!attribute [rw] equivalence_class_size_lower_bound
1106
- # @return [Integer]
1107
- # Lower bound on the size of the equivalence classes in this bucket.
1108
- # @!attribute [rw] equivalence_class_size_upper_bound
1109
- # @return [Integer]
1110
- # Upper bound on the size of the equivalence classes in this bucket.
1111
- # @!attribute [rw] bucket_size
1112
- # @return [Integer]
1113
- # Total number of equivalence classes in this bucket.
1114
- # @!attribute [rw] bucket_values
1115
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass>]
1116
- # Sample of equivalence classes in this bucket. The total number of
1117
- # classes returned per bucket is capped at 20.
1118
- # @!attribute [rw] bucket_value_count
1119
- # @return [Integer]
1120
- # Total number of distinct equivalence classes in this bucket.
1121
- class KAnonymityHistogramBucket; end
1122
- end
1123
-
1124
- # Result of the l-diversity computation.
1125
- # @!attribute [rw] sensitive_value_frequency_histogram_buckets
1126
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket>]
1127
- # Histogram of l-diversity equivalence class sensitive value frequencies.
1128
- class LDiversityResult
1129
- # The set of columns' values that share the same ldiversity value.
1130
- # @!attribute [rw] quasi_ids_values
1131
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
1132
- # Quasi-identifier values defining the k-anonymity equivalence
1133
- # class. The order is always the same as the original request.
1134
- # @!attribute [rw] equivalence_class_size
1135
- # @return [Integer]
1136
- # Size of the k-anonymity equivalence class.
1137
- # @!attribute [rw] num_distinct_sensitive_values
1138
- # @return [Integer]
1139
- # Number of distinct sensitive values in this equivalence class.
1140
- # @!attribute [rw] top_sensitive_values
1141
- # @return [Array<Google::Privacy::Dlp::V2::ValueFrequency>]
1142
- # Estimated frequencies of top sensitive values.
1143
- class LDiversityEquivalenceClass; end
1144
-
1145
- # Histogram of l-diversity equivalence class sensitive value frequencies.
1146
- # @!attribute [rw] sensitive_value_frequency_lower_bound
1147
- # @return [Integer]
1148
- # Lower bound on the sensitive value frequencies of the equivalence
1149
- # classes in this bucket.
1150
- # @!attribute [rw] sensitive_value_frequency_upper_bound
1151
- # @return [Integer]
1152
- # Upper bound on the sensitive value frequencies of the equivalence
1153
- # classes in this bucket.
1154
- # @!attribute [rw] bucket_size
1155
- # @return [Integer]
1156
- # Total number of equivalence classes in this bucket.
1157
- # @!attribute [rw] bucket_values
1158
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass>]
1159
- # Sample of equivalence classes in this bucket. The total number of
1160
- # classes returned per bucket is capped at 20.
1161
- # @!attribute [rw] bucket_value_count
1162
- # @return [Integer]
1163
- # Total number of distinct equivalence classes in this bucket.
1164
- class LDiversityHistogramBucket; end
1165
- end
1166
-
1167
- # Result of the reidentifiability analysis. Note that these results are an
1168
- # estimation, not exact values.
1169
- # @!attribute [rw] k_map_estimation_histogram
1170
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket>]
1171
- # The intervals [min_anonymity, max_anonymity] do not overlap. If a value
1172
- # doesn't correspond to any such interval, the associated frequency is
1173
- # zero. For example, the following records:
1174
- # {min_anonymity: 1, max_anonymity: 1, frequency: 17}
1175
- # {min_anonymity: 2, max_anonymity: 3, frequency: 42}
1176
- # {min_anonymity: 5, max_anonymity: 10, frequency: 99}
1177
- # mean that there are no record with an estimated anonymity of 4, 5, or
1178
- # larger than 10.
1179
- class KMapEstimationResult
1180
- # A tuple of values for the quasi-identifier columns.
1181
- # @!attribute [rw] quasi_ids_values
1182
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
1183
- # The quasi-identifier values.
1184
- # @!attribute [rw] estimated_anonymity
1185
- # @return [Integer]
1186
- # The estimated anonymity for these quasi-identifier values.
1187
- class KMapEstimationQuasiIdValues; end
1188
-
1189
- # A KMapEstimationHistogramBucket message with the following values:
1190
- # min_anonymity: 3
1191
- # max_anonymity: 5
1192
- # frequency: 42
1193
- # means that there are 42 records whose quasi-identifier values correspond
1194
- # to 3, 4 or 5 people in the overlying population. An important particular
1195
- # case is when min_anonymity = max_anonymity = 1: the frequency field then
1196
- # corresponds to the number of uniquely identifiable records.
1197
- # @!attribute [rw] min_anonymity
1198
- # @return [Integer]
1199
- # Always positive.
1200
- # @!attribute [rw] max_anonymity
1201
- # @return [Integer]
1202
- # Always greater than or equal to min_anonymity.
1203
- # @!attribute [rw] bucket_size
1204
- # @return [Integer]
1205
- # Number of records within these anonymity bounds.
1206
- # @!attribute [rw] bucket_values
1207
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues>]
1208
- # Sample of quasi-identifier tuple values in this bucket. The total
1209
- # number of classes returned per bucket is capped at 20.
1210
- # @!attribute [rw] bucket_value_count
1211
- # @return [Integer]
1212
- # Total number of distinct quasi-identifier tuple values in this bucket.
1213
- class KMapEstimationHistogramBucket; end
1214
- end
1215
-
1216
- # Result of the δ-presence computation. Note that these results are an
1217
- # estimation, not exact values.
1218
- # @!attribute [rw] delta_presence_estimation_histogram
1219
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket>]
1220
- # The intervals [min_probability, max_probability) do not overlap. If a
1221
- # value doesn't correspond to any such interval, the associated frequency
1222
- # is zero. For example, the following records:
1223
- # {min_probability: 0, max_probability: 0.1, frequency: 17}
1224
- # {min_probability: 0.2, max_probability: 0.3, frequency: 42}
1225
- # {min_probability: 0.3, max_probability: 0.4, frequency: 99}
1226
- # mean that there are no record with an estimated probability in [0.1, 0.2)
1227
- # nor larger or equal to 0.4.
1228
- class DeltaPresenceEstimationResult
1229
- # A tuple of values for the quasi-identifier columns.
1230
- # @!attribute [rw] quasi_ids_values
1231
- # @return [Array<Google::Privacy::Dlp::V2::Value>]
1232
- # The quasi-identifier values.
1233
- # @!attribute [rw] estimated_probability
1234
- # @return [Float]
1235
- # The estimated probability that a given individual sharing these
1236
- # quasi-identifier values is in the dataset. This value, typically called
1237
- # δ, is the ratio between the number of records in the dataset with these
1238
- # quasi-identifier values, and the total number of individuals (inside
1239
- # *and* outside the dataset) with these quasi-identifier values.
1240
- # For example, if there are 15 individuals in the dataset who share the
1241
- # same quasi-identifier values, and an estimated 100 people in the entire
1242
- # population with these values, then δ is 0.15.
1243
- class DeltaPresenceEstimationQuasiIdValues; end
1244
-
1245
- # A DeltaPresenceEstimationHistogramBucket message with the following
1246
- # values:
1247
- # min_probability: 0.1
1248
- # max_probability: 0.2
1249
- # frequency: 42
1250
- # means that there are 42 records for which δ is in [0.1, 0.2). An
1251
- # important particular case is when min_probability = max_probability = 1:
1252
- # then, every individual who shares this quasi-identifier combination is in
1253
- # the dataset.
1254
- # @!attribute [rw] min_probability
1255
- # @return [Float]
1256
- # Between 0 and 1.
1257
- # @!attribute [rw] max_probability
1258
- # @return [Float]
1259
- # Always greater than or equal to min_probability.
1260
- # @!attribute [rw] bucket_size
1261
- # @return [Integer]
1262
- # Number of records within these probability bounds.
1263
- # @!attribute [rw] bucket_values
1264
- # @return [Array<Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues>]
1265
- # Sample of quasi-identifier tuple values in this bucket. The total
1266
- # number of classes returned per bucket is capped at 20.
1267
- # @!attribute [rw] bucket_value_count
1268
- # @return [Integer]
1269
- # Total number of distinct quasi-identifier tuple values in this bucket.
1270
- class DeltaPresenceEstimationHistogramBucket; end
1271
- end
1272
- end
1273
-
1274
- # A value of a field, including its frequency.
1275
- # @!attribute [rw] value
1276
- # @return [Google::Privacy::Dlp::V2::Value]
1277
- # A value contained in the field in question.
1278
- # @!attribute [rw] count
1279
- # @return [Integer]
1280
- # How many times the value is contained in the field.
1281
- class ValueFrequency; end
1282
-
1283
- # Set of primitive values supported by the system.
1284
- # Note that for the purposes of inspection or transformation, the number
1285
- # of bytes considered to comprise a 'Value' is based on its representation
1286
- # as a UTF-8 encoded string. For example, if 'integer_value' is set to
1287
- # 123456789, the number of bytes would be counted as 9, even though an
1288
- # int64 only holds up to 8 bytes of data.
1289
- # @!attribute [rw] integer_value
1290
- # @return [Integer]
1291
- # integer
1292
- # @!attribute [rw] float_value
1293
- # @return [Float]
1294
- # float
1295
- # @!attribute [rw] string_value
1296
- # @return [String]
1297
- # string
1298
- # @!attribute [rw] boolean_value
1299
- # @return [true, false]
1300
- # boolean
1301
- # @!attribute [rw] timestamp_value
1302
- # @return [Google::Protobuf::Timestamp]
1303
- # timestamp
1304
- # @!attribute [rw] time_value
1305
- # @return [Google::Type::TimeOfDay]
1306
- # time of day
1307
- # @!attribute [rw] date_value
1308
- # @return [Google::Type::Date]
1309
- # date
1310
- # @!attribute [rw] day_of_week_value
1311
- # @return [Google::Type::DayOfWeek]
1312
- # day of week
1313
- class Value; end
1314
-
1315
- # Message for infoType-dependent details parsed from quote.
1316
- # @!attribute [rw] date_time
1317
- # @return [Google::Privacy::Dlp::V2::DateTime]
1318
- # The date time indicated by the quote.
1319
- class QuoteInfo; end
1320
-
1321
- # Message for a date time object.
1322
- # e.g. 2018-01-01, 5th August.
1323
- # @!attribute [rw] date
1324
- # @return [Google::Type::Date]
1325
- # One or more of the following must be set.
1326
- # Must be a valid date or time value.
1327
- # @!attribute [rw] day_of_week
1328
- # @return [Google::Type::DayOfWeek]
1329
- # Day of week
1330
- # @!attribute [rw] time
1331
- # @return [Google::Type::TimeOfDay]
1332
- # Time of day
1333
- # @!attribute [rw] time_zone
1334
- # @return [Google::Privacy::Dlp::V2::DateTime::TimeZone]
1335
- # Time zone
1336
- class DateTime
1337
- # Time zone of the date time object.
1338
- # @!attribute [rw] offset_minutes
1339
- # @return [Integer]
1340
- # Set only if the offset can be determined. Positive for time ahead of UTC.
1341
- # E.g. For "UTC-9", this value is -540.
1342
- class TimeZone; end
1343
- end
1344
-
1345
- # The configuration that controls how the data will change.
1346
- # @!attribute [rw] info_type_transformations
1347
- # @return [Google::Privacy::Dlp::V2::InfoTypeTransformations]
1348
- # Treat the dataset as free-form text and apply the same free text
1349
- # transformation everywhere.
1350
- # @!attribute [rw] record_transformations
1351
- # @return [Google::Privacy::Dlp::V2::RecordTransformations]
1352
- # Treat the dataset as structured. Transformations can be applied to
1353
- # specific locations within structured datasets, such as transforming
1354
- # a column within a table.
1355
- # @!attribute [rw] transformation_error_handling
1356
- # @return [Google::Privacy::Dlp::V2::TransformationErrorHandling]
1357
- # Mode for handling transformation errors. If left unspecified, the default
1358
- # mode is `TransformationErrorHandling.ThrowError`.
1359
- class DeidentifyConfig; end
1360
-
1361
- # How to handle transformation errors during de-identification. A
1362
- # transformation error occurs when the requested transformation is incompatible
1363
- # with the data. For example, trying to de-identify an IP address using a
1364
- # `DateShift` transformation would result in a transformation error, since date
1365
- # info cannot be extracted from an IP address.
1366
- # Information about any incompatible transformations, and how they were
1367
- # handled, is returned in the response as part of the
1368
- # `TransformationOverviews`.
1369
- # @!attribute [rw] throw_error
1370
- # @return [Google::Privacy::Dlp::V2::TransformationErrorHandling::ThrowError]
1371
- # Throw an error
1372
- # @!attribute [rw] leave_untransformed
1373
- # @return [Google::Privacy::Dlp::V2::TransformationErrorHandling::LeaveUntransformed]
1374
- # Ignore errors
1375
- class TransformationErrorHandling
1376
- # Throw an error and fail the request when a transformation error occurs.
1377
- class ThrowError; end
1378
-
1379
- # Skips the data without modifying it if the requested transformation would
1380
- # cause an error. For example, if a `DateShift` transformation were applied
1381
- # an an IP address, this mode would leave the IP address unchanged in the
1382
- # response.
1383
- class LeaveUntransformed; end
1384
- end
1385
-
1386
- # A rule for transforming a value.
1387
- # @!attribute [rw] replace_config
1388
- # @return [Google::Privacy::Dlp::V2::ReplaceValueConfig]
1389
- # Replace
1390
- # @!attribute [rw] redact_config
1391
- # @return [Google::Privacy::Dlp::V2::RedactConfig]
1392
- # Redact
1393
- # @!attribute [rw] character_mask_config
1394
- # @return [Google::Privacy::Dlp::V2::CharacterMaskConfig]
1395
- # Mask
1396
- # @!attribute [rw] crypto_replace_ffx_fpe_config
1397
- # @return [Google::Privacy::Dlp::V2::CryptoReplaceFfxFpeConfig]
1398
- # Ffx-Fpe
1399
- # @!attribute [rw] fixed_size_bucketing_config
1400
- # @return [Google::Privacy::Dlp::V2::FixedSizeBucketingConfig]
1401
- # Fixed size bucketing
1402
- # @!attribute [rw] bucketing_config
1403
- # @return [Google::Privacy::Dlp::V2::BucketingConfig]
1404
- # Bucketing
1405
- # @!attribute [rw] replace_with_info_type_config
1406
- # @return [Google::Privacy::Dlp::V2::ReplaceWithInfoTypeConfig]
1407
- # Replace with infotype
1408
- # @!attribute [rw] time_part_config
1409
- # @return [Google::Privacy::Dlp::V2::TimePartConfig]
1410
- # Time extraction
1411
- # @!attribute [rw] crypto_hash_config
1412
- # @return [Google::Privacy::Dlp::V2::CryptoHashConfig]
1413
- # Crypto
1414
- # @!attribute [rw] date_shift_config
1415
- # @return [Google::Privacy::Dlp::V2::DateShiftConfig]
1416
- # Date Shift
1417
- # @!attribute [rw] crypto_deterministic_config
1418
- # @return [Google::Privacy::Dlp::V2::CryptoDeterministicConfig]
1419
- # Deterministic Crypto
1420
- class PrimitiveTransformation; end
1421
-
1422
- # For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
1423
- # portion of the value.
1424
- # @!attribute [rw] part_to_extract
1425
- # @return [Google::Privacy::Dlp::V2::TimePartConfig::TimePart]
1426
- # The part of the time to keep.
1427
- class TimePartConfig
1428
- # Components that make up time.
1429
- module TimePart
1430
- # Unused
1431
- TIME_PART_UNSPECIFIED = 0
1432
-
1433
- # [0-9999]
1434
- YEAR = 1
1435
-
1436
- # [1-12]
1437
- MONTH = 2
1438
-
1439
- # [1-31]
1440
- DAY_OF_MONTH = 3
1441
-
1442
- # [1-7]
1443
- DAY_OF_WEEK = 4
1444
-
1445
- # [1-53]
1446
- WEEK_OF_YEAR = 5
1447
-
1448
- # [0-23]
1449
- HOUR_OF_DAY = 6
1450
- end
1451
- end
1452
-
1453
- # Pseudonymization method that generates surrogates via cryptographic hashing.
1454
- # Uses SHA-256.
1455
- # The key size must be either 32 or 64 bytes.
1456
- # Outputs a base64 encoded representation of the hashed output
1457
- # (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
1458
- # Currently, only string and integer values can be hashed.
1459
- # See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
1460
- # @!attribute [rw] crypto_key
1461
- # @return [Google::Privacy::Dlp::V2::CryptoKey]
1462
- # The key used by the hash function.
1463
- class CryptoHashConfig; end
1464
-
1465
- # Pseudonymization method that generates deterministic encryption for the given
1466
- # input. Outputs a base64 encoded representation of the encrypted output.
1467
- # Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
1468
- # @!attribute [rw] crypto_key
1469
- # @return [Google::Privacy::Dlp::V2::CryptoKey]
1470
- # The key used by the encryption function.
1471
- # @!attribute [rw] surrogate_info_type
1472
- # @return [Google::Privacy::Dlp::V2::InfoType]
1473
- # The custom info type to annotate the surrogate with.
1474
- # This annotation will be applied to the surrogate by prefixing it with
1475
- # the name of the custom info type followed by the number of
1476
- # characters comprising the surrogate. The following scheme defines the
1477
- # format: {info type name}({surrogate character count}):\\{surrogate}
1478
- #
1479
- # For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
1480
- # the surrogate is 'abc', the full replacement value
1481
- # will be: 'MY_TOKEN_INFO_TYPE(3):abc'
1482
- #
1483
- # This annotation identifies the surrogate when inspecting content using the
1484
- # custom info type 'Surrogate'. This facilitates reversal of the
1485
- # surrogate when it occurs in free text.
1486
- #
1487
- # Note: For record transformations where the entire cell in a table is being
1488
- # transformed, surrogates are not mandatory. Surrogates are used to denote
1489
- # the location of the token and are necessary for re-identification in free
1490
- # form text.
1491
- #
1492
- # In order for inspection to work properly, the name of this info type must
1493
- # not occur naturally anywhere in your data; otherwise, inspection may either
1494
- #
1495
- # * reverse a surrogate that does not correspond to an actual identifier
1496
- # * be unable to parse the surrogate and result in an error
1497
- #
1498
- # Therefore, choose your custom info type name carefully after considering
1499
- # what your data looks like. One way to select a name that has a high chance
1500
- # of yielding reliable detection is to include one or more unicode characters
1501
- # that are highly improbable to exist in your data.
1502
- # For example, assuming your data is entered from a regular ASCII keyboard,
1503
- # the symbol with the hex code point 29DD might be used like so:
1504
- # ⧝MY_TOKEN_TYPE.
1505
- # @!attribute [rw] context
1506
- # @return [Google::Privacy::Dlp::V2::FieldId]
1507
- # A context may be used for higher security and maintaining
1508
- # referential integrity such that the same identifier in two different
1509
- # contexts will be given a distinct surrogate. The context is appended to
1510
- # plaintext value being encrypted. On decryption the provided context is
1511
- # validated against the value used during encryption. If a context was
1512
- # provided during encryption, same context must be provided during decryption
1513
- # as well.
1514
- #
1515
- # If the context is not set, plaintext would be used as is for encryption.
1516
- # If the context is set but:
1517
- #
1518
- # 1. there is no record present when transforming a given value or
1519
- # 2. the field is not present when transforming a given value,
1520
- #
1521
- # plaintext would be used as is for encryption.
1522
- #
1523
- # Note that case (1) is expected when an `InfoTypeTransformation` is
1524
- # applied to both structured and non-structured `ContentItem`s.
1525
- class CryptoDeterministicConfig; end
1526
-
1527
- # Replace each input value with a given `Value`.
1528
- # @!attribute [rw] new_value
1529
- # @return [Google::Privacy::Dlp::V2::Value]
1530
- # Value to replace it with.
1531
- class ReplaceValueConfig; end
1532
-
1533
- # Replace each matching finding with the name of the info_type.
1534
- class ReplaceWithInfoTypeConfig; end
1535
-
1536
- # Redact a given value. For example, if used with an `InfoTypeTransformation`
1537
- # transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
1538
- # output would be 'My phone number is '.
1539
- class RedactConfig; end
1540
-
1541
- # Characters to skip when doing deidentification of a value. These will be left
1542
- # alone and skipped.
1543
- # @!attribute [rw] characters_to_skip
1544
- # @return [String]
1545
- # Characters to not transform when masking.
1546
- # @!attribute [rw] common_characters_to_ignore
1547
- # @return [Google::Privacy::Dlp::V2::CharsToIgnore::CommonCharsToIgnore]
1548
- # Common characters to not transform when masking. Useful to avoid removing
1549
- # punctuation.
1550
- class CharsToIgnore
1551
- # Convenience enum for indication common characters to not transform.
1552
- module CommonCharsToIgnore
1553
- # Unused.
1554
- COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0
1555
-
1556
- # 0-9
1557
- NUMERIC = 1
1558
-
1559
- # A-Z
1560
- ALPHA_UPPER_CASE = 2
1561
-
1562
- # a-z
1563
- ALPHA_LOWER_CASE = 3
1564
-
1565
- # US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
1566
- PUNCTUATION = 4
1567
-
1568
- # Whitespace character, one of [ \t\n\x0B\f\r]
1569
- WHITESPACE = 5
1570
- end
1571
- end
1572
-
1573
- # Partially mask a string by replacing a given number of characters with a
1574
- # fixed character. Masking can start from the beginning or end of the string.
1575
- # This can be used on data of any type (numbers, longs, and so on) and when
1576
- # de-identifying structured data we'll attempt to preserve the original data's
1577
- # type. (This allows you to take a long like 123 and modify it to a string like
1578
- # **3.
1579
- # @!attribute [rw] masking_character
1580
- # @return [String]
1581
- # Character to use to mask the sensitive values&mdash;for example, `*` for an
1582
- # alphabetic string such as a name, or `0` for a numeric string such as ZIP
1583
- # code or credit card number. This string must have a length of 1. If not
1584
- # supplied, this value defaults to `*` for strings, and `0` for digits.
1585
- # @!attribute [rw] number_to_mask
1586
- # @return [Integer]
1587
- # Number of characters to mask. If not set, all matching chars will be
1588
- # masked. Skipped characters do not count towards this tally.
1589
- # @!attribute [rw] reverse_order
1590
- # @return [true, false]
1591
- # Mask characters in reverse order. For example, if `masking_character` is
1592
- # `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
1593
- # input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
1594
- # If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
1595
- # is `true`, then the string `12345` is masked as `12***`.
1596
- # @!attribute [rw] characters_to_ignore
1597
- # @return [Array<Google::Privacy::Dlp::V2::CharsToIgnore>]
1598
- # When masking a string, items in this list will be skipped when replacing
1599
- # characters. For example, if the input string is `555-555-5555` and you
1600
- # instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
1601
- # returns `***-**5-5555`.
1602
- class CharacterMaskConfig; end
1603
-
1604
- # Buckets values based on fixed size ranges. The
1605
- # Bucketing transformation can provide all of this functionality,
1606
- # but requires more configuration. This message is provided as a convenience to
1607
- # the user for simple bucketing strategies.
1608
- #
1609
- # The transformed value will be a hyphenated string of
1610
- # \\{lower_bound}-\\{upper_bound}, i.e if lower_bound = 10 and upper_bound = 20
1611
- # all values that are within this bucket will be replaced with "10-20".
1612
- #
1613
- # This can be used on data of type: double, long.
1614
- #
1615
- # If the bound Value type differs from the type of data
1616
- # being transformed, we will first attempt converting the type of the data to
1617
- # be transformed to match the type of the bound before comparing.
1618
- #
1619
- # See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
1620
- # @!attribute [rw] lower_bound
1621
- # @return [Google::Privacy::Dlp::V2::Value]
1622
- # Required. Lower bound value of buckets. All values less than `lower_bound`
1623
- # are grouped together into a single bucket; for example if `lower_bound` =
1624
- # 10, then all values less than 10 are replaced with the value “-10”.
1625
- # @!attribute [rw] upper_bound
1626
- # @return [Google::Privacy::Dlp::V2::Value]
1627
- # Required. Upper bound value of buckets. All values greater than upper_bound
1628
- # are grouped together into a single bucket; for example if `upper_bound` =
1629
- # 89, then all values greater than 89 are replaced with the value “89+”.
1630
- # @!attribute [rw] bucket_size
1631
- # @return [Float]
1632
- # Required. Size of each bucket (except for minimum and maximum buckets). So
1633
- # if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
1634
- # following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
1635
- # 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
1636
- class FixedSizeBucketingConfig; end
1637
-
1638
- # Generalization function that buckets values based on ranges. The ranges and
1639
- # replacement values are dynamically provided by the user for custom behavior,
1640
- # such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
1641
- # This can be used on
1642
- # data of type: number, long, string, timestamp.
1643
- # If the bound `Value` type differs from the type of data being transformed, we
1644
- # will first attempt converting the type of the data to be transformed to match
1645
- # the type of the bound before comparing.
1646
- # See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
1647
- # @!attribute [rw] buckets
1648
- # @return [Array<Google::Privacy::Dlp::V2::BucketingConfig::Bucket>]
1649
- # Set of buckets. Ranges must be non-overlapping.
1650
- class BucketingConfig
1651
- # Bucket is represented as a range, along with replacement values.
1652
- # @!attribute [rw] min
1653
- # @return [Google::Privacy::Dlp::V2::Value]
1654
- # Lower bound of the range, inclusive. Type should be the same as max if
1655
- # used.
1656
- # @!attribute [rw] max
1657
- # @return [Google::Privacy::Dlp::V2::Value]
1658
- # Upper bound of the range, exclusive; type must match min.
1659
- # @!attribute [rw] replacement_value
1660
- # @return [Google::Privacy::Dlp::V2::Value]
1661
- # Replacement value for this bucket. If not provided
1662
- # the default behavior will be to hyphenate the min-max range.
1663
- class Bucket; end
1664
- end
1665
-
1666
- # Replaces an identifier with a surrogate using Format Preserving Encryption
1667
- # (FPE) with the FFX mode of operation; however when used in the
1668
- # `ReidentifyContent` API method, it serves the opposite function by reversing
1669
- # the surrogate back into the original identifier. The identifier must be
1670
- # encoded as ASCII. For a given crypto key and context, the same identifier
1671
- # will be replaced with the same surrogate. Identifiers must be at least two
1672
- # characters long. In the case that the identifier is the empty string, it will
1673
- # be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
1674
- # more.
1675
- #
1676
- # Note: We recommend using CryptoDeterministicConfig for all use cases which
1677
- # do not require preserving the input alphabet space and size, plus warrant
1678
- # referential integrity.
1679
- # @!attribute [rw] crypto_key
1680
- # @return [Google::Privacy::Dlp::V2::CryptoKey]
1681
- # Required. The key used by the encryption algorithm.
1682
- # @!attribute [rw] context
1683
- # @return [Google::Privacy::Dlp::V2::FieldId]
1684
- # The 'tweak', a context may be used for higher security since the same
1685
- # identifier in two different contexts won't be given the same surrogate. If
1686
- # the context is not set, a default tweak will be used.
1687
- #
1688
- # If the context is set but:
1689
- #
1690
- # 1. there is no record present when transforming a given value or
1691
- # 1. the field is not present when transforming a given value,
1692
- #
1693
- # a default tweak will be used.
1694
- #
1695
- # Note that case (1) is expected when an `InfoTypeTransformation` is
1696
- # applied to both structured and non-structured `ContentItem`s.
1697
- # Currently, the referenced field may be of value type integer or string.
1698
- #
1699
- # The tweak is constructed as a sequence of bytes in big endian byte order
1700
- # such that:
1701
- #
1702
- # * a 64 bit integer is encoded followed by a single byte of value 1
1703
- # * a string is encoded in UTF-8 format followed by a single byte of value 2
1704
- # @!attribute [rw] common_alphabet
1705
- # @return [Google::Privacy::Dlp::V2::CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet]
1706
- # Common alphabets.
1707
- # @!attribute [rw] custom_alphabet
1708
- # @return [String]
1709
- # This is supported by mapping these to the alphanumeric characters
1710
- # that the FFX mode natively supports. This happens before/after
1711
- # encryption/decryption.
1712
- # Each character listed must appear only once.
1713
- # Number of characters must be in the range [2, 95].
1714
- # This must be encoded as ASCII.
1715
- # The order of characters does not matter.
1716
- # @!attribute [rw] radix
1717
- # @return [Integer]
1718
- # The native way to select the alphabet. Must be in the range [2, 95].
1719
- # @!attribute [rw] surrogate_info_type
1720
- # @return [Google::Privacy::Dlp::V2::InfoType]
1721
- # The custom infoType to annotate the surrogate with.
1722
- # This annotation will be applied to the surrogate by prefixing it with
1723
- # the name of the custom infoType followed by the number of
1724
- # characters comprising the surrogate. The following scheme defines the
1725
- # format: info_type_name(surrogate_character_count):surrogate
1726
- #
1727
- # For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
1728
- # the surrogate is 'abc', the full replacement value
1729
- # will be: 'MY_TOKEN_INFO_TYPE(3):abc'
1730
- #
1731
- # This annotation identifies the surrogate when inspecting content using the
1732
- # custom infoType
1733
- # [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
1734
- # This facilitates reversal of the surrogate when it occurs in free text.
1735
- #
1736
- # In order for inspection to work properly, the name of this infoType must
1737
- # not occur naturally anywhere in your data; otherwise, inspection may
1738
- # find a surrogate that does not correspond to an actual identifier.
1739
- # Therefore, choose your custom infoType name carefully after considering
1740
- # what your data looks like. One way to select a name that has a high chance
1741
- # of yielding reliable detection is to include one or more unicode characters
1742
- # that are highly improbable to exist in your data.
1743
- # For example, assuming your data is entered from a regular ASCII keyboard,
1744
- # the symbol with the hex code point 29DD might be used like so:
1745
- # ⧝MY_TOKEN_TYPE
1746
- class CryptoReplaceFfxFpeConfig
1747
- # These are commonly used subsets of the alphabet that the FFX mode
1748
- # natively supports. In the algorithm, the alphabet is selected using
1749
- # the "radix". Therefore each corresponds to particular radix.
1750
- module FfxCommonNativeAlphabet
1751
- # Unused.
1752
- FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0
1753
-
1754
- # [0-9] (radix of 10)
1755
- NUMERIC = 1
1756
-
1757
- # [0-9A-F] (radix of 16)
1758
- HEXADECIMAL = 2
1759
-
1760
- # [0-9A-Z] (radix of 36)
1761
- UPPER_CASE_ALPHA_NUMERIC = 3
1762
-
1763
- # [0-9A-Za-z] (radix of 62)
1764
- ALPHA_NUMERIC = 4
1765
- end
1766
- end
1767
-
1768
- # This is a data encryption key (DEK) (as opposed to
1769
- # a key encryption key (KEK) stored by KMS).
1770
- # When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
1771
- # IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot
1772
- # unwrap the data crypto key.
1773
- # @!attribute [rw] transient
1774
- # @return [Google::Privacy::Dlp::V2::TransientCryptoKey]
1775
- # Transient crypto key
1776
- # @!attribute [rw] unwrapped
1777
- # @return [Google::Privacy::Dlp::V2::UnwrappedCryptoKey]
1778
- # Unwrapped crypto key
1779
- # @!attribute [rw] kms_wrapped
1780
- # @return [Google::Privacy::Dlp::V2::KmsWrappedCryptoKey]
1781
- # Kms wrapped key
1782
- class CryptoKey; end
1783
-
1784
- # Use this to have a random data crypto key generated.
1785
- # It will be discarded after the request finishes.
1786
- # @!attribute [rw] name
1787
- # @return [String]
1788
- # Required. Name of the key.
1789
- # This is an arbitrary string used to differentiate different keys.
1790
- # A unique key is generated per name: two separate `TransientCryptoKey`
1791
- # protos share the same generated key if their names are the same.
1792
- # When the data crypto key is generated, this name is not used in any way
1793
- # (repeating the api call will result in a different key being generated).
1794
- class TransientCryptoKey; end
1795
-
1796
- # Using raw keys is prone to security risks due to accidentally
1797
- # leaking the key. Choose another type of key if possible.
1798
- # @!attribute [rw] key
1799
- # @return [String]
1800
- # Required. A 128/192/256 bit key.
1801
- class UnwrappedCryptoKey; end
1802
-
1803
- # Include to use an existing data crypto key wrapped by KMS.
1804
- # The wrapped key must be a 128/192/256 bit key.
1805
- # Authorization requires the following IAM permissions when sending a request
1806
- # to perform a crypto transformation using a kms-wrapped crypto key:
1807
- # dlp.kms.encrypt
1808
- # @!attribute [rw] wrapped_key
1809
- # @return [String]
1810
- # Required. The wrapped data crypto key.
1811
- # @!attribute [rw] crypto_key_name
1812
- # @return [String]
1813
- # Required. The resource name of the KMS CryptoKey to use for unwrapping.
1814
- class KmsWrappedCryptoKey; end
1815
-
1816
- # Shifts dates by random number of days, with option to be consistent for the
1817
- # same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
1818
- # to learn more.
1819
- # @!attribute [rw] upper_bound_days
1820
- # @return [Integer]
1821
- # Required. Range of shift in days. Actual shift will be selected at random
1822
- # within this range (inclusive ends). Negative means shift to earlier in
1823
- # time. Must not be more than 365250 days (1000 years) each direction.
1824
- #
1825
- # For example, 3 means shift date to at most 3 days into the future.
1826
- # @!attribute [rw] lower_bound_days
1827
- # @return [Integer]
1828
- # Required. For example, -5 means shift date to at most 5 days back in the
1829
- # past.
1830
- # @!attribute [rw] context
1831
- # @return [Google::Privacy::Dlp::V2::FieldId]
1832
- # Points to the field that contains the context, for example, an entity id.
1833
- # If set, must also set cryptoKey. If set, shift will be consistent for the
1834
- # given context.
1835
- # @!attribute [rw] crypto_key
1836
- # @return [Google::Privacy::Dlp::V2::CryptoKey]
1837
- # Causes the shift to be computed based on this key and the context. This
1838
- # results in the same shift for the same context and crypto_key. If
1839
- # set, must also set context. Can only be applied to table items.
1840
- class DateShiftConfig; end
1841
-
1842
- # A type of transformation that will scan unstructured text and
1843
- # apply various `PrimitiveTransformation`s to each finding, where the
1844
- # transformation is applied to only values that were identified as a specific
1845
- # info_type.
1846
- # @!attribute [rw] transformations
1847
- # @return [Array<Google::Privacy::Dlp::V2::InfoTypeTransformations::InfoTypeTransformation>]
1848
- # Required. Transformation for each infoType. Cannot specify more than one
1849
- # for a given infoType.
1850
- class InfoTypeTransformations
1851
- # A transformation to apply to text that is identified as a specific
1852
- # info_type.
1853
- # @!attribute [rw] info_types
1854
- # @return [Array<Google::Privacy::Dlp::V2::InfoType>]
1855
- # InfoTypes to apply the transformation to. An empty list will cause
1856
- # this transformation to apply to all findings that correspond to
1857
- # infoTypes that were requested in `InspectConfig`.
1858
- # @!attribute [rw] primitive_transformation
1859
- # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1860
- # Required. Primitive transformation to apply to the infoType.
1861
- class InfoTypeTransformation; end
1862
- end
1863
-
1864
- # The transformation to apply to the field.
1865
- # @!attribute [rw] fields
1866
- # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
1867
- # Required. Input field(s) to apply the transformation to.
1868
- # @!attribute [rw] condition
1869
- # @return [Google::Privacy::Dlp::V2::RecordCondition]
1870
- # Only apply the transformation if the condition evaluates to true for the
1871
- # given `RecordCondition`. The conditions are allowed to reference fields
1872
- # that are not used in the actual transformation.
1873
- #
1874
- # Example Use Cases:
1875
- #
1876
- # * Apply a different bucket transformation to an age column if the zip code
1877
- # column for the same record is within a specific range.
1878
- # * Redact a field if the date of birth field is greater than 85.
1879
- # @!attribute [rw] primitive_transformation
1880
- # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1881
- # Apply the transformation to the entire field.
1882
- # @!attribute [rw] info_type_transformations
1883
- # @return [Google::Privacy::Dlp::V2::InfoTypeTransformations]
1884
- # Treat the contents of the field as free text, and selectively
1885
- # transform content that matches an `InfoType`.
1886
- class FieldTransformation; end
1887
-
1888
- # A type of transformation that is applied over structured data such as a
1889
- # table.
1890
- # @!attribute [rw] field_transformations
1891
- # @return [Array<Google::Privacy::Dlp::V2::FieldTransformation>]
1892
- # Transform the record by applying various field transformations.
1893
- # @!attribute [rw] record_suppressions
1894
- # @return [Array<Google::Privacy::Dlp::V2::RecordSuppression>]
1895
- # Configuration defining which records get suppressed entirely. Records that
1896
- # match any suppression rule are omitted from the output.
1897
- class RecordTransformations; end
1898
-
1899
- # Configuration to suppress records whose suppression conditions evaluate to
1900
- # true.
1901
- # @!attribute [rw] condition
1902
- # @return [Google::Privacy::Dlp::V2::RecordCondition]
1903
- # A condition that when it evaluates to true will result in the record being
1904
- # evaluated to be suppressed from the transformed content.
1905
- class RecordSuppression; end
1906
-
1907
- # A condition for determining whether a transformation should be applied to
1908
- # a field.
1909
- # @!attribute [rw] expressions
1910
- # @return [Google::Privacy::Dlp::V2::RecordCondition::Expressions]
1911
- # An expression.
1912
- class RecordCondition
1913
- # The field type of `value` and `field` do not need to match to be
1914
- # considered equal, but not all comparisons are possible.
1915
- # EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
1916
- # but all other comparisons are invalid with incompatible types.
1917
- # A `value` of type:
1918
- #
1919
- # * `string` can be compared against all other types
1920
- # * `boolean` can only be compared against other booleans
1921
- # * `integer` can be compared against doubles or a string if the string value
1922
- # can be parsed as an integer.
1923
- # * `double` can be compared against integers or a string if the string can
1924
- # be parsed as a double.
1925
- # * `Timestamp` can be compared against strings in RFC 3339 date string
1926
- # format.
1927
- # * `TimeOfDay` can be compared against timestamps and strings in the format
1928
- # of 'HH:mm:ss'.
1929
- #
1930
- # If we fail to compare do to type mismatch, a warning will be given and
1931
- # the condition will evaluate to false.
1932
- # @!attribute [rw] field
1933
- # @return [Google::Privacy::Dlp::V2::FieldId]
1934
- # Required. Field within the record this condition is evaluated against.
1935
- # @!attribute [rw] operator
1936
- # @return [Google::Privacy::Dlp::V2::RelationalOperator]
1937
- # Required. Operator used to compare the field or infoType to the value.
1938
- # @!attribute [rw] value
1939
- # @return [Google::Privacy::Dlp::V2::Value]
1940
- # Value to compare against. [Mandatory, except for `EXISTS` tests.]
1941
- class Condition; end
1942
-
1943
- # A collection of conditions.
1944
- # @!attribute [rw] conditions
1945
- # @return [Array<Google::Privacy::Dlp::V2::RecordCondition::Condition>]
1946
- # A collection of conditions.
1947
- class Conditions; end
1948
-
1949
- # An expression, consisting or an operator and conditions.
1950
- # @!attribute [rw] logical_operator
1951
- # @return [Google::Privacy::Dlp::V2::RecordCondition::Expressions::LogicalOperator]
1952
- # The operator to apply to the result of conditions. Default and currently
1953
- # only supported value is `AND`.
1954
- # @!attribute [rw] conditions
1955
- # @return [Google::Privacy::Dlp::V2::RecordCondition::Conditions]
1956
- # Conditions to apply to the expression.
1957
- class Expressions
1958
- # Logical operators for conditional checks.
1959
- module LogicalOperator
1960
- # Unused
1961
- LOGICAL_OPERATOR_UNSPECIFIED = 0
1962
-
1963
- # Conditional AND
1964
- AND = 1
1965
- end
1966
- end
1967
- end
1968
-
1969
- # Overview of the modifications that occurred.
1970
- # @!attribute [rw] transformed_bytes
1971
- # @return [Integer]
1972
- # Total size in bytes that were transformed in some way.
1973
- # @!attribute [rw] transformation_summaries
1974
- # @return [Array<Google::Privacy::Dlp::V2::TransformationSummary>]
1975
- # Transformations applied to the dataset.
1976
- class TransformationOverview; end
1977
-
1978
- # Summary of a single transformation.
1979
- # Only one of 'transformation', 'field_transformation', or 'record_suppress'
1980
- # will be set.
1981
- # @!attribute [rw] info_type
1982
- # @return [Google::Privacy::Dlp::V2::InfoType]
1983
- # Set if the transformation was limited to a specific InfoType.
1984
- # @!attribute [rw] field
1985
- # @return [Google::Privacy::Dlp::V2::FieldId]
1986
- # Set if the transformation was limited to a specific FieldId.
1987
- # @!attribute [rw] transformation
1988
- # @return [Google::Privacy::Dlp::V2::PrimitiveTransformation]
1989
- # The specific transformation these stats apply to.
1990
- # @!attribute [rw] field_transformations
1991
- # @return [Array<Google::Privacy::Dlp::V2::FieldTransformation>]
1992
- # The field transformation that was applied.
1993
- # If multiple field transformations are requested for a single field,
1994
- # this list will contain all of them; otherwise, only one is supplied.
1995
- # @!attribute [rw] record_suppress
1996
- # @return [Google::Privacy::Dlp::V2::RecordSuppression]
1997
- # The specific suppression option these stats apply to.
1998
- # @!attribute [rw] results
1999
- # @return [Array<Google::Privacy::Dlp::V2::TransformationSummary::SummaryResult>]
2000
- # Collection of all transformations that took place or had an error.
2001
- # @!attribute [rw] transformed_bytes
2002
- # @return [Integer]
2003
- # Total size in bytes that were transformed in some way.
2004
- class TransformationSummary
2005
- # A collection that informs the user the number of times a particular
2006
- # `TransformationResultCode` and error details occurred.
2007
- # @!attribute [rw] count
2008
- # @return [Integer]
2009
- # Number of transformations counted by this result.
2010
- # @!attribute [rw] code
2011
- # @return [Google::Privacy::Dlp::V2::TransformationSummary::TransformationResultCode]
2012
- # Outcome of the transformation.
2013
- # @!attribute [rw] details
2014
- # @return [String]
2015
- # A place for warnings or errors to show up if a transformation didn't
2016
- # work as expected.
2017
- class SummaryResult; end
2018
-
2019
- # Possible outcomes of transformations.
2020
- module TransformationResultCode
2021
- # Unused
2022
- TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0
2023
-
2024
- # Transformation completed without an error.
2025
- SUCCESS = 1
2026
-
2027
- # Transformation had an error.
2028
- ERROR = 2
2029
- end
2030
- end
2031
-
2032
- # Schedule for triggeredJobs.
2033
- # @!attribute [rw] recurrence_period_duration
2034
- # @return [Google::Protobuf::Duration]
2035
- # With this option a job is started a regular periodic basis. For
2036
- # example: every day (86400 seconds).
2037
- #
2038
- # A scheduled start time will be skipped if the previous
2039
- # execution has not ended when its scheduled time occurs.
2040
- #
2041
- # This value must be set to a time duration greater than or equal
2042
- # to 1 day and can be no longer than 60 days.
2043
- class Schedule; end
2044
-
2045
- # Job trigger option for hybrid jobs. Jobs must be manually created
2046
- # and finished.
2047
- class Manual; end
2048
-
2049
- # The inspectTemplate contains a configuration (set of types of sensitive data
2050
- # to be detected) to be used anywhere you otherwise would normally specify
2051
- # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
2052
- # to learn more.
2053
- # @!attribute [rw] name
2054
- # @return [String]
2055
- # Output only. The template name.
2056
- #
2057
- # The template will have one of the following formats:
2058
- # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
2059
- # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
2060
- # @!attribute [rw] display_name
2061
- # @return [String]
2062
- # Display name (max 256 chars).
2063
- # @!attribute [rw] description
2064
- # @return [String]
2065
- # Short description (max 256 chars).
2066
- # @!attribute [rw] create_time
2067
- # @return [Google::Protobuf::Timestamp]
2068
- # Output only. The creation timestamp of an inspectTemplate.
2069
- # @!attribute [rw] update_time
2070
- # @return [Google::Protobuf::Timestamp]
2071
- # Output only. The last update timestamp of an inspectTemplate.
2072
- # @!attribute [rw] inspect_config
2073
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
2074
- # The core content of the template. Configuration of the scanning process.
2075
- class InspectTemplate; end
2076
-
2077
- # DeidentifyTemplates contains instructions on how to de-identify content.
2078
- # See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
2079
- # @!attribute [rw] name
2080
- # @return [String]
2081
- # Output only. The template name.
2082
- #
2083
- # The template will have one of the following formats:
2084
- # `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
2085
- # `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
2086
- # @!attribute [rw] display_name
2087
- # @return [String]
2088
- # Display name (max 256 chars).
2089
- # @!attribute [rw] description
2090
- # @return [String]
2091
- # Short description (max 256 chars).
2092
- # @!attribute [rw] create_time
2093
- # @return [Google::Protobuf::Timestamp]
2094
- # Output only. The creation timestamp of an inspectTemplate.
2095
- # @!attribute [rw] update_time
2096
- # @return [Google::Protobuf::Timestamp]
2097
- # Output only. The last update timestamp of an inspectTemplate.
2098
- # @!attribute [rw] deidentify_config
2099
- # @return [Google::Privacy::Dlp::V2::DeidentifyConfig]
2100
- # ///////////// // The core content of the template // ///////////////
2101
- class DeidentifyTemplate; end
2102
-
2103
- # Details information about an error encountered during job execution or
2104
- # the results of an unsuccessful activation of the JobTrigger.
2105
- # @!attribute [rw] details
2106
- # @return [Google::Rpc::Status]
2107
- # Detailed error codes and messages.
2108
- # @!attribute [rw] timestamps
2109
- # @return [Array<Google::Protobuf::Timestamp>]
2110
- # The times the error occurred.
2111
- class Error; end
2112
-
2113
- # Contains a configuration to make dlp api calls on a repeating basis.
2114
- # See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
2115
- # @!attribute [rw] name
2116
- # @return [String]
2117
- # Unique resource name for the triggeredJob, assigned by the service when the
2118
- # triggeredJob is created, for example
2119
- # `projects/dlp-test-project/jobTriggers/53234423`.
2120
- # @!attribute [rw] display_name
2121
- # @return [String]
2122
- # Display name (max 100 chars)
2123
- # @!attribute [rw] description
2124
- # @return [String]
2125
- # User provided description (max 256 chars)
2126
- # @!attribute [rw] inspect_job
2127
- # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
2128
- # For inspect jobs, a snapshot of the configuration.
2129
- # @!attribute [rw] triggers
2130
- # @return [Array<Google::Privacy::Dlp::V2::JobTrigger::Trigger>]
2131
- # A list of triggers which will be OR'ed together. Only one in the list
2132
- # needs to trigger for a job to be started. The list may contain only
2133
- # a single Schedule trigger and must have at least one object.
2134
- # @!attribute [rw] errors
2135
- # @return [Array<Google::Privacy::Dlp::V2::Error>]
2136
- # Output only. A stream of errors encountered when the trigger was activated.
2137
- # Repeated errors may result in the JobTrigger automatically being paused.
2138
- # Will return the last 100 errors. Whenever the JobTrigger is modified
2139
- # this list will be cleared.
2140
- # @!attribute [rw] create_time
2141
- # @return [Google::Protobuf::Timestamp]
2142
- # Output only. The creation timestamp of a triggeredJob.
2143
- # @!attribute [rw] update_time
2144
- # @return [Google::Protobuf::Timestamp]
2145
- # Output only. The last update timestamp of a triggeredJob.
2146
- # @!attribute [rw] last_run_time
2147
- # @return [Google::Protobuf::Timestamp]
2148
- # Output only. The timestamp of the last time this trigger executed.
2149
- # @!attribute [rw] status
2150
- # @return [Google::Privacy::Dlp::V2::JobTrigger::Status]
2151
- # Required. A status for this trigger.
2152
- class JobTrigger
2153
- # What event needs to occur for a new job to be started.
2154
- # @!attribute [rw] schedule
2155
- # @return [Google::Privacy::Dlp::V2::Schedule]
2156
- # Create a job on a repeating basis based on the elapse of time.
2157
- # @!attribute [rw] manual
2158
- # @return [Google::Privacy::Dlp::V2::Manual]
2159
- # For use with hybrid jobs. Jobs must be manually created and finished.
2160
- # Early access feature is in a pre-release state and might change or have
2161
- # limited support. For more information, see
2162
- # https://cloud.google.com/products#product-launch-stages.
2163
- class Trigger; end
2164
-
2165
- # Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs
2166
- # will be created with this configuration. The service may automatically
2167
- # pause triggers experiencing frequent errors. To restart a job, set the
2168
- # status to HEALTHY after correcting user errors.
2169
- module Status
2170
- # Unused.
2171
- STATUS_UNSPECIFIED = 0
2172
-
2173
- # Trigger is healthy.
2174
- HEALTHY = 1
2175
-
2176
- # Trigger is temporarily paused.
2177
- PAUSED = 2
2178
-
2179
- # Trigger is cancelled and can not be resumed.
2180
- CANCELLED = 3
2181
- end
2182
- end
2183
-
2184
- # A task to execute on the completion of a job.
2185
- # See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
2186
- # @!attribute [rw] save_findings
2187
- # @return [Google::Privacy::Dlp::V2::Action::SaveFindings]
2188
- # Save resulting findings in a provided location.
2189
- # @!attribute [rw] pub_sub
2190
- # @return [Google::Privacy::Dlp::V2::Action::PublishToPubSub]
2191
- # Publish a notification to a pubsub topic.
2192
- # @!attribute [rw] publish_summary_to_cscc
2193
- # @return [Google::Privacy::Dlp::V2::Action::PublishSummaryToCscc]
2194
- # Publish summary to Cloud Security Command Center (Alpha).
2195
- # @!attribute [rw] publish_findings_to_cloud_data_catalog
2196
- # @return [Google::Privacy::Dlp::V2::Action::PublishFindingsToCloudDataCatalog]
2197
- # Publish findings to Cloud Datahub.
2198
- # @!attribute [rw] job_notification_emails
2199
- # @return [Google::Privacy::Dlp::V2::Action::JobNotificationEmails]
2200
- # Enable email notification for project owners and editors on job's
2201
- # completion/failure.
2202
- # @!attribute [rw] publish_to_stackdriver
2203
- # @return [Google::Privacy::Dlp::V2::Action::PublishToStackdriver]
2204
- # Enable Stackdriver metric dlp.googleapis.com/finding_count.
2205
- class Action
2206
- # If set, the detailed findings will be persisted to the specified
2207
- # OutputStorageConfig. Only a single instance of this action can be
2208
- # specified.
2209
- # Compatible with: Inspect, Risk
2210
- # @!attribute [rw] output_config
2211
- # @return [Google::Privacy::Dlp::V2::OutputStorageConfig]
2212
- # Location to store findings outside of DLP.
2213
- class SaveFindings; end
2214
-
2215
- # Publish a message into given Pub/Sub topic when DlpJob has completed. The
2216
- # message contains a single field, `DlpJobName`, which is equal to the
2217
- # finished job's
2218
- # [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
2219
- # Compatible with: Inspect, Risk
2220
- # @!attribute [rw] topic
2221
- # @return [String]
2222
- # Cloud Pub/Sub topic to send notifications to. The topic must have given
2223
- # publishing access rights to the DLP API service account executing
2224
- # the long running DlpJob sending the notifications.
2225
- # Format is projects/\\{project}/topics/\\{topic}.
2226
- class PublishToPubSub; end
2227
-
2228
- # Publish the result summary of a DlpJob to the Cloud Security
2229
- # Command Center (CSCC Alpha).
2230
- # This action is only available for projects which are parts of
2231
- # an organization and whitelisted for the alpha Cloud Security Command
2232
- # Center.
2233
- # The action will publish count of finding instances and their info types.
2234
- # The summary of findings will be persisted in CSCC and are governed by CSCC
2235
- # service-specific policy, see https://cloud.google.com/terms/service-terms
2236
- # Only a single instance of this action can be specified.
2237
- # Compatible with: Inspect
2238
- class PublishSummaryToCscc; end
2239
-
2240
- # Publish findings of a DlpJob to Cloud Data Catalog. Labels summarizing the
2241
- # results of the DlpJob will be applied to the entry for the resource scanned
2242
- # in Cloud Data Catalog. Any labels previously written by another DlpJob will
2243
- # be deleted. InfoType naming patterns are strictly enforced when using this
2244
- # feature. Note that the findings will be persisted in Cloud Data Catalog
2245
- # storage and are governed by Data Catalog service-specific policy, see
2246
- # https://cloud.google.com/terms/service-terms
2247
- # Only a single instance of this action can be specified and only allowed if
2248
- # all resources being scanned are BigQuery tables.
2249
- # Compatible with: Inspect
2250
- class PublishFindingsToCloudDataCatalog; end
2251
-
2252
- # Enable email notification to project owners and editors on jobs's
2253
- # completion/failure.
2254
- class JobNotificationEmails; end
2255
-
2256
- # Enable Stackdriver metric dlp.googleapis.com/finding_count. This
2257
- # will publish a metric to stack driver on each infotype requested and
2258
- # how many findings were found for it. CustomDetectors will be bucketed
2259
- # as 'Custom' under the Stackdriver label 'info_type'.
2260
- class PublishToStackdriver; end
2261
- end
2262
-
2263
- # Request message for CreateInspectTemplate.
2264
- # @!attribute [rw] parent
2265
- # @return [String]
2266
- # Required. The parent resource name, for example projects/my-project-id or
2267
- # organizations/my-org-id.
2268
- # @!attribute [rw] inspect_template
2269
- # @return [Google::Privacy::Dlp::V2::InspectTemplate]
2270
- # Required. The InspectTemplate to create.
2271
- # @!attribute [rw] template_id
2272
- # @return [String]
2273
- # The template id can contain uppercase and lowercase letters,
2274
- # numbers, and hyphens; that is, it must match the regular
2275
- # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
2276
- # characters. Can be empty to allow the system to generate one.
2277
- # @!attribute [rw] location_id
2278
- # @return [String]
2279
- # The geographic location to store the inspection template. Reserved for
2280
- # future extensions.
2281
- class CreateInspectTemplateRequest; end
2282
-
2283
- # Request message for UpdateInspectTemplate.
2284
- # @!attribute [rw] name
2285
- # @return [String]
2286
- # Required. Resource name of organization and inspectTemplate to be updated,
2287
- # for example `organizations/433245324/inspectTemplates/432452342` or
2288
- # projects/project-id/inspectTemplates/432452342.
2289
- # @!attribute [rw] inspect_template
2290
- # @return [Google::Privacy::Dlp::V2::InspectTemplate]
2291
- # New InspectTemplate value.
2292
- # @!attribute [rw] update_mask
2293
- # @return [Google::Protobuf::FieldMask]
2294
- # Mask to control which fields get updated.
2295
- class UpdateInspectTemplateRequest; end
2296
-
2297
- # Request message for GetInspectTemplate.
2298
- # @!attribute [rw] name
2299
- # @return [String]
2300
- # Required. Resource name of the organization and inspectTemplate to be read,
2301
- # for example `organizations/433245324/inspectTemplates/432452342` or
2302
- # projects/project-id/inspectTemplates/432452342.
2303
- class GetInspectTemplateRequest; end
2304
-
2305
- # Request message for ListInspectTemplates.
2306
- # @!attribute [rw] parent
2307
- # @return [String]
2308
- # Required. The parent resource name, for example projects/my-project-id or
2309
- # organizations/my-org-id.
2310
- # @!attribute [rw] page_token
2311
- # @return [String]
2312
- # Page token to continue retrieval. Comes from previous call
2313
- # to `ListInspectTemplates`.
2314
- # @!attribute [rw] page_size
2315
- # @return [Integer]
2316
- # Size of the page, can be limited by server. If zero server returns
2317
- # a page of max size 100.
2318
- # @!attribute [rw] order_by
2319
- # @return [String]
2320
- # Comma separated list of fields to order by,
2321
- # followed by `asc` or `desc` postfix. This list is case-insensitive,
2322
- # default sorting order is ascending, redundant space characters are
2323
- # insignificant.
2324
- #
2325
- # Example: `name asc,update_time, create_time desc`
2326
- #
2327
- # Supported fields are:
2328
- #
2329
- # * `create_time`: corresponds to time the template was created.
2330
- # * `update_time`: corresponds to time the template was last updated.
2331
- # * `name`: corresponds to template's name.
2332
- # * `display_name`: corresponds to template's display name.
2333
- # @!attribute [rw] location_id
2334
- # @return [String]
2335
- # The geographic location where inspection templates will be retrieved from.
2336
- # Use `-` for all locations. Reserved for future extensions.
2337
- class ListInspectTemplatesRequest; end
2338
-
2339
- # Response message for ListInspectTemplates.
2340
- # @!attribute [rw] inspect_templates
2341
- # @return [Array<Google::Privacy::Dlp::V2::InspectTemplate>]
2342
- # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
2343
- # @!attribute [rw] next_page_token
2344
- # @return [String]
2345
- # If the next page is available then the next page token to be used
2346
- # in following ListInspectTemplates request.
2347
- class ListInspectTemplatesResponse; end
2348
-
2349
- # Request message for DeleteInspectTemplate.
2350
- # @!attribute [rw] name
2351
- # @return [String]
2352
- # Required. Resource name of the organization and inspectTemplate to be
2353
- # deleted, for example `organizations/433245324/inspectTemplates/432452342`
2354
- # or projects/project-id/inspectTemplates/432452342.
2355
- class DeleteInspectTemplateRequest; end
2356
-
2357
- # Request message for CreateJobTrigger.
2358
- # @!attribute [rw] parent
2359
- # @return [String]
2360
- # Required. The parent resource name, for example projects/my-project-id.
2361
- # @!attribute [rw] job_trigger
2362
- # @return [Google::Privacy::Dlp::V2::JobTrigger]
2363
- # Required. The JobTrigger to create.
2364
- # @!attribute [rw] trigger_id
2365
- # @return [String]
2366
- # The trigger id can contain uppercase and lowercase letters,
2367
- # numbers, and hyphens; that is, it must match the regular
2368
- # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
2369
- # characters. Can be empty to allow the system to generate one.
2370
- # @!attribute [rw] location_id
2371
- # @return [String]
2372
- # The geographic location to store the job trigger. Reserved for
2373
- # future extensions.
2374
- class CreateJobTriggerRequest; end
2375
-
2376
- # Request message for ActivateJobTrigger.
2377
- # @!attribute [rw] name
2378
- # @return [String]
2379
- # Required. Resource name of the trigger to activate, for example
2380
- # `projects/dlp-test-project/jobTriggers/53234423`.
2381
- class ActivateJobTriggerRequest; end
2382
-
2383
- # Request message for UpdateJobTrigger.
2384
- # @!attribute [rw] name
2385
- # @return [String]
2386
- # Required. Resource name of the project and the triggeredJob, for example
2387
- # `projects/dlp-test-project/jobTriggers/53234423`.
2388
- # @!attribute [rw] job_trigger
2389
- # @return [Google::Privacy::Dlp::V2::JobTrigger]
2390
- # New JobTrigger value.
2391
- # @!attribute [rw] update_mask
2392
- # @return [Google::Protobuf::FieldMask]
2393
- # Mask to control which fields get updated.
2394
- class UpdateJobTriggerRequest; end
2395
-
2396
- # Request message for GetJobTrigger.
2397
- # @!attribute [rw] name
2398
- # @return [String]
2399
- # Required. Resource name of the project and the triggeredJob, for example
2400
- # `projects/dlp-test-project/jobTriggers/53234423`.
2401
- class GetJobTriggerRequest; end
2402
-
2403
- # Request message for CreateDlpJobRequest. Used to initiate long running
2404
- # jobs such as calculating risk metrics or inspecting Google Cloud
2405
- # Storage.
2406
- # @!attribute [rw] parent
2407
- # @return [String]
2408
- # Required. The parent resource name, for example projects/my-project-id.
2409
- # @!attribute [rw] inspect_job
2410
- # @return [Google::Privacy::Dlp::V2::InspectJobConfig]
2411
- # Set to control what and how to inspect.
2412
- # @!attribute [rw] risk_job
2413
- # @return [Google::Privacy::Dlp::V2::RiskAnalysisJobConfig]
2414
- # Set to choose what metric to calculate.
2415
- # @!attribute [rw] job_id
2416
- # @return [String]
2417
- # The job id can contain uppercase and lowercase letters,
2418
- # numbers, and hyphens; that is, it must match the regular
2419
- # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
2420
- # characters. Can be empty to allow the system to generate one.
2421
- # @!attribute [rw] location_id
2422
- # @return [String]
2423
- # The geographic location to store and process the job. Reserved for
2424
- # future extensions.
2425
- class CreateDlpJobRequest; end
2426
-
2427
- # Request message for ListJobTriggers.
2428
- # @!attribute [rw] parent
2429
- # @return [String]
2430
- # Required. The parent resource name, for example `projects/my-project-id`.
2431
- # @!attribute [rw] page_token
2432
- # @return [String]
2433
- # Page token to continue retrieval. Comes from previous call
2434
- # to ListJobTriggers. `order_by` field must not
2435
- # change for subsequent calls.
2436
- # @!attribute [rw] page_size
2437
- # @return [Integer]
2438
- # Size of the page, can be limited by a server.
2439
- # @!attribute [rw] order_by
2440
- # @return [String]
2441
- # Comma separated list of triggeredJob fields to order by,
2442
- # followed by `asc` or `desc` postfix. This list is case-insensitive,
2443
- # default sorting order is ascending, redundant space characters are
2444
- # insignificant.
2445
- #
2446
- # Example: `name asc,update_time, create_time desc`
2447
- #
2448
- # Supported fields are:
2449
- #
2450
- # * `create_time`: corresponds to time the JobTrigger was created.
2451
- # * `update_time`: corresponds to time the JobTrigger was last updated.
2452
- # * `last_run_time`: corresponds to the last time the JobTrigger ran.
2453
- # * `name`: corresponds to JobTrigger's name.
2454
- # * `display_name`: corresponds to JobTrigger's display name.
2455
- # * `status`: corresponds to JobTrigger's status.
2456
- # @!attribute [rw] filter
2457
- # @return [String]
2458
- # Allows filtering.
2459
- #
2460
- # Supported syntax:
2461
- #
2462
- # * Filter expressions are made up of one or more restrictions.
2463
- # * Restrictions can be combined by `AND` or `OR` logical operators. A
2464
- # sequence of restrictions implicitly uses `AND`.
2465
- # * A restriction has the form of `{field} {operator} {value}`.
2466
- # * Supported fields/values for inspect jobs:
2467
- # * `status` - HEALTHY|PAUSED|CANCELLED
2468
- # * `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2469
- # * 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
2470
- # quotation marks. Nanoseconds are ignored.
2471
- # * 'error_count' - Number of errors that have occurred while running.
2472
- # * The operator must be `=` or `!=` for status and inspected_storage.
2473
- #
2474
- # Examples:
2475
- #
2476
- # * inspected_storage = cloud_storage AND status = HEALTHY
2477
- # * inspected_storage = cloud_storage OR inspected_storage = bigquery
2478
- # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
2479
- # * last_run_time > \"2017-12-12T00:00:00+00:00\"
2480
- #
2481
- # The length of this field should be no more than 500 characters.
2482
- # @!attribute [rw] location_id
2483
- # @return [String]
2484
- # The geographic location where job triggers will be retrieved from.
2485
- # Use `-` for all locations. Reserved for future extensions.
2486
- class ListJobTriggersRequest; end
2487
-
2488
- # Response message for ListJobTriggers.
2489
- # @!attribute [rw] job_triggers
2490
- # @return [Array<Google::Privacy::Dlp::V2::JobTrigger>]
2491
- # List of triggeredJobs, up to page_size in ListJobTriggersRequest.
2492
- # @!attribute [rw] next_page_token
2493
- # @return [String]
2494
- # If the next page is available then the next page token to be used
2495
- # in following ListJobTriggers request.
2496
- class ListJobTriggersResponse; end
2497
-
2498
- # Request message for DeleteJobTrigger.
2499
- # @!attribute [rw] name
2500
- # @return [String]
2501
- # Required. Resource name of the project and the triggeredJob, for example
2502
- # `projects/dlp-test-project/jobTriggers/53234423`.
2503
- class DeleteJobTriggerRequest; end
2504
-
2505
- # Controls what and how to inspect for findings.
2506
- # @!attribute [rw] storage_config
2507
- # @return [Google::Privacy::Dlp::V2::StorageConfig]
2508
- # The data to scan.
2509
- # @!attribute [rw] inspect_config
2510
- # @return [Google::Privacy::Dlp::V2::InspectConfig]
2511
- # How and what to scan for.
2512
- # @!attribute [rw] inspect_template_name
2513
- # @return [String]
2514
- # If provided, will be used as the default for all values in InspectConfig.
2515
- # `inspect_config` will be merged into the values persisted as part of the
2516
- # template.
2517
- # @!attribute [rw] actions
2518
- # @return [Array<Google::Privacy::Dlp::V2::Action>]
2519
- # Actions to execute at the completion of the job.
2520
- class InspectJobConfig; end
2521
-
2522
- # Combines all of the information about a DLP job.
2523
- # @!attribute [rw] name
2524
- # @return [String]
2525
- # The server-assigned name.
2526
- # @!attribute [rw] type
2527
- # @return [Google::Privacy::Dlp::V2::DlpJobType]
2528
- # The type of job.
2529
- # @!attribute [rw] state
2530
- # @return [Google::Privacy::Dlp::V2::DlpJob::JobState]
2531
- # State of a job.
2532
- # @!attribute [rw] risk_details
2533
- # @return [Google::Privacy::Dlp::V2::AnalyzeDataSourceRiskDetails]
2534
- # Results from analyzing risk of a data source.
2535
- # @!attribute [rw] inspect_details
2536
- # @return [Google::Privacy::Dlp::V2::InspectDataSourceDetails]
2537
- # Results from inspecting a data source.
2538
- # @!attribute [rw] create_time
2539
- # @return [Google::Protobuf::Timestamp]
2540
- # Time when the job was created.
2541
- # @!attribute [rw] start_time
2542
- # @return [Google::Protobuf::Timestamp]
2543
- # Time when the job started.
2544
- # @!attribute [rw] end_time
2545
- # @return [Google::Protobuf::Timestamp]
2546
- # Time when the job finished.
2547
- # @!attribute [rw] job_trigger_name
2548
- # @return [String]
2549
- # If created by a job trigger, the resource name of the trigger that
2550
- # instantiated the job.
2551
- # @!attribute [rw] errors
2552
- # @return [Array<Google::Privacy::Dlp::V2::Error>]
2553
- # A stream of errors encountered running the job.
2554
- class DlpJob
2555
- # Possible states of a job. New items may be added.
2556
- module JobState
2557
- # Unused.
2558
- JOB_STATE_UNSPECIFIED = 0
2559
-
2560
- # The job has not yet started.
2561
- PENDING = 1
2562
-
2563
- # The job is currently running. Once a job has finished it will transition
2564
- # to FAILED or DONE.
2565
- RUNNING = 2
2566
-
2567
- # The job is no longer running.
2568
- DONE = 3
2569
-
2570
- # The job was canceled before it could complete.
2571
- CANCELED = 4
2572
-
2573
- # The job had an error and did not complete.
2574
- FAILED = 5
2575
-
2576
- # The job is currently accepting findings via hybridInspect.
2577
- # A hybrid job in ACTIVE state may continue to have findings added to it
2578
- # through calling of hybridInspect. After the job has finished no more
2579
- # calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
2580
- ACTIVE = 6
2581
- end
2582
- end
2583
-
2584
- # The request message for {DlpJobs::GetDlpJob}.
2585
- # @!attribute [rw] name
2586
- # @return [String]
2587
- # Required. The name of the DlpJob resource.
2588
- class GetDlpJobRequest; end
2589
-
2590
- # The request message for listing DLP jobs.
2591
- # @!attribute [rw] parent
2592
- # @return [String]
2593
- # Required. The parent resource name, for example projects/my-project-id.
2594
- # @!attribute [rw] filter
2595
- # @return [String]
2596
- # Allows filtering.
2597
- #
2598
- # Supported syntax:
2599
- #
2600
- # * Filter expressions are made up of one or more restrictions.
2601
- # * Restrictions can be combined by `AND` or `OR` logical operators. A
2602
- # sequence of restrictions implicitly uses `AND`.
2603
- # * A restriction has the form of `{field} {operator} {value}`.
2604
- # * Supported fields/values for inspect jobs:
2605
- # * `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
2606
- # * `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2607
- # * `trigger_name` - The resource name of the trigger that created job.
2608
- # * 'end_time` - Corresponds to time the job finished.
2609
- # * 'start_time` - Corresponds to time the job finished.
2610
- # * Supported fields for risk analysis jobs:
2611
- # * `state` - RUNNING|CANCELED|FINISHED|FAILED
2612
- # * 'end_time` - Corresponds to time the job finished.
2613
- # * 'start_time` - Corresponds to time the job finished.
2614
- # * The operator must be `=` or `!=`.
2615
- #
2616
- # Examples:
2617
- #
2618
- # * inspected_storage = cloud_storage AND state = done
2619
- # * inspected_storage = cloud_storage OR inspected_storage = bigquery
2620
- # * inspected_storage = cloud_storage AND (state = done OR state = canceled)
2621
- # * end_time > \"2017-12-12T00:00:00+00:00\"
2622
- #
2623
- # The length of this field should be no more than 500 characters.
2624
- # @!attribute [rw] page_size
2625
- # @return [Integer]
2626
- # The standard list page size.
2627
- # @!attribute [rw] page_token
2628
- # @return [String]
2629
- # The standard list page token.
2630
- # @!attribute [rw] type
2631
- # @return [Google::Privacy::Dlp::V2::DlpJobType]
2632
- # The type of job. Defaults to `DlpJobType.INSPECT`
2633
- # @!attribute [rw] order_by
2634
- # @return [String]
2635
- # Comma separated list of fields to order by,
2636
- # followed by `asc` or `desc` postfix. This list is case-insensitive,
2637
- # default sorting order is ascending, redundant space characters are
2638
- # insignificant.
2639
- #
2640
- # Example: `name asc, end_time asc, create_time desc`
2641
- #
2642
- # Supported fields are:
2643
- #
2644
- # * `create_time`: corresponds to time the job was created.
2645
- # * `end_time`: corresponds to time the job ended.
2646
- # * `name`: corresponds to job's name.
2647
- # * `state`: corresponds to `state`
2648
- # @!attribute [rw] location_id
2649
- # @return [String]
2650
- # The geographic location where jobs will be retrieved from.
2651
- # Use `-` for all locations. Reserved for future extensions.
2652
- class ListDlpJobsRequest; end
2653
-
2654
- # The response message for listing DLP jobs.
2655
- # @!attribute [rw] jobs
2656
- # @return [Array<Google::Privacy::Dlp::V2::DlpJob>]
2657
- # A list of DlpJobs that matches the specified filter in the request.
2658
- # @!attribute [rw] next_page_token
2659
- # @return [String]
2660
- # The standard List next-page token.
2661
- class ListDlpJobsResponse; end
2662
-
2663
- # The request message for canceling a DLP job.
2664
- # @!attribute [rw] name
2665
- # @return [String]
2666
- # Required. The name of the DlpJob resource to be cancelled.
2667
- class CancelDlpJobRequest; end
2668
-
2669
- # The request message for finishing a DLP hybrid job.
2670
- # @!attribute [rw] name
2671
- # @return [String]
2672
- # Required. The name of the DlpJob resource to be cancelled.
2673
- class FinishDlpJobRequest; end
2674
-
2675
- # The request message for deleting a DLP job.
2676
- # @!attribute [rw] name
2677
- # @return [String]
2678
- # Required. The name of the DlpJob resource to be deleted.
2679
- class DeleteDlpJobRequest; end
2680
-
2681
- # Request message for CreateDeidentifyTemplate.
2682
- # @!attribute [rw] parent
2683
- # @return [String]
2684
- # Required. The parent resource name, for example projects/my-project-id or
2685
- # organizations/my-org-id.
2686
- # @!attribute [rw] deidentify_template
2687
- # @return [Google::Privacy::Dlp::V2::DeidentifyTemplate]
2688
- # Required. The DeidentifyTemplate to create.
2689
- # @!attribute [rw] template_id
2690
- # @return [String]
2691
- # The template id can contain uppercase and lowercase letters,
2692
- # numbers, and hyphens; that is, it must match the regular
2693
- # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
2694
- # characters. Can be empty to allow the system to generate one.
2695
- # @!attribute [rw] location_id
2696
- # @return [String]
2697
- # The geographic location to store the deidentification template. Reserved
2698
- # for future extensions.
2699
- class CreateDeidentifyTemplateRequest; end
2700
-
2701
- # Request message for UpdateDeidentifyTemplate.
2702
- # @!attribute [rw] name
2703
- # @return [String]
2704
- # Required. Resource name of organization and deidentify template to be
2705
- # updated, for example
2706
- # `organizations/433245324/deidentifyTemplates/432452342` or
2707
- # projects/project-id/deidentifyTemplates/432452342.
2708
- # @!attribute [rw] deidentify_template
2709
- # @return [Google::Privacy::Dlp::V2::DeidentifyTemplate]
2710
- # New DeidentifyTemplate value.
2711
- # @!attribute [rw] update_mask
2712
- # @return [Google::Protobuf::FieldMask]
2713
- # Mask to control which fields get updated.
2714
- class UpdateDeidentifyTemplateRequest; end
2715
-
2716
- # Request message for GetDeidentifyTemplate.
2717
- # @!attribute [rw] name
2718
- # @return [String]
2719
- # Required. Resource name of the organization and deidentify template to be
2720
- # read, for example `organizations/433245324/deidentifyTemplates/432452342`
2721
- # or projects/project-id/deidentifyTemplates/432452342.
2722
- class GetDeidentifyTemplateRequest; end
2723
-
2724
- # Request message for ListDeidentifyTemplates.
2725
- # @!attribute [rw] parent
2726
- # @return [String]
2727
- # Required. The parent resource name, for example projects/my-project-id or
2728
- # organizations/my-org-id.
2729
- # @!attribute [rw] page_token
2730
- # @return [String]
2731
- # Page token to continue retrieval. Comes from previous call
2732
- # to `ListDeidentifyTemplates`.
2733
- # @!attribute [rw] page_size
2734
- # @return [Integer]
2735
- # Size of the page, can be limited by server. If zero server returns
2736
- # a page of max size 100.
2737
- # @!attribute [rw] order_by
2738
- # @return [String]
2739
- # Comma separated list of fields to order by,
2740
- # followed by `asc` or `desc` postfix. This list is case-insensitive,
2741
- # default sorting order is ascending, redundant space characters are
2742
- # insignificant.
2743
- #
2744
- # Example: `name asc,update_time, create_time desc`
2745
- #
2746
- # Supported fields are:
2747
- #
2748
- # * `create_time`: corresponds to time the template was created.
2749
- # * `update_time`: corresponds to time the template was last updated.
2750
- # * `name`: corresponds to template's name.
2751
- # * `display_name`: corresponds to template's display name.
2752
- # @!attribute [rw] location_id
2753
- # @return [String]
2754
- # The geographic location where deidentifications templates will be retrieved
2755
- # from. Use `-` for all locations. Reserved for future extensions.
2756
- class ListDeidentifyTemplatesRequest; end
2757
-
2758
- # Response message for ListDeidentifyTemplates.
2759
- # @!attribute [rw] deidentify_templates
2760
- # @return [Array<Google::Privacy::Dlp::V2::DeidentifyTemplate>]
2761
- # List of deidentify templates, up to page_size in
2762
- # ListDeidentifyTemplatesRequest.
2763
- # @!attribute [rw] next_page_token
2764
- # @return [String]
2765
- # If the next page is available then the next page token to be used
2766
- # in following ListDeidentifyTemplates request.
2767
- class ListDeidentifyTemplatesResponse; end
2768
-
2769
- # Request message for DeleteDeidentifyTemplate.
2770
- # @!attribute [rw] name
2771
- # @return [String]
2772
- # Required. Resource name of the organization and deidentify template to be
2773
- # deleted, for example
2774
- # `organizations/433245324/deidentifyTemplates/432452342` or
2775
- # projects/project-id/deidentifyTemplates/432452342.
2776
- class DeleteDeidentifyTemplateRequest; end
2777
-
2778
- # Configuration for a custom dictionary created from a data source of any size
2779
- # up to the maximum size defined in the
2780
- # [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
2781
- # dictionary creation are stored in the specified Google Cloud Storage
2782
- # location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
2783
- # that satisfy the size requirements.
2784
- # @!attribute [rw] output_path
2785
- # @return [Google::Privacy::Dlp::V2::CloudStoragePath]
2786
- # Location to store dictionary artifacts in Google Cloud Storage. These files
2787
- # will only be accessible by project owners and the DLP API. If any of these
2788
- # artifacts are modified, the dictionary is considered invalid and can no
2789
- # longer be used.
2790
- # @!attribute [rw] cloud_storage_file_set
2791
- # @return [Google::Privacy::Dlp::V2::CloudStorageFileSet]
2792
- # Set of files containing newline-delimited lists of dictionary phrases.
2793
- # @!attribute [rw] big_query_field
2794
- # @return [Google::Privacy::Dlp::V2::BigQueryField]
2795
- # Field in a BigQuery table where each cell represents a dictionary phrase.
2796
- class LargeCustomDictionaryConfig; end
2797
-
2798
- # Summary statistics of a custom dictionary.
2799
- # @!attribute [rw] approx_num_phrases
2800
- # @return [Integer]
2801
- # Approximate number of distinct phrases in the dictionary.
2802
- class LargeCustomDictionaryStats; end
2803
-
2804
- # Configuration for stored infoTypes. All fields and subfield are provided
2805
- # by the user. For more information, see
2806
- # https://cloud.google.com/dlp/docs/creating-custom-infotypes.
2807
- # @!attribute [rw] display_name
2808
- # @return [String]
2809
- # Display name of the StoredInfoType (max 256 characters).
2810
- # @!attribute [rw] description
2811
- # @return [String]
2812
- # Description of the StoredInfoType (max 256 characters).
2813
- # @!attribute [rw] large_custom_dictionary
2814
- # @return [Google::Privacy::Dlp::V2::LargeCustomDictionaryConfig]
2815
- # StoredInfoType where findings are defined by a dictionary of phrases.
2816
- # @!attribute [rw] dictionary
2817
- # @return [Google::Privacy::Dlp::V2::CustomInfoType::Dictionary]
2818
- # Store dictionary-based CustomInfoType.
2819
- # @!attribute [rw] regex
2820
- # @return [Google::Privacy::Dlp::V2::CustomInfoType::Regex]
2821
- # Store regular expression-based StoredInfoType.
2822
- class StoredInfoTypeConfig; end
2823
-
2824
- # Statistics for a StoredInfoType.
2825
- # @!attribute [rw] large_custom_dictionary
2826
- # @return [Google::Privacy::Dlp::V2::LargeCustomDictionaryStats]
2827
- # StoredInfoType where findings are defined by a dictionary of phrases.
2828
- class StoredInfoTypeStats; end
2829
-
2830
- # Version of a StoredInfoType, including the configuration used to build it,
2831
- # create timestamp, and current state.
2832
- # @!attribute [rw] config
2833
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2834
- # StoredInfoType configuration.
2835
- # @!attribute [rw] create_time
2836
- # @return [Google::Protobuf::Timestamp]
2837
- # Create timestamp of the version. Read-only, determined by the system
2838
- # when the version is created.
2839
- # @!attribute [rw] state
2840
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeState]
2841
- # Stored info type version state. Read-only, updated by the system
2842
- # during dictionary creation.
2843
- # @!attribute [rw] errors
2844
- # @return [Array<Google::Privacy::Dlp::V2::Error>]
2845
- # Errors that occurred when creating this storedInfoType version, or
2846
- # anomalies detected in the storedInfoType data that render it unusable. Only
2847
- # the five most recent errors will be displayed, with the most recent error
2848
- # appearing first.
2849
- #
2850
- # For example, some of the data for stored custom dictionaries is put in
2851
- # the user's Google Cloud Storage bucket, and if this data is modified or
2852
- # deleted by the user or another system, the dictionary becomes invalid.
2853
- #
2854
- # If any errors occur, fix the problem indicated by the error message and
2855
- # use the UpdateStoredInfoType API method to create another version of the
2856
- # storedInfoType to continue using it, reusing the same `config` if it was
2857
- # not the source of the error.
2858
- # @!attribute [rw] stats
2859
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeStats]
2860
- # Statistics about this storedInfoType version.
2861
- class StoredInfoTypeVersion; end
2862
-
2863
- # StoredInfoType resource message that contains information about the current
2864
- # version and any pending updates.
2865
- # @!attribute [rw] name
2866
- # @return [String]
2867
- # Resource name.
2868
- # @!attribute [rw] current_version
2869
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeVersion]
2870
- # Current version of the stored info type.
2871
- # @!attribute [rw] pending_versions
2872
- # @return [Array<Google::Privacy::Dlp::V2::StoredInfoTypeVersion>]
2873
- # Pending versions of the stored info type. Empty if no versions are
2874
- # pending.
2875
- class StoredInfoType; end
2876
-
2877
- # Request message for CreateStoredInfoType.
2878
- # @!attribute [rw] parent
2879
- # @return [String]
2880
- # Required. The parent resource name, for example projects/my-project-id or
2881
- # organizations/my-org-id.
2882
- # @!attribute [rw] config
2883
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2884
- # Required. Configuration of the storedInfoType to create.
2885
- # @!attribute [rw] stored_info_type_id
2886
- # @return [String]
2887
- # The storedInfoType ID can contain uppercase and lowercase letters,
2888
- # numbers, and hyphens; that is, it must match the regular
2889
- # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
2890
- # characters. Can be empty to allow the system to generate one.
2891
- # @!attribute [rw] location_id
2892
- # @return [String]
2893
- # The geographic location to store the stored infoType. Reserved for
2894
- # future extensions.
2895
- class CreateStoredInfoTypeRequest; end
2896
-
2897
- # Request message for UpdateStoredInfoType.
2898
- # @!attribute [rw] name
2899
- # @return [String]
2900
- # Required. Resource name of organization and storedInfoType to be updated,
2901
- # for example `organizations/433245324/storedInfoTypes/432452342` or
2902
- # projects/project-id/storedInfoTypes/432452342.
2903
- # @!attribute [rw] config
2904
- # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2905
- # Updated configuration for the storedInfoType. If not provided, a new
2906
- # version of the storedInfoType will be created with the existing
2907
- # configuration.
2908
- # @!attribute [rw] update_mask
2909
- # @return [Google::Protobuf::FieldMask]
2910
- # Mask to control which fields get updated.
2911
- class UpdateStoredInfoTypeRequest; end
2912
-
2913
- # Request message for GetStoredInfoType.
2914
- # @!attribute [rw] name
2915
- # @return [String]
2916
- # Required. Resource name of the organization and storedInfoType to be read,
2917
- # for example `organizations/433245324/storedInfoTypes/432452342` or
2918
- # projects/project-id/storedInfoTypes/432452342.
2919
- class GetStoredInfoTypeRequest; end
2920
-
2921
- # Request message for ListStoredInfoTypes.
2922
- # @!attribute [rw] parent
2923
- # @return [String]
2924
- # Required. The parent resource name, for example projects/my-project-id or
2925
- # organizations/my-org-id.
2926
- # @!attribute [rw] page_token
2927
- # @return [String]
2928
- # Page token to continue retrieval. Comes from previous call
2929
- # to `ListStoredInfoTypes`.
2930
- # @!attribute [rw] page_size
2931
- # @return [Integer]
2932
- # Size of the page, can be limited by server. If zero server returns
2933
- # a page of max size 100.
2934
- # @!attribute [rw] order_by
2935
- # @return [String]
2936
- # Comma separated list of fields to order by,
2937
- # followed by `asc` or `desc` postfix. This list is case-insensitive,
2938
- # default sorting order is ascending, redundant space characters are
2939
- # insignificant.
2940
- #
2941
- # Example: `name asc, display_name, create_time desc`
2942
- #
2943
- # Supported fields are:
2944
- #
2945
- # * `create_time`: corresponds to time the most recent version of the
2946
- # resource was created.
2947
- # * `state`: corresponds to the state of the resource.
2948
- # * `name`: corresponds to resource name.
2949
- # * `display_name`: corresponds to info type's display name.
2950
- # @!attribute [rw] location_id
2951
- # @return [String]
2952
- # The geographic location where stored infoTypes will be retrieved from.
2953
- # Use `-` for all locations. Reserved for future extensions.
2954
- class ListStoredInfoTypesRequest; end
2955
-
2956
- # Response message for ListStoredInfoTypes.
2957
- # @!attribute [rw] stored_info_types
2958
- # @return [Array<Google::Privacy::Dlp::V2::StoredInfoType>]
2959
- # List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
2960
- # @!attribute [rw] next_page_token
2961
- # @return [String]
2962
- # If the next page is available then the next page token to be used
2963
- # in following ListStoredInfoTypes request.
2964
- class ListStoredInfoTypesResponse; end
2965
-
2966
- # Request message for DeleteStoredInfoType.
2967
- # @!attribute [rw] name
2968
- # @return [String]
2969
- # Required. Resource name of the organization and storedInfoType to be
2970
- # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or
2971
- # projects/project-id/storedInfoTypes/432452342.
2972
- class DeleteStoredInfoTypeRequest; end
2973
-
2974
- # Request to search for potentially sensitive info in a custom location.
2975
- # @!attribute [rw] name
2976
- # @return [String]
2977
- # Required. Resource name of the trigger to execute a hybrid inspect on, for
2978
- # example `projects/dlp-test-project/jobTriggers/53234423`.
2979
- # @!attribute [rw] hybrid_item
2980
- # @return [Google::Privacy::Dlp::V2::HybridContentItem]
2981
- # The item to inspect.
2982
- class HybridInspectJobTriggerRequest; end
2983
-
2984
- # Request to search for potentially sensitive info in a custom location.
2985
- # @!attribute [rw] name
2986
- # @return [String]
2987
- # Required. Resource name of the job to execute a hybrid inspect on, for
2988
- # example `projects/dlp-test-project/dlpJob/53234423`.
2989
- # @!attribute [rw] hybrid_item
2990
- # @return [Google::Privacy::Dlp::V2::HybridContentItem]
2991
- # The item to inspect.
2992
- class HybridInspectDlpJobRequest; end
2993
-
2994
- # An individual hybrid item to inspect. Will be stored temporarily during
2995
- # processing.
2996
- # @!attribute [rw] item
2997
- # @return [Google::Privacy::Dlp::V2::ContentItem]
2998
- # The item to inspect.
2999
- # @!attribute [rw] finding_details
3000
- # @return [Google::Privacy::Dlp::V2::HybridFindingDetails]
3001
- # Supplementary information that will be added to each finding.
3002
- class HybridContentItem; end
3003
-
3004
- # Populate to associate additional data with each finding.
3005
- # @!attribute [rw] container_details
3006
- # @return [Google::Privacy::Dlp::V2::Container]
3007
- # Details about the container where the content being inspected is from.
3008
- # @!attribute [rw] file_offset
3009
- # @return [Integer]
3010
- # Offset in bytes of the line, from the beginning of the file, where the
3011
- # finding is located. Populate if the item being scanned is only part of a
3012
- # bigger item, such as a shard of a file and you want to track the absolute
3013
- # position of the finding.
3014
- # @!attribute [rw] row_offset
3015
- # @return [Integer]
3016
- # Offset of the row for tables. Populate if the row(s) being scanned are
3017
- # part of a bigger dataset and you want to keep track of their absolute
3018
- # position.
3019
- # @!attribute [rw] table_options
3020
- # @return [Google::Privacy::Dlp::V2::TableOptions]
3021
- # If the container is a table, additional information to make findings
3022
- # meaningful such as the columns that are primary keys. If not known ahead
3023
- # of time, can also be set within each inspect hybrid call and the two
3024
- # will be merged. Note that identifying_fields will only be stored to
3025
- # BigQuery, and only if the BigQuery action has been included.
3026
- # @!attribute [rw] labels
3027
- # @return [Hash{String => String}]
3028
- # Labels to represent user provided metadata about the data being inspected.
3029
- # If configured by the job, some key values may be required.
3030
- # The labels associated with `Finding`'s produced by hybrid
3031
- # inspection.
3032
- #
3033
- # Label keys must be between 1 and 63 characters long and must conform
3034
- # to the following regular expression: \[a-z\](https://cloud.google.com\[-a-z0-9\]*\[a-z0-9\])?.
3035
- #
3036
- # Label values must be between 0 and 63 characters long and must conform
3037
- # to the regular expression (\[a-z\](https://cloud.google.com\[-a-z0-9\]*\[a-z0-9\])?)?.
3038
- #
3039
- # No more than 10 labels can be associated with a given finding.
3040
- #
3041
- # Example: <code>"environment" : "production"</code>
3042
- # Example: <code>"pipeline" : "etl"</code>
3043
- class HybridFindingDetails; end
3044
-
3045
- # Quota exceeded errors will be thrown once quota has been met.
3046
- class HybridInspectResponse; end
3047
-
3048
- # Options describing which parts of the provided content should be scanned.
3049
- module ContentOption
3050
- # Includes entire content of a file or a data stream.
3051
- CONTENT_UNSPECIFIED = 0
3052
-
3053
- # Text content within the data, excluding any metadata.
3054
- CONTENT_TEXT = 1
3055
-
3056
- # Images found in the data.
3057
- CONTENT_IMAGE = 2
3058
- end
3059
-
3060
- # An enum to represent the various types of DLP jobs.
3061
- module DlpJobType
3062
- # Unused
3063
- DLP_JOB_TYPE_UNSPECIFIED = 0
3064
-
3065
- # The job inspected Google Cloud for sensitive data.
3066
- INSPECT_JOB = 1
3067
-
3068
- # The job executed a Risk Analysis computation.
3069
- RISK_ANALYSIS_JOB = 2
3070
- end
3071
-
3072
- # Parts of the APIs which use certain infoTypes.
3073
- module InfoTypeSupportedBy
3074
- # Unused.
3075
- ENUM_TYPE_UNSPECIFIED = 0
3076
-
3077
- # Supported by the inspect operations.
3078
- INSPECT = 1
3079
-
3080
- # Supported by the risk analysis operations.
3081
- RISK_ANALYSIS = 2
3082
- end
3083
-
3084
- # Type of the match which can be applied to different ways of matching, like
3085
- # Dictionary, regular expression and intersecting with findings of another
3086
- # info type.
3087
- module MatchingType
3088
- # Invalid.
3089
- MATCHING_TYPE_UNSPECIFIED = 0
3090
-
3091
- # Full match.
3092
- #
3093
- # * Dictionary: join of Dictionary results matched complete finding quote
3094
- # * Regex: all regex matches fill a finding quote start to end
3095
- # * Exclude info type: completely inside affecting info types findings
3096
- MATCHING_TYPE_FULL_MATCH = 1
3097
-
3098
- # Partial match.
3099
- #
3100
- # * Dictionary: at least one of the tokens in the finding matches
3101
- # * Regex: substring of the finding matches
3102
- # * Exclude info type: intersects with affecting info types findings
3103
- MATCHING_TYPE_PARTIAL_MATCH = 2
3104
-
3105
- # Inverse match.
3106
- #
3107
- # * Dictionary: no tokens in the finding match the dictionary
3108
- # * Regex: finding doesn't match the regex
3109
- # * Exclude info type: no intersection with affecting info types findings
3110
- MATCHING_TYPE_INVERSE_MATCH = 3
3111
- end
3112
-
3113
- # Operators available for comparing the value of fields.
3114
- module RelationalOperator
3115
- # Unused
3116
- RELATIONAL_OPERATOR_UNSPECIFIED = 0
3117
-
3118
- # Equal. Attempts to match even with incompatible types.
3119
- EQUAL_TO = 1
3120
-
3121
- # Not equal to. Attempts to match even with incompatible types.
3122
- NOT_EQUAL_TO = 2
3123
-
3124
- # Greater than.
3125
- GREATER_THAN = 3
3126
-
3127
- # Less than.
3128
- LESS_THAN = 4
3129
-
3130
- # Greater than or equals.
3131
- GREATER_THAN_OR_EQUALS = 5
3132
-
3133
- # Less than or equals.
3134
- LESS_THAN_OR_EQUALS = 6
3135
-
3136
- # Exists
3137
- EXISTS = 7
3138
- end
3139
-
3140
- # State of a StoredInfoType version.
3141
- module StoredInfoTypeState
3142
- # Unused
3143
- STORED_INFO_TYPE_STATE_UNSPECIFIED = 0
3144
-
3145
- # StoredInfoType version is being created.
3146
- PENDING = 1
3147
-
3148
- # StoredInfoType version is ready for use.
3149
- READY = 2
3150
-
3151
- # StoredInfoType creation failed. All relevant error messages are returned in
3152
- # the `StoredInfoTypeVersion` message.
3153
- FAILED = 3
3154
-
3155
- # StoredInfoType is no longer valid because artifacts stored in
3156
- # user-controlled storage were modified. To fix an invalid StoredInfoType,
3157
- # use the `UpdateStoredInfoType` method to create a new version.
3158
- INVALID = 4
3159
- end
3160
- end
3161
- end
3162
- end
3163
- end