google-cloud-dlp-v2 0.1.0

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