google-apis-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,4345 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DlpV2
23
+ # Cloud Data Loss Prevention (DLP) API
24
+ #
25
+ # Provides methods for detection, risk analysis, and de-identification of
26
+ # privacy-sensitive fragments in text, images, and Google Cloud Platform storage
27
+ # repositories.
28
+ #
29
+ # @example
30
+ # require 'google/apis/dlp_v2'
31
+ #
32
+ # Dlp = Google::Apis::DlpV2 # Alias the module
33
+ # service = Dlp::DLPService.new
34
+ #
35
+ # @see https://cloud.google.com/dlp/docs/
36
+ class DLPService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://dlp.googleapis.com/', '',
49
+ client_name: 'google-apis-dlp_v2',
50
+ client_version: Google::Apis::DlpV2::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Returns a list of the sensitive information types that the DLP API supports.
55
+ # See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
56
+ # @param [String] filter
57
+ # filter to only return infoTypes supported by certain parts of the API.
58
+ # Defaults to supported_by=INSPECT.
59
+ # @param [String] language_code
60
+ # BCP-47 language code for localized infoType friendly names. If omitted, or if
61
+ # localized strings are not available, en-US strings will be returned.
62
+ # @param [String] location_id
63
+ # Deprecated. This field has no effect.
64
+ # @param [String] parent
65
+ # The parent resource name. The format of this value is as follows: locations/
66
+ # LOCATION_ID
67
+ # @param [String] fields
68
+ # Selector specifying which fields to include in a partial response.
69
+ # @param [String] quota_user
70
+ # Available to use for quota purposes for server-side applications. Can be any
71
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
72
+ # @param [Google::Apis::RequestOptions] options
73
+ # Request-specific options
74
+ #
75
+ # @yield [result, err] Result & error if block supplied
76
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse] parsed result object
77
+ # @yieldparam err [StandardError] error object if request failed
78
+ #
79
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse]
80
+ #
81
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
84
+ def list_info_types(filter: nil, language_code: nil, location_id: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
85
+ command = make_simple_command(:get, 'v2/infoTypes', options)
86
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse::Representation
87
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse
88
+ command.query['filter'] = filter unless filter.nil?
89
+ command.query['languageCode'] = language_code unless language_code.nil?
90
+ command.query['locationId'] = location_id unless location_id.nil?
91
+ command.query['parent'] = parent unless parent.nil?
92
+ command.query['fields'] = fields unless fields.nil?
93
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
94
+ execute_or_queue_command(command, &block)
95
+ end
96
+
97
+ # Returns a list of the sensitive information types that the DLP API supports.
98
+ # See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
99
+ # @param [String] parent
100
+ # The parent resource name. The format of this value is as follows: locations/
101
+ # LOCATION_ID
102
+ # @param [String] filter
103
+ # filter to only return infoTypes supported by certain parts of the API.
104
+ # Defaults to supported_by=INSPECT.
105
+ # @param [String] language_code
106
+ # BCP-47 language code for localized infoType friendly names. If omitted, or if
107
+ # localized strings are not available, en-US strings will be returned.
108
+ # @param [String] location_id
109
+ # Deprecated. This field has no effect.
110
+ # @param [String] fields
111
+ # Selector specifying which fields to include in a partial response.
112
+ # @param [String] quota_user
113
+ # Available to use for quota purposes for server-side applications. Can be any
114
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
115
+ # @param [Google::Apis::RequestOptions] options
116
+ # Request-specific options
117
+ #
118
+ # @yield [result, err] Result & error if block supplied
119
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse] parsed result object
120
+ # @yieldparam err [StandardError] error object if request failed
121
+ #
122
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse]
123
+ #
124
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
125
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
126
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
127
+ def list_location_info_types(parent, filter: nil, language_code: nil, location_id: nil, fields: nil, quota_user: nil, options: nil, &block)
128
+ command = make_simple_command(:get, 'v2/{+parent}/infoTypes', options)
129
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse::Representation
130
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInfoTypesResponse
131
+ command.params['parent'] = parent unless parent.nil?
132
+ command.query['filter'] = filter unless filter.nil?
133
+ command.query['languageCode'] = language_code unless language_code.nil?
134
+ command.query['locationId'] = location_id unless location_id.nil?
135
+ command.query['fields'] = fields unless fields.nil?
136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
137
+ execute_or_queue_command(command, &block)
138
+ end
139
+
140
+ # Creates a DeidentifyTemplate for re-using frequently used configuration for de-
141
+ # identifying content, images, and storage. See https://cloud.google.com/dlp/
142
+ # docs/creating-templates-deid to learn more.
143
+ # @param [String] parent
144
+ # Required. Parent resource name. The format of this value varies depending on
145
+ # the scope of the request (project or organization) and whether you have [
146
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
147
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
148
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
149
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
150
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
151
+ # location specified (defaults to global): `organizations/`ORG_ID The following
152
+ # example `parent` string specifies a parent project with the identifier `
153
+ # example-project`, and specifies the `europe-west3` location for processing
154
+ # data: parent=projects/example-project/locations/europe-west3
155
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_request_object
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def create_organization_deidentify_template(parent, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:post, 'v2/{+parent}/deidentifyTemplates', options)
175
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation
176
+ command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object
177
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
178
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
179
+ command.params['parent'] = parent unless parent.nil?
180
+ command.query['fields'] = fields unless fields.nil?
181
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
182
+ execute_or_queue_command(command, &block)
183
+ end
184
+
185
+ # Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
186
+ # templates-deid to learn more.
187
+ # @param [String] name
188
+ # Required. Resource name of the organization and deidentify template to be
189
+ # deleted, for example `organizations/433245324/deidentifyTemplates/432452342`
190
+ # or projects/project-id/deidentifyTemplates/432452342.
191
+ # @param [String] fields
192
+ # Selector specifying which fields to include in a partial response.
193
+ # @param [String] quota_user
194
+ # Available to use for quota purposes for server-side applications. Can be any
195
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
196
+ # @param [Google::Apis::RequestOptions] options
197
+ # Request-specific options
198
+ #
199
+ # @yield [result, err] Result & error if block supplied
200
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
201
+ # @yieldparam err [StandardError] error object if request failed
202
+ #
203
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
204
+ #
205
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
206
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
207
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
208
+ def delete_organization_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
209
+ command = make_simple_command(:delete, 'v2/{+name}', options)
210
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
211
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
212
+ command.params['name'] = name unless name.nil?
213
+ command.query['fields'] = fields unless fields.nil?
214
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
215
+ execute_or_queue_command(command, &block)
216
+ end
217
+
218
+ # Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
219
+ # templates-deid to learn more.
220
+ # @param [String] name
221
+ # Required. Resource name of the organization and deidentify template to be read,
222
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
223
+ # projects/project-id/deidentifyTemplates/432452342.
224
+ # @param [String] fields
225
+ # Selector specifying which fields to include in a partial response.
226
+ # @param [String] quota_user
227
+ # Available to use for quota purposes for server-side applications. Can be any
228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
229
+ # @param [Google::Apis::RequestOptions] options
230
+ # Request-specific options
231
+ #
232
+ # @yield [result, err] Result & error if block supplied
233
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
234
+ # @yieldparam err [StandardError] error object if request failed
235
+ #
236
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
237
+ #
238
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
239
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
240
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
241
+ def get_organization_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
242
+ command = make_simple_command(:get, 'v2/{+name}', options)
243
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
244
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
245
+ command.params['name'] = name unless name.nil?
246
+ command.query['fields'] = fields unless fields.nil?
247
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
248
+ execute_or_queue_command(command, &block)
249
+ end
250
+
251
+ # Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-
252
+ # templates-deid to learn more.
253
+ # @param [String] parent
254
+ # Required. Parent resource name. The format of this value varies depending on
255
+ # the scope of the request (project or organization) and whether you have [
256
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
257
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
258
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
259
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
260
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
261
+ # location specified (defaults to global): `organizations/`ORG_ID The following
262
+ # example `parent` string specifies a parent project with the identifier `
263
+ # example-project`, and specifies the `europe-west3` location for processing
264
+ # data: parent=projects/example-project/locations/europe-west3
265
+ # @param [String] location_id
266
+ # Deprecated. This field has no effect.
267
+ # @param [String] order_by
268
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
269
+ # postfix. This list is case-insensitive, default sorting order is ascending,
270
+ # redundant space characters are insignificant. Example: `name asc,update_time,
271
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
272
+ # the template was created. - `update_time`: corresponds to time the template
273
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
274
+ # corresponds to template's display name.
275
+ # @param [Fixnum] page_size
276
+ # Size of the page, can be limited by server. If zero server returns a page of
277
+ # max size 100.
278
+ # @param [String] page_token
279
+ # Page token to continue retrieval. Comes from previous call to `
280
+ # ListDeidentifyTemplates`.
281
+ # @param [String] fields
282
+ # Selector specifying which fields to include in a partial response.
283
+ # @param [String] quota_user
284
+ # Available to use for quota purposes for server-side applications. Can be any
285
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
286
+ # @param [Google::Apis::RequestOptions] options
287
+ # Request-specific options
288
+ #
289
+ # @yield [result, err] Result & error if block supplied
290
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object
291
+ # @yieldparam err [StandardError] error object if request failed
292
+ #
293
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse]
294
+ #
295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
298
+ def list_organization_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
299
+ command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options)
300
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation
301
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse
302
+ command.params['parent'] = parent unless parent.nil?
303
+ command.query['locationId'] = location_id unless location_id.nil?
304
+ command.query['orderBy'] = order_by unless order_by.nil?
305
+ command.query['pageSize'] = page_size unless page_size.nil?
306
+ command.query['pageToken'] = page_token unless page_token.nil?
307
+ command.query['fields'] = fields unless fields.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
313
+ # templates-deid to learn more.
314
+ # @param [String] name
315
+ # Required. Resource name of organization and deidentify template to be updated,
316
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
317
+ # projects/project-id/deidentifyTemplates/432452342.
318
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_request_object
319
+ # @param [String] fields
320
+ # Selector specifying which fields to include in a partial response.
321
+ # @param [String] quota_user
322
+ # Available to use for quota purposes for server-side applications. Can be any
323
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
324
+ # @param [Google::Apis::RequestOptions] options
325
+ # Request-specific options
326
+ #
327
+ # @yield [result, err] Result & error if block supplied
328
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
329
+ # @yieldparam err [StandardError] error object if request failed
330
+ #
331
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
332
+ #
333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
336
+ def patch_organization_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
337
+ command = make_simple_command(:patch, 'v2/{+name}', options)
338
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation
339
+ command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object
340
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
341
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
342
+ command.params['name'] = name unless name.nil?
343
+ command.query['fields'] = fields unless fields.nil?
344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
345
+ execute_or_queue_command(command, &block)
346
+ end
347
+
348
+ # Creates an InspectTemplate for re-using frequently used configuration for
349
+ # inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/
350
+ # creating-templates to learn more.
351
+ # @param [String] parent
352
+ # Required. Parent resource name. The format of this value varies depending on
353
+ # the scope of the request (project or organization) and whether you have [
354
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
355
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
356
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
357
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
358
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
359
+ # location specified (defaults to global): `organizations/`ORG_ID The following
360
+ # example `parent` string specifies a parent project with the identifier `
361
+ # example-project`, and specifies the `europe-west3` location for processing
362
+ # data: parent=projects/example-project/locations/europe-west3
363
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_request_object
364
+ # @param [String] fields
365
+ # Selector specifying which fields to include in a partial response.
366
+ # @param [String] quota_user
367
+ # Available to use for quota purposes for server-side applications. Can be any
368
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
369
+ # @param [Google::Apis::RequestOptions] options
370
+ # Request-specific options
371
+ #
372
+ # @yield [result, err] Result & error if block supplied
373
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
374
+ # @yieldparam err [StandardError] error object if request failed
375
+ #
376
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
377
+ #
378
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
379
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
380
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
381
+ def create_organization_inspect_template(parent, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
382
+ command = make_simple_command(:post, 'v2/{+parent}/inspectTemplates', options)
383
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation
384
+ command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object
385
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
386
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
387
+ command.params['parent'] = parent unless parent.nil?
388
+ command.query['fields'] = fields unless fields.nil?
389
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
390
+ execute_or_queue_command(command, &block)
391
+ end
392
+
393
+ # Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
394
+ # templates to learn more.
395
+ # @param [String] name
396
+ # Required. Resource name of the organization and inspectTemplate to be deleted,
397
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
398
+ # project-id/inspectTemplates/432452342.
399
+ # @param [String] fields
400
+ # Selector specifying which fields to include in a partial response.
401
+ # @param [String] quota_user
402
+ # Available to use for quota purposes for server-side applications. Can be any
403
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
404
+ # @param [Google::Apis::RequestOptions] options
405
+ # Request-specific options
406
+ #
407
+ # @yield [result, err] Result & error if block supplied
408
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
409
+ # @yieldparam err [StandardError] error object if request failed
410
+ #
411
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
412
+ #
413
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
414
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
415
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
416
+ def delete_organization_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
417
+ command = make_simple_command(:delete, 'v2/{+name}', options)
418
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
419
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
420
+ command.params['name'] = name unless name.nil?
421
+ command.query['fields'] = fields unless fields.nil?
422
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
423
+ execute_or_queue_command(command, &block)
424
+ end
425
+
426
+ # Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
427
+ # templates to learn more.
428
+ # @param [String] name
429
+ # Required. Resource name of the organization and inspectTemplate to be read,
430
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
431
+ # project-id/inspectTemplates/432452342.
432
+ # @param [String] fields
433
+ # Selector specifying which fields to include in a partial response.
434
+ # @param [String] quota_user
435
+ # Available to use for quota purposes for server-side applications. Can be any
436
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
437
+ # @param [Google::Apis::RequestOptions] options
438
+ # Request-specific options
439
+ #
440
+ # @yield [result, err] Result & error if block supplied
441
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
442
+ # @yieldparam err [StandardError] error object if request failed
443
+ #
444
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
445
+ #
446
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
447
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
448
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
449
+ def get_organization_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
450
+ command = make_simple_command(:get, 'v2/{+name}', options)
451
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
452
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
453
+ command.params['name'] = name unless name.nil?
454
+ command.query['fields'] = fields unless fields.nil?
455
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
456
+ execute_or_queue_command(command, &block)
457
+ end
458
+
459
+ # Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-
460
+ # templates to learn more.
461
+ # @param [String] parent
462
+ # Required. Parent resource name. The format of this value varies depending on
463
+ # the scope of the request (project or organization) and whether you have [
464
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
465
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
466
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
467
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
468
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
469
+ # location specified (defaults to global): `organizations/`ORG_ID The following
470
+ # example `parent` string specifies a parent project with the identifier `
471
+ # example-project`, and specifies the `europe-west3` location for processing
472
+ # data: parent=projects/example-project/locations/europe-west3
473
+ # @param [String] location_id
474
+ # Deprecated. This field has no effect.
475
+ # @param [String] order_by
476
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
477
+ # postfix. This list is case-insensitive, default sorting order is ascending,
478
+ # redundant space characters are insignificant. Example: `name asc,update_time,
479
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
480
+ # the template was created. - `update_time`: corresponds to time the template
481
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
482
+ # corresponds to template's display name.
483
+ # @param [Fixnum] page_size
484
+ # Size of the page, can be limited by server. If zero server returns a page of
485
+ # max size 100.
486
+ # @param [String] page_token
487
+ # Page token to continue retrieval. Comes from previous call to `
488
+ # ListInspectTemplates`.
489
+ # @param [String] fields
490
+ # Selector specifying which fields to include in a partial response.
491
+ # @param [String] quota_user
492
+ # Available to use for quota purposes for server-side applications. Can be any
493
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
494
+ # @param [Google::Apis::RequestOptions] options
495
+ # Request-specific options
496
+ #
497
+ # @yield [result, err] Result & error if block supplied
498
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object
499
+ # @yieldparam err [StandardError] error object if request failed
500
+ #
501
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse]
502
+ #
503
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
504
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
505
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
506
+ def list_organization_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
507
+ command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options)
508
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation
509
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse
510
+ command.params['parent'] = parent unless parent.nil?
511
+ command.query['locationId'] = location_id unless location_id.nil?
512
+ command.query['orderBy'] = order_by unless order_by.nil?
513
+ command.query['pageSize'] = page_size unless page_size.nil?
514
+ command.query['pageToken'] = page_token unless page_token.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
521
+ # templates to learn more.
522
+ # @param [String] name
523
+ # Required. Resource name of organization and inspectTemplate to be updated, for
524
+ # example `organizations/433245324/inspectTemplates/432452342` or projects/
525
+ # project-id/inspectTemplates/432452342.
526
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_request_object
527
+ # @param [String] fields
528
+ # Selector specifying which fields to include in a partial response.
529
+ # @param [String] quota_user
530
+ # Available to use for quota purposes for server-side applications. Can be any
531
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
532
+ # @param [Google::Apis::RequestOptions] options
533
+ # Request-specific options
534
+ #
535
+ # @yield [result, err] Result & error if block supplied
536
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
537
+ # @yieldparam err [StandardError] error object if request failed
538
+ #
539
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
540
+ #
541
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
542
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
543
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
544
+ def patch_organization_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
545
+ command = make_simple_command(:patch, 'v2/{+name}', options)
546
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation
547
+ command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object
548
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
549
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
550
+ command.params['name'] = name unless name.nil?
551
+ command.query['fields'] = fields unless fields.nil?
552
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
553
+ execute_or_queue_command(command, &block)
554
+ end
555
+
556
+ # Creates a DeidentifyTemplate for re-using frequently used configuration for de-
557
+ # identifying content, images, and storage. See https://cloud.google.com/dlp/
558
+ # docs/creating-templates-deid to learn more.
559
+ # @param [String] parent
560
+ # Required. Parent resource name. The format of this value varies depending on
561
+ # the scope of the request (project or organization) and whether you have [
562
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
563
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
564
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
565
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
566
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
567
+ # location specified (defaults to global): `organizations/`ORG_ID The following
568
+ # example `parent` string specifies a parent project with the identifier `
569
+ # example-project`, and specifies the `europe-west3` location for processing
570
+ # data: parent=projects/example-project/locations/europe-west3
571
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_request_object
572
+ # @param [String] fields
573
+ # Selector specifying which fields to include in a partial response.
574
+ # @param [String] quota_user
575
+ # Available to use for quota purposes for server-side applications. Can be any
576
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
577
+ # @param [Google::Apis::RequestOptions] options
578
+ # Request-specific options
579
+ #
580
+ # @yield [result, err] Result & error if block supplied
581
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
582
+ # @yieldparam err [StandardError] error object if request failed
583
+ #
584
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
585
+ #
586
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
589
+ def create_organization_location_deidentify_template(parent, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
590
+ command = make_simple_command(:post, 'v2/{+parent}/deidentifyTemplates', options)
591
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation
592
+ command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object
593
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
594
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
595
+ command.params['parent'] = parent unless parent.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
602
+ # templates-deid to learn more.
603
+ # @param [String] name
604
+ # Required. Resource name of the organization and deidentify template to be
605
+ # deleted, for example `organizations/433245324/deidentifyTemplates/432452342`
606
+ # or projects/project-id/deidentifyTemplates/432452342.
607
+ # @param [String] fields
608
+ # Selector specifying which fields to include in a partial response.
609
+ # @param [String] quota_user
610
+ # Available to use for quota purposes for server-side applications. Can be any
611
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
612
+ # @param [Google::Apis::RequestOptions] options
613
+ # Request-specific options
614
+ #
615
+ # @yield [result, err] Result & error if block supplied
616
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
617
+ # @yieldparam err [StandardError] error object if request failed
618
+ #
619
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
620
+ #
621
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
622
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
623
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
624
+ def delete_organization_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
625
+ command = make_simple_command(:delete, 'v2/{+name}', options)
626
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
627
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
628
+ command.params['name'] = name unless name.nil?
629
+ command.query['fields'] = fields unless fields.nil?
630
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
631
+ execute_or_queue_command(command, &block)
632
+ end
633
+
634
+ # Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
635
+ # templates-deid to learn more.
636
+ # @param [String] name
637
+ # Required. Resource name of the organization and deidentify template to be read,
638
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
639
+ # projects/project-id/deidentifyTemplates/432452342.
640
+ # @param [String] fields
641
+ # Selector specifying which fields to include in a partial response.
642
+ # @param [String] quota_user
643
+ # Available to use for quota purposes for server-side applications. Can be any
644
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
645
+ # @param [Google::Apis::RequestOptions] options
646
+ # Request-specific options
647
+ #
648
+ # @yield [result, err] Result & error if block supplied
649
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
650
+ # @yieldparam err [StandardError] error object if request failed
651
+ #
652
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
653
+ #
654
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
655
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
656
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
657
+ def get_organization_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
658
+ command = make_simple_command(:get, 'v2/{+name}', options)
659
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
660
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
661
+ command.params['name'] = name unless name.nil?
662
+ command.query['fields'] = fields unless fields.nil?
663
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
664
+ execute_or_queue_command(command, &block)
665
+ end
666
+
667
+ # Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-
668
+ # templates-deid to learn more.
669
+ # @param [String] parent
670
+ # Required. Parent resource name. The format of this value varies depending on
671
+ # the scope of the request (project or organization) and whether you have [
672
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
673
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
674
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
675
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
676
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
677
+ # location specified (defaults to global): `organizations/`ORG_ID The following
678
+ # example `parent` string specifies a parent project with the identifier `
679
+ # example-project`, and specifies the `europe-west3` location for processing
680
+ # data: parent=projects/example-project/locations/europe-west3
681
+ # @param [String] location_id
682
+ # Deprecated. This field has no effect.
683
+ # @param [String] order_by
684
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
685
+ # postfix. This list is case-insensitive, default sorting order is ascending,
686
+ # redundant space characters are insignificant. Example: `name asc,update_time,
687
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
688
+ # the template was created. - `update_time`: corresponds to time the template
689
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
690
+ # corresponds to template's display name.
691
+ # @param [Fixnum] page_size
692
+ # Size of the page, can be limited by server. If zero server returns a page of
693
+ # max size 100.
694
+ # @param [String] page_token
695
+ # Page token to continue retrieval. Comes from previous call to `
696
+ # ListDeidentifyTemplates`.
697
+ # @param [String] fields
698
+ # Selector specifying which fields to include in a partial response.
699
+ # @param [String] quota_user
700
+ # Available to use for quota purposes for server-side applications. Can be any
701
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
702
+ # @param [Google::Apis::RequestOptions] options
703
+ # Request-specific options
704
+ #
705
+ # @yield [result, err] Result & error if block supplied
706
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object
707
+ # @yieldparam err [StandardError] error object if request failed
708
+ #
709
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse]
710
+ #
711
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
712
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
713
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
714
+ def list_organization_location_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
715
+ command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options)
716
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation
717
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse
718
+ command.params['parent'] = parent unless parent.nil?
719
+ command.query['locationId'] = location_id unless location_id.nil?
720
+ command.query['orderBy'] = order_by unless order_by.nil?
721
+ command.query['pageSize'] = page_size unless page_size.nil?
722
+ command.query['pageToken'] = page_token unless page_token.nil?
723
+ command.query['fields'] = fields unless fields.nil?
724
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
725
+ execute_or_queue_command(command, &block)
726
+ end
727
+
728
+ # Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
729
+ # templates-deid to learn more.
730
+ # @param [String] name
731
+ # Required. Resource name of organization and deidentify template to be updated,
732
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
733
+ # projects/project-id/deidentifyTemplates/432452342.
734
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_request_object
735
+ # @param [String] fields
736
+ # Selector specifying which fields to include in a partial response.
737
+ # @param [String] quota_user
738
+ # Available to use for quota purposes for server-side applications. Can be any
739
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
740
+ # @param [Google::Apis::RequestOptions] options
741
+ # Request-specific options
742
+ #
743
+ # @yield [result, err] Result & error if block supplied
744
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
745
+ # @yieldparam err [StandardError] error object if request failed
746
+ #
747
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
748
+ #
749
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
750
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
751
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
752
+ def patch_organization_location_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
753
+ command = make_simple_command(:patch, 'v2/{+name}', options)
754
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation
755
+ command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object
756
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
757
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
758
+ command.params['name'] = name unless name.nil?
759
+ command.query['fields'] = fields unless fields.nil?
760
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
761
+ execute_or_queue_command(command, &block)
762
+ end
763
+
764
+ # Lists DlpJobs that match the specified filter in the request. See https://
765
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
766
+ # docs/compute-risk-analysis to learn more.
767
+ # @param [String] parent
768
+ # Required. Parent resource name. The format of this value varies depending on
769
+ # whether you have [specified a processing location](https://cloud.google.com/
770
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
771
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
772
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
773
+ # string specifies a parent project with the identifier `example-project`, and
774
+ # specifies the `europe-west3` location for processing data: parent=projects/
775
+ # example-project/locations/europe-west3
776
+ # @param [String] filter
777
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
778
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
779
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
780
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
781
+ # inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `
782
+ # inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The
783
+ # resource name of the trigger that created job. - 'end_time` - Corresponds to
784
+ # time the job finished. - 'start_time` - Corresponds to time the job finished. *
785
+ # Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|
786
+ # FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - '
787
+ # start_time` - Corresponds to time the job finished. * The operator must be `=`
788
+ # or `!=`. Examples: * inspected_storage = cloud_storage AND state = done *
789
+ # inspected_storage = cloud_storage OR inspected_storage = bigquery *
790
+ # inspected_storage = cloud_storage AND (state = done OR state = canceled) *
791
+ # end_time > \"2017-12-12T00:00:00+00:00\" The length of this field should be no
792
+ # more than 500 characters.
793
+ # @param [String] location_id
794
+ # Deprecated. This field has no effect.
795
+ # @param [String] order_by
796
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
797
+ # postfix. This list is case-insensitive, default sorting order is ascending,
798
+ # redundant space characters are insignificant. Example: `name asc, end_time asc,
799
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
800
+ # the job was created. - `end_time`: corresponds to time the job ended. - `name`:
801
+ # corresponds to job's name. - `state`: corresponds to `state`
802
+ # @param [Fixnum] page_size
803
+ # The standard list page size.
804
+ # @param [String] page_token
805
+ # The standard list page token.
806
+ # @param [String] type
807
+ # The type of job. Defaults to `DlpJobType.INSPECT`
808
+ # @param [String] fields
809
+ # Selector specifying which fields to include in a partial response.
810
+ # @param [String] quota_user
811
+ # Available to use for quota purposes for server-side applications. Can be any
812
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
813
+ # @param [Google::Apis::RequestOptions] options
814
+ # Request-specific options
815
+ #
816
+ # @yield [result, err] Result & error if block supplied
817
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] parsed result object
818
+ # @yieldparam err [StandardError] error object if request failed
819
+ #
820
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse]
821
+ #
822
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
823
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
824
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
825
+ def list_organization_location_dlp_jobs(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
826
+ command = make_simple_command(:get, 'v2/{+parent}/dlpJobs', options)
827
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation
828
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse
829
+ command.params['parent'] = parent unless parent.nil?
830
+ command.query['filter'] = filter unless filter.nil?
831
+ command.query['locationId'] = location_id unless location_id.nil?
832
+ command.query['orderBy'] = order_by unless order_by.nil?
833
+ command.query['pageSize'] = page_size unless page_size.nil?
834
+ command.query['pageToken'] = page_token unless page_token.nil?
835
+ command.query['type'] = type unless type.nil?
836
+ command.query['fields'] = fields unless fields.nil?
837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
838
+ execute_or_queue_command(command, &block)
839
+ end
840
+
841
+ # Creates an InspectTemplate for re-using frequently used configuration for
842
+ # inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/
843
+ # creating-templates to learn more.
844
+ # @param [String] parent
845
+ # Required. Parent resource name. The format of this value varies depending on
846
+ # the scope of the request (project or organization) and whether you have [
847
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
848
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
849
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
850
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
851
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
852
+ # location specified (defaults to global): `organizations/`ORG_ID The following
853
+ # example `parent` string specifies a parent project with the identifier `
854
+ # example-project`, and specifies the `europe-west3` location for processing
855
+ # data: parent=projects/example-project/locations/europe-west3
856
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_request_object
857
+ # @param [String] fields
858
+ # Selector specifying which fields to include in a partial response.
859
+ # @param [String] quota_user
860
+ # Available to use for quota purposes for server-side applications. Can be any
861
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
862
+ # @param [Google::Apis::RequestOptions] options
863
+ # Request-specific options
864
+ #
865
+ # @yield [result, err] Result & error if block supplied
866
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
867
+ # @yieldparam err [StandardError] error object if request failed
868
+ #
869
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
870
+ #
871
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
872
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
873
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
874
+ def create_organization_location_inspect_template(parent, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
875
+ command = make_simple_command(:post, 'v2/{+parent}/inspectTemplates', options)
876
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation
877
+ command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object
878
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
879
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
880
+ command.params['parent'] = parent unless parent.nil?
881
+ command.query['fields'] = fields unless fields.nil?
882
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
883
+ execute_or_queue_command(command, &block)
884
+ end
885
+
886
+ # Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
887
+ # templates to learn more.
888
+ # @param [String] name
889
+ # Required. Resource name of the organization and inspectTemplate to be deleted,
890
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
891
+ # project-id/inspectTemplates/432452342.
892
+ # @param [String] fields
893
+ # Selector specifying which fields to include in a partial response.
894
+ # @param [String] quota_user
895
+ # Available to use for quota purposes for server-side applications. Can be any
896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
897
+ # @param [Google::Apis::RequestOptions] options
898
+ # Request-specific options
899
+ #
900
+ # @yield [result, err] Result & error if block supplied
901
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
902
+ # @yieldparam err [StandardError] error object if request failed
903
+ #
904
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
905
+ #
906
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
907
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
908
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
909
+ def delete_organization_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
910
+ command = make_simple_command(:delete, 'v2/{+name}', options)
911
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
912
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
913
+ command.params['name'] = name unless name.nil?
914
+ command.query['fields'] = fields unless fields.nil?
915
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
916
+ execute_or_queue_command(command, &block)
917
+ end
918
+
919
+ # Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
920
+ # templates to learn more.
921
+ # @param [String] name
922
+ # Required. Resource name of the organization and inspectTemplate to be read,
923
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
924
+ # project-id/inspectTemplates/432452342.
925
+ # @param [String] fields
926
+ # Selector specifying which fields to include in a partial response.
927
+ # @param [String] quota_user
928
+ # Available to use for quota purposes for server-side applications. Can be any
929
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
930
+ # @param [Google::Apis::RequestOptions] options
931
+ # Request-specific options
932
+ #
933
+ # @yield [result, err] Result & error if block supplied
934
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
935
+ # @yieldparam err [StandardError] error object if request failed
936
+ #
937
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
938
+ #
939
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
940
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
941
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
942
+ def get_organization_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
943
+ command = make_simple_command(:get, 'v2/{+name}', options)
944
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
945
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
946
+ command.params['name'] = name unless name.nil?
947
+ command.query['fields'] = fields unless fields.nil?
948
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
949
+ execute_or_queue_command(command, &block)
950
+ end
951
+
952
+ # Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-
953
+ # templates to learn more.
954
+ # @param [String] parent
955
+ # Required. Parent resource name. The format of this value varies depending on
956
+ # the scope of the request (project or organization) and whether you have [
957
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
958
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
959
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
960
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
961
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
962
+ # location specified (defaults to global): `organizations/`ORG_ID The following
963
+ # example `parent` string specifies a parent project with the identifier `
964
+ # example-project`, and specifies the `europe-west3` location for processing
965
+ # data: parent=projects/example-project/locations/europe-west3
966
+ # @param [String] location_id
967
+ # Deprecated. This field has no effect.
968
+ # @param [String] order_by
969
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
970
+ # postfix. This list is case-insensitive, default sorting order is ascending,
971
+ # redundant space characters are insignificant. Example: `name asc,update_time,
972
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
973
+ # the template was created. - `update_time`: corresponds to time the template
974
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
975
+ # corresponds to template's display name.
976
+ # @param [Fixnum] page_size
977
+ # Size of the page, can be limited by server. If zero server returns a page of
978
+ # max size 100.
979
+ # @param [String] page_token
980
+ # Page token to continue retrieval. Comes from previous call to `
981
+ # ListInspectTemplates`.
982
+ # @param [String] fields
983
+ # Selector specifying which fields to include in a partial response.
984
+ # @param [String] quota_user
985
+ # Available to use for quota purposes for server-side applications. Can be any
986
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
987
+ # @param [Google::Apis::RequestOptions] options
988
+ # Request-specific options
989
+ #
990
+ # @yield [result, err] Result & error if block supplied
991
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object
992
+ # @yieldparam err [StandardError] error object if request failed
993
+ #
994
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse]
995
+ #
996
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
997
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
998
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
999
+ def list_organization_location_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1000
+ command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options)
1001
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation
1002
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse
1003
+ command.params['parent'] = parent unless parent.nil?
1004
+ command.query['locationId'] = location_id unless location_id.nil?
1005
+ command.query['orderBy'] = order_by unless order_by.nil?
1006
+ command.query['pageSize'] = page_size unless page_size.nil?
1007
+ command.query['pageToken'] = page_token unless page_token.nil?
1008
+ command.query['fields'] = fields unless fields.nil?
1009
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1010
+ execute_or_queue_command(command, &block)
1011
+ end
1012
+
1013
+ # Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
1014
+ # templates to learn more.
1015
+ # @param [String] name
1016
+ # Required. Resource name of organization and inspectTemplate to be updated, for
1017
+ # example `organizations/433245324/inspectTemplates/432452342` or projects/
1018
+ # project-id/inspectTemplates/432452342.
1019
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_request_object
1020
+ # @param [String] fields
1021
+ # Selector specifying which fields to include in a partial response.
1022
+ # @param [String] quota_user
1023
+ # Available to use for quota purposes for server-side applications. Can be any
1024
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1025
+ # @param [Google::Apis::RequestOptions] options
1026
+ # Request-specific options
1027
+ #
1028
+ # @yield [result, err] Result & error if block supplied
1029
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
1030
+ # @yieldparam err [StandardError] error object if request failed
1031
+ #
1032
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
1033
+ #
1034
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1035
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1036
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1037
+ def patch_organization_location_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1038
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1039
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation
1040
+ command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object
1041
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
1042
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
1043
+ command.params['name'] = name unless name.nil?
1044
+ command.query['fields'] = fields unless fields.nil?
1045
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1046
+ execute_or_queue_command(command, &block)
1047
+ end
1048
+
1049
+ # Creates a job trigger to run DLP actions such as scanning storage for
1050
+ # sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/
1051
+ # creating-job-triggers to learn more.
1052
+ # @param [String] parent
1053
+ # Required. Parent resource name. The format of this value varies depending on
1054
+ # whether you have [specified a processing location](https://cloud.google.com/
1055
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
1056
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
1057
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
1058
+ # string specifies a parent project with the identifier `example-project`, and
1059
+ # specifies the `europe-west3` location for processing data: parent=projects/
1060
+ # example-project/locations/europe-west3
1061
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest] google_privacy_dlp_v2_create_job_trigger_request_object
1062
+ # @param [String] fields
1063
+ # Selector specifying which fields to include in a partial response.
1064
+ # @param [String] quota_user
1065
+ # Available to use for quota purposes for server-side applications. Can be any
1066
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1067
+ # @param [Google::Apis::RequestOptions] options
1068
+ # Request-specific options
1069
+ #
1070
+ # @yield [result, err] Result & error if block supplied
1071
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
1072
+ # @yieldparam err [StandardError] error object if request failed
1073
+ #
1074
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
1075
+ #
1076
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1077
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1078
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1079
+ def create_organization_location_job_trigger(parent, google_privacy_dlp_v2_create_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1080
+ command = make_simple_command(:post, 'v2/{+parent}/jobTriggers', options)
1081
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest::Representation
1082
+ command.request_object = google_privacy_dlp_v2_create_job_trigger_request_object
1083
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
1084
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
1085
+ command.params['parent'] = parent unless parent.nil?
1086
+ command.query['fields'] = fields unless fields.nil?
1087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1088
+ execute_or_queue_command(command, &block)
1089
+ end
1090
+
1091
+ # Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
1092
+ # triggers to learn more.
1093
+ # @param [String] name
1094
+ # Required. Resource name of the project and the triggeredJob, for example `
1095
+ # projects/dlp-test-project/jobTriggers/53234423`.
1096
+ # @param [String] fields
1097
+ # Selector specifying which fields to include in a partial response.
1098
+ # @param [String] quota_user
1099
+ # Available to use for quota purposes for server-side applications. Can be any
1100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1101
+ # @param [Google::Apis::RequestOptions] options
1102
+ # Request-specific options
1103
+ #
1104
+ # @yield [result, err] Result & error if block supplied
1105
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
1106
+ # @yieldparam err [StandardError] error object if request failed
1107
+ #
1108
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
1109
+ #
1110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1113
+ def delete_organization_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
1114
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1115
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
1116
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
1117
+ command.params['name'] = name unless name.nil?
1118
+ command.query['fields'] = fields unless fields.nil?
1119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1120
+ execute_or_queue_command(command, &block)
1121
+ end
1122
+
1123
+ # Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
1124
+ # triggers to learn more.
1125
+ # @param [String] name
1126
+ # Required. Resource name of the project and the triggeredJob, for example `
1127
+ # projects/dlp-test-project/jobTriggers/53234423`.
1128
+ # @param [String] fields
1129
+ # Selector specifying which fields to include in a partial response.
1130
+ # @param [String] quota_user
1131
+ # Available to use for quota purposes for server-side applications. Can be any
1132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1133
+ # @param [Google::Apis::RequestOptions] options
1134
+ # Request-specific options
1135
+ #
1136
+ # @yield [result, err] Result & error if block supplied
1137
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
1138
+ # @yieldparam err [StandardError] error object if request failed
1139
+ #
1140
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
1141
+ #
1142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1145
+ def get_organization_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
1146
+ command = make_simple_command(:get, 'v2/{+name}', options)
1147
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
1148
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
1149
+ command.params['name'] = name unless name.nil?
1150
+ command.query['fields'] = fields unless fields.nil?
1151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1152
+ execute_or_queue_command(command, &block)
1153
+ end
1154
+
1155
+ # Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-
1156
+ # triggers to learn more.
1157
+ # @param [String] parent
1158
+ # Required. Parent resource name. The format of this value varies depending on
1159
+ # whether you have [specified a processing location](https://cloud.google.com/
1160
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
1161
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
1162
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
1163
+ # string specifies a parent project with the identifier `example-project`, and
1164
+ # specifies the `europe-west3` location for processing data: parent=projects/
1165
+ # example-project/locations/europe-west3
1166
+ # @param [String] filter
1167
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
1168
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
1169
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
1170
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
1171
+ # inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` -
1172
+ # DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted
1173
+ # timestamp, surrounded by quotation marks. Nanoseconds are ignored. - '
1174
+ # error_count' - Number of errors that have occurred while running. * The
1175
+ # operator must be `=` or `!=` for status and inspected_storage. Examples: *
1176
+ # inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage =
1177
+ # cloud_storage OR inspected_storage = bigquery * inspected_storage =
1178
+ # cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time > \"2017-
1179
+ # 12-12T00:00:00+00:00\" The length of this field should be no more than 500
1180
+ # characters.
1181
+ # @param [String] location_id
1182
+ # Deprecated. This field has no effect.
1183
+ # @param [String] order_by
1184
+ # Comma separated list of triggeredJob fields to order by, followed by `asc` or `
1185
+ # desc` postfix. This list is case-insensitive, default sorting order is
1186
+ # ascending, redundant space characters are insignificant. Example: `name asc,
1187
+ # update_time, create_time desc` Supported fields are: - `create_time`:
1188
+ # corresponds to time the JobTrigger was created. - `update_time`: corresponds
1189
+ # to time the JobTrigger was last updated. - `last_run_time`: corresponds to the
1190
+ # last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `
1191
+ # display_name`: corresponds to JobTrigger's display name. - `status`:
1192
+ # corresponds to JobTrigger's status.
1193
+ # @param [Fixnum] page_size
1194
+ # Size of the page, can be limited by a server.
1195
+ # @param [String] page_token
1196
+ # Page token to continue retrieval. Comes from previous call to ListJobTriggers.
1197
+ # `order_by` field must not change for subsequent calls.
1198
+ # @param [String] fields
1199
+ # Selector specifying which fields to include in a partial response.
1200
+ # @param [String] quota_user
1201
+ # Available to use for quota purposes for server-side applications. Can be any
1202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1203
+ # @param [Google::Apis::RequestOptions] options
1204
+ # Request-specific options
1205
+ #
1206
+ # @yield [result, err] Result & error if block supplied
1207
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] parsed result object
1208
+ # @yieldparam err [StandardError] error object if request failed
1209
+ #
1210
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse]
1211
+ #
1212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1215
+ def list_organization_location_job_triggers(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1216
+ command = make_simple_command(:get, 'v2/{+parent}/jobTriggers', options)
1217
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation
1218
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse
1219
+ command.params['parent'] = parent unless parent.nil?
1220
+ command.query['filter'] = filter unless filter.nil?
1221
+ command.query['locationId'] = location_id unless location_id.nil?
1222
+ command.query['orderBy'] = order_by unless order_by.nil?
1223
+ command.query['pageSize'] = page_size unless page_size.nil?
1224
+ command.query['pageToken'] = page_token unless page_token.nil?
1225
+ command.query['fields'] = fields unless fields.nil?
1226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1227
+ execute_or_queue_command(command, &block)
1228
+ end
1229
+
1230
+ # Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
1231
+ # triggers to learn more.
1232
+ # @param [String] name
1233
+ # Required. Resource name of the project and the triggeredJob, for example `
1234
+ # projects/dlp-test-project/jobTriggers/53234423`.
1235
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest] google_privacy_dlp_v2_update_job_trigger_request_object
1236
+ # @param [String] fields
1237
+ # Selector specifying which fields to include in a partial response.
1238
+ # @param [String] quota_user
1239
+ # Available to use for quota purposes for server-side applications. Can be any
1240
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1241
+ # @param [Google::Apis::RequestOptions] options
1242
+ # Request-specific options
1243
+ #
1244
+ # @yield [result, err] Result & error if block supplied
1245
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
1246
+ # @yieldparam err [StandardError] error object if request failed
1247
+ #
1248
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
1249
+ #
1250
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1251
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1252
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1253
+ def patch_organization_location_job_trigger(name, google_privacy_dlp_v2_update_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1254
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1255
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest::Representation
1256
+ command.request_object = google_privacy_dlp_v2_update_job_trigger_request_object
1257
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
1258
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
1259
+ command.params['name'] = name unless name.nil?
1260
+ command.query['fields'] = fields unless fields.nil?
1261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1262
+ execute_or_queue_command(command, &block)
1263
+ end
1264
+
1265
+ # Creates a pre-built stored infoType to be used for inspection. See https://
1266
+ # cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
1267
+ # @param [String] parent
1268
+ # Required. Parent resource name. The format of this value varies depending on
1269
+ # the scope of the request (project or organization) and whether you have [
1270
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1271
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1272
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1273
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1274
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1275
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1276
+ # example `parent` string specifies a parent project with the identifier `
1277
+ # example-project`, and specifies the `europe-west3` location for processing
1278
+ # data: parent=projects/example-project/locations/europe-west3
1279
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_request_object
1280
+ # @param [String] fields
1281
+ # Selector specifying which fields to include in a partial response.
1282
+ # @param [String] quota_user
1283
+ # Available to use for quota purposes for server-side applications. Can be any
1284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1285
+ # @param [Google::Apis::RequestOptions] options
1286
+ # Request-specific options
1287
+ #
1288
+ # @yield [result, err] Result & error if block supplied
1289
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1290
+ # @yieldparam err [StandardError] error object if request failed
1291
+ #
1292
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1293
+ #
1294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1297
+ def create_organization_location_stored_info_type(parent, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1298
+ command = make_simple_command(:post, 'v2/{+parent}/storedInfoTypes', options)
1299
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation
1300
+ command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object
1301
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1302
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1303
+ command.params['parent'] = parent unless parent.nil?
1304
+ command.query['fields'] = fields unless fields.nil?
1305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1306
+ execute_or_queue_command(command, &block)
1307
+ end
1308
+
1309
+ # Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-
1310
+ # stored-infotypes to learn more.
1311
+ # @param [String] name
1312
+ # Required. Resource name of the organization and storedInfoType to be deleted,
1313
+ # for example `organizations/433245324/storedInfoTypes/432452342` or projects/
1314
+ # project-id/storedInfoTypes/432452342.
1315
+ # @param [String] fields
1316
+ # Selector specifying which fields to include in a partial response.
1317
+ # @param [String] quota_user
1318
+ # Available to use for quota purposes for server-side applications. Can be any
1319
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1320
+ # @param [Google::Apis::RequestOptions] options
1321
+ # Request-specific options
1322
+ #
1323
+ # @yield [result, err] Result & error if block supplied
1324
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
1325
+ # @yieldparam err [StandardError] error object if request failed
1326
+ #
1327
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
1328
+ #
1329
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1330
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1331
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1332
+ def delete_organization_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
1333
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1334
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
1335
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
1336
+ command.params['name'] = name unless name.nil?
1337
+ command.query['fields'] = fields unless fields.nil?
1338
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1339
+ execute_or_queue_command(command, &block)
1340
+ end
1341
+
1342
+ # Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-
1343
+ # infotypes to learn more.
1344
+ # @param [String] name
1345
+ # Required. Resource name of the organization and storedInfoType to be read, for
1346
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
1347
+ # project-id/storedInfoTypes/432452342.
1348
+ # @param [String] fields
1349
+ # Selector specifying which fields to include in a partial response.
1350
+ # @param [String] quota_user
1351
+ # Available to use for quota purposes for server-side applications. Can be any
1352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1353
+ # @param [Google::Apis::RequestOptions] options
1354
+ # Request-specific options
1355
+ #
1356
+ # @yield [result, err] Result & error if block supplied
1357
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1358
+ # @yieldparam err [StandardError] error object if request failed
1359
+ #
1360
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1361
+ #
1362
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1363
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1364
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1365
+ def get_organization_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
1366
+ command = make_simple_command(:get, 'v2/{+name}', options)
1367
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1368
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1369
+ command.params['name'] = name unless name.nil?
1370
+ command.query['fields'] = fields unless fields.nil?
1371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1372
+ execute_or_queue_command(command, &block)
1373
+ end
1374
+
1375
+ # Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-
1376
+ # infotypes to learn more.
1377
+ # @param [String] parent
1378
+ # Required. Parent resource name. The format of this value varies depending on
1379
+ # the scope of the request (project or organization) and whether you have [
1380
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1381
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1382
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1383
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1384
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1385
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1386
+ # example `parent` string specifies a parent project with the identifier `
1387
+ # example-project`, and specifies the `europe-west3` location for processing
1388
+ # data: parent=projects/example-project/locations/europe-west3
1389
+ # @param [String] location_id
1390
+ # Deprecated. This field has no effect.
1391
+ # @param [String] order_by
1392
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
1393
+ # postfix. This list is case-insensitive, default sorting order is ascending,
1394
+ # redundant space characters are insignificant. Example: `name asc, display_name,
1395
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
1396
+ # the most recent version of the resource was created. - `state`: corresponds to
1397
+ # the state of the resource. - `name`: corresponds to resource name. - `
1398
+ # display_name`: corresponds to info type's display name.
1399
+ # @param [Fixnum] page_size
1400
+ # Size of the page, can be limited by server. If zero server returns a page of
1401
+ # max size 100.
1402
+ # @param [String] page_token
1403
+ # Page token to continue retrieval. Comes from previous call to `
1404
+ # ListStoredInfoTypes`.
1405
+ # @param [String] fields
1406
+ # Selector specifying which fields to include in a partial response.
1407
+ # @param [String] quota_user
1408
+ # Available to use for quota purposes for server-side applications. Can be any
1409
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1410
+ # @param [Google::Apis::RequestOptions] options
1411
+ # Request-specific options
1412
+ #
1413
+ # @yield [result, err] Result & error if block supplied
1414
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object
1415
+ # @yieldparam err [StandardError] error object if request failed
1416
+ #
1417
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse]
1418
+ #
1419
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1420
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1421
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1422
+ def list_organization_location_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1423
+ command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options)
1424
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation
1425
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse
1426
+ command.params['parent'] = parent unless parent.nil?
1427
+ command.query['locationId'] = location_id unless location_id.nil?
1428
+ command.query['orderBy'] = order_by unless order_by.nil?
1429
+ command.query['pageSize'] = page_size unless page_size.nil?
1430
+ command.query['pageToken'] = page_token unless page_token.nil?
1431
+ command.query['fields'] = fields unless fields.nil?
1432
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1433
+ execute_or_queue_command(command, &block)
1434
+ end
1435
+
1436
+ # Updates the stored infoType by creating a new version. The existing version
1437
+ # will continue to be used until the new version is ready. See https://cloud.
1438
+ # google.com/dlp/docs/creating-stored-infotypes to learn more.
1439
+ # @param [String] name
1440
+ # Required. Resource name of organization and storedInfoType to be updated, for
1441
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
1442
+ # project-id/storedInfoTypes/432452342.
1443
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_request_object
1444
+ # @param [String] fields
1445
+ # Selector specifying which fields to include in a partial response.
1446
+ # @param [String] quota_user
1447
+ # Available to use for quota purposes for server-side applications. Can be any
1448
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1449
+ # @param [Google::Apis::RequestOptions] options
1450
+ # Request-specific options
1451
+ #
1452
+ # @yield [result, err] Result & error if block supplied
1453
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1454
+ # @yieldparam err [StandardError] error object if request failed
1455
+ #
1456
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1457
+ #
1458
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1459
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1460
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1461
+ def patch_organization_location_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1462
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1463
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation
1464
+ command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object
1465
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1466
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1467
+ command.params['name'] = name unless name.nil?
1468
+ command.query['fields'] = fields unless fields.nil?
1469
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1470
+ execute_or_queue_command(command, &block)
1471
+ end
1472
+
1473
+ # Creates a pre-built stored infoType to be used for inspection. See https://
1474
+ # cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
1475
+ # @param [String] parent
1476
+ # Required. Parent resource name. The format of this value varies depending on
1477
+ # the scope of the request (project or organization) and whether you have [
1478
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1479
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1480
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1481
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1482
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1483
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1484
+ # example `parent` string specifies a parent project with the identifier `
1485
+ # example-project`, and specifies the `europe-west3` location for processing
1486
+ # data: parent=projects/example-project/locations/europe-west3
1487
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_request_object
1488
+ # @param [String] fields
1489
+ # Selector specifying which fields to include in a partial response.
1490
+ # @param [String] quota_user
1491
+ # Available to use for quota purposes for server-side applications. Can be any
1492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1493
+ # @param [Google::Apis::RequestOptions] options
1494
+ # Request-specific options
1495
+ #
1496
+ # @yield [result, err] Result & error if block supplied
1497
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1498
+ # @yieldparam err [StandardError] error object if request failed
1499
+ #
1500
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1501
+ #
1502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1505
+ def create_organization_stored_info_type(parent, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1506
+ command = make_simple_command(:post, 'v2/{+parent}/storedInfoTypes', options)
1507
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation
1508
+ command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object
1509
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1510
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1511
+ command.params['parent'] = parent unless parent.nil?
1512
+ command.query['fields'] = fields unless fields.nil?
1513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1514
+ execute_or_queue_command(command, &block)
1515
+ end
1516
+
1517
+ # Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-
1518
+ # stored-infotypes to learn more.
1519
+ # @param [String] name
1520
+ # Required. Resource name of the organization and storedInfoType to be deleted,
1521
+ # for example `organizations/433245324/storedInfoTypes/432452342` or projects/
1522
+ # project-id/storedInfoTypes/432452342.
1523
+ # @param [String] fields
1524
+ # Selector specifying which fields to include in a partial response.
1525
+ # @param [String] quota_user
1526
+ # Available to use for quota purposes for server-side applications. Can be any
1527
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1528
+ # @param [Google::Apis::RequestOptions] options
1529
+ # Request-specific options
1530
+ #
1531
+ # @yield [result, err] Result & error if block supplied
1532
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
1533
+ # @yieldparam err [StandardError] error object if request failed
1534
+ #
1535
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
1536
+ #
1537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1540
+ def delete_organization_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
1541
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1542
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
1543
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
1544
+ command.params['name'] = name unless name.nil?
1545
+ command.query['fields'] = fields unless fields.nil?
1546
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1547
+ execute_or_queue_command(command, &block)
1548
+ end
1549
+
1550
+ # Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-
1551
+ # infotypes to learn more.
1552
+ # @param [String] name
1553
+ # Required. Resource name of the organization and storedInfoType to be read, for
1554
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
1555
+ # project-id/storedInfoTypes/432452342.
1556
+ # @param [String] fields
1557
+ # Selector specifying which fields to include in a partial response.
1558
+ # @param [String] quota_user
1559
+ # Available to use for quota purposes for server-side applications. Can be any
1560
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1561
+ # @param [Google::Apis::RequestOptions] options
1562
+ # Request-specific options
1563
+ #
1564
+ # @yield [result, err] Result & error if block supplied
1565
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1566
+ # @yieldparam err [StandardError] error object if request failed
1567
+ #
1568
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1569
+ #
1570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1573
+ def get_organization_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
1574
+ command = make_simple_command(:get, 'v2/{+name}', options)
1575
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1576
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1577
+ command.params['name'] = name unless name.nil?
1578
+ command.query['fields'] = fields unless fields.nil?
1579
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1580
+ execute_or_queue_command(command, &block)
1581
+ end
1582
+
1583
+ # Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-
1584
+ # infotypes to learn more.
1585
+ # @param [String] parent
1586
+ # Required. Parent resource name. The format of this value varies depending on
1587
+ # the scope of the request (project or organization) and whether you have [
1588
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1589
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1590
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1591
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1592
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1593
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1594
+ # example `parent` string specifies a parent project with the identifier `
1595
+ # example-project`, and specifies the `europe-west3` location for processing
1596
+ # data: parent=projects/example-project/locations/europe-west3
1597
+ # @param [String] location_id
1598
+ # Deprecated. This field has no effect.
1599
+ # @param [String] order_by
1600
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
1601
+ # postfix. This list is case-insensitive, default sorting order is ascending,
1602
+ # redundant space characters are insignificant. Example: `name asc, display_name,
1603
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
1604
+ # the most recent version of the resource was created. - `state`: corresponds to
1605
+ # the state of the resource. - `name`: corresponds to resource name. - `
1606
+ # display_name`: corresponds to info type's display name.
1607
+ # @param [Fixnum] page_size
1608
+ # Size of the page, can be limited by server. If zero server returns a page of
1609
+ # max size 100.
1610
+ # @param [String] page_token
1611
+ # Page token to continue retrieval. Comes from previous call to `
1612
+ # ListStoredInfoTypes`.
1613
+ # @param [String] fields
1614
+ # Selector specifying which fields to include in a partial response.
1615
+ # @param [String] quota_user
1616
+ # Available to use for quota purposes for server-side applications. Can be any
1617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1618
+ # @param [Google::Apis::RequestOptions] options
1619
+ # Request-specific options
1620
+ #
1621
+ # @yield [result, err] Result & error if block supplied
1622
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object
1623
+ # @yieldparam err [StandardError] error object if request failed
1624
+ #
1625
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse]
1626
+ #
1627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1630
+ def list_organization_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1631
+ command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options)
1632
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation
1633
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse
1634
+ command.params['parent'] = parent unless parent.nil?
1635
+ command.query['locationId'] = location_id unless location_id.nil?
1636
+ command.query['orderBy'] = order_by unless order_by.nil?
1637
+ command.query['pageSize'] = page_size unless page_size.nil?
1638
+ command.query['pageToken'] = page_token unless page_token.nil?
1639
+ command.query['fields'] = fields unless fields.nil?
1640
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1641
+ execute_or_queue_command(command, &block)
1642
+ end
1643
+
1644
+ # Updates the stored infoType by creating a new version. The existing version
1645
+ # will continue to be used until the new version is ready. See https://cloud.
1646
+ # google.com/dlp/docs/creating-stored-infotypes to learn more.
1647
+ # @param [String] name
1648
+ # Required. Resource name of organization and storedInfoType to be updated, for
1649
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
1650
+ # project-id/storedInfoTypes/432452342.
1651
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_request_object
1652
+ # @param [String] fields
1653
+ # Selector specifying which fields to include in a partial response.
1654
+ # @param [String] quota_user
1655
+ # Available to use for quota purposes for server-side applications. Can be any
1656
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1657
+ # @param [Google::Apis::RequestOptions] options
1658
+ # Request-specific options
1659
+ #
1660
+ # @yield [result, err] Result & error if block supplied
1661
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
1662
+ # @yieldparam err [StandardError] error object if request failed
1663
+ #
1664
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
1665
+ #
1666
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1667
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1668
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1669
+ def patch_organization_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1670
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1671
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation
1672
+ command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object
1673
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
1674
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
1675
+ command.params['name'] = name unless name.nil?
1676
+ command.query['fields'] = fields unless fields.nil?
1677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1678
+ execute_or_queue_command(command, &block)
1679
+ end
1680
+
1681
+ # De-identifies potentially sensitive info from a ContentItem. This method has
1682
+ # limits on input size and output size. See https://cloud.google.com/dlp/docs/
1683
+ # deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes
1684
+ # are specified in this request, the system will automatically choose what
1685
+ # detectors to run. By default this may be all types, but may change over time
1686
+ # as detectors are updated.
1687
+ # @param [String] parent
1688
+ # Parent resource name. The format of this value varies depending on whether you
1689
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
1690
+ # specifying-location): + Projects scope, location specified: `projects/`
1691
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
1692
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
1693
+ # string specifies a parent project with the identifier `example-project`, and
1694
+ # specifies the `europe-west3` location for processing data: parent=projects/
1695
+ # example-project/locations/europe-west3
1696
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest] google_privacy_dlp_v2_deidentify_content_request_object
1697
+ # @param [String] fields
1698
+ # Selector specifying which fields to include in a partial response.
1699
+ # @param [String] quota_user
1700
+ # Available to use for quota purposes for server-side applications. Can be any
1701
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1702
+ # @param [Google::Apis::RequestOptions] options
1703
+ # Request-specific options
1704
+ #
1705
+ # @yield [result, err] Result & error if block supplied
1706
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse] parsed result object
1707
+ # @yieldparam err [StandardError] error object if request failed
1708
+ #
1709
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse]
1710
+ #
1711
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1712
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1713
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1714
+ def deidentify_project_content(parent, google_privacy_dlp_v2_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1715
+ command = make_simple_command(:post, 'v2/{+parent}/content:deidentify', options)
1716
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest::Representation
1717
+ command.request_object = google_privacy_dlp_v2_deidentify_content_request_object
1718
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse::Representation
1719
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse
1720
+ command.params['parent'] = parent unless parent.nil?
1721
+ command.query['fields'] = fields unless fields.nil?
1722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1723
+ execute_or_queue_command(command, &block)
1724
+ end
1725
+
1726
+ # Finds potentially sensitive info in content. This method has limits on input
1727
+ # size, processing time, and output size. When no InfoTypes or CustomInfoTypes
1728
+ # are specified in this request, the system will automatically choose what
1729
+ # detectors to run. By default this may be all types, but may change over time
1730
+ # as detectors are updated. For how to guides, see https://cloud.google.com/dlp/
1731
+ # docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,
1732
+ # @param [String] parent
1733
+ # Parent resource name. The format of this value varies depending on whether you
1734
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
1735
+ # specifying-location): + Projects scope, location specified: `projects/`
1736
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
1737
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
1738
+ # string specifies a parent project with the identifier `example-project`, and
1739
+ # specifies the `europe-west3` location for processing data: parent=projects/
1740
+ # example-project/locations/europe-west3
1741
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest] google_privacy_dlp_v2_inspect_content_request_object
1742
+ # @param [String] fields
1743
+ # Selector specifying which fields to include in a partial response.
1744
+ # @param [String] quota_user
1745
+ # Available to use for quota purposes for server-side applications. Can be any
1746
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1747
+ # @param [Google::Apis::RequestOptions] options
1748
+ # Request-specific options
1749
+ #
1750
+ # @yield [result, err] Result & error if block supplied
1751
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse] parsed result object
1752
+ # @yieldparam err [StandardError] error object if request failed
1753
+ #
1754
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse]
1755
+ #
1756
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1757
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1758
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1759
+ def inspect_project_content(parent, google_privacy_dlp_v2_inspect_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1760
+ command = make_simple_command(:post, 'v2/{+parent}/content:inspect', options)
1761
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest::Representation
1762
+ command.request_object = google_privacy_dlp_v2_inspect_content_request_object
1763
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse::Representation
1764
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse
1765
+ command.params['parent'] = parent unless parent.nil?
1766
+ command.query['fields'] = fields unless fields.nil?
1767
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1768
+ execute_or_queue_command(command, &block)
1769
+ end
1770
+
1771
+ # Re-identifies content that has been de-identified. See https://cloud.google.
1772
+ # com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to
1773
+ # learn more.
1774
+ # @param [String] parent
1775
+ # Required. Parent resource name. The format of this value varies depending on
1776
+ # whether you have [specified a processing location](https://cloud.google.com/
1777
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
1778
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
1779
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
1780
+ # string specifies a parent project with the identifier `example-project`, and
1781
+ # specifies the `europe-west3` location for processing data: parent=projects/
1782
+ # example-project/locations/europe-west3
1783
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest] google_privacy_dlp_v2_reidentify_content_request_object
1784
+ # @param [String] fields
1785
+ # Selector specifying which fields to include in a partial response.
1786
+ # @param [String] quota_user
1787
+ # Available to use for quota purposes for server-side applications. Can be any
1788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1789
+ # @param [Google::Apis::RequestOptions] options
1790
+ # Request-specific options
1791
+ #
1792
+ # @yield [result, err] Result & error if block supplied
1793
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse] parsed result object
1794
+ # @yieldparam err [StandardError] error object if request failed
1795
+ #
1796
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse]
1797
+ #
1798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1801
+ def reidentify_project_content(parent, google_privacy_dlp_v2_reidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1802
+ command = make_simple_command(:post, 'v2/{+parent}/content:reidentify', options)
1803
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest::Representation
1804
+ command.request_object = google_privacy_dlp_v2_reidentify_content_request_object
1805
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse::Representation
1806
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse
1807
+ command.params['parent'] = parent unless parent.nil?
1808
+ command.query['fields'] = fields unless fields.nil?
1809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1810
+ execute_or_queue_command(command, &block)
1811
+ end
1812
+
1813
+ # Creates a DeidentifyTemplate for re-using frequently used configuration for de-
1814
+ # identifying content, images, and storage. See https://cloud.google.com/dlp/
1815
+ # docs/creating-templates-deid to learn more.
1816
+ # @param [String] parent
1817
+ # Required. Parent resource name. The format of this value varies depending on
1818
+ # the scope of the request (project or organization) and whether you have [
1819
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1820
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1821
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1822
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1823
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1824
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1825
+ # example `parent` string specifies a parent project with the identifier `
1826
+ # example-project`, and specifies the `europe-west3` location for processing
1827
+ # data: parent=projects/example-project/locations/europe-west3
1828
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_request_object
1829
+ # @param [String] fields
1830
+ # Selector specifying which fields to include in a partial response.
1831
+ # @param [String] quota_user
1832
+ # Available to use for quota purposes for server-side applications. Can be any
1833
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1834
+ # @param [Google::Apis::RequestOptions] options
1835
+ # Request-specific options
1836
+ #
1837
+ # @yield [result, err] Result & error if block supplied
1838
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
1839
+ # @yieldparam err [StandardError] error object if request failed
1840
+ #
1841
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
1842
+ #
1843
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1844
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1845
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1846
+ def create_project_deidentify_template(parent, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1847
+ command = make_simple_command(:post, 'v2/{+parent}/deidentifyTemplates', options)
1848
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation
1849
+ command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object
1850
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
1851
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
1852
+ command.params['parent'] = parent unless parent.nil?
1853
+ command.query['fields'] = fields unless fields.nil?
1854
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1855
+ execute_or_queue_command(command, &block)
1856
+ end
1857
+
1858
+ # Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
1859
+ # templates-deid to learn more.
1860
+ # @param [String] name
1861
+ # Required. Resource name of the organization and deidentify template to be
1862
+ # deleted, for example `organizations/433245324/deidentifyTemplates/432452342`
1863
+ # or projects/project-id/deidentifyTemplates/432452342.
1864
+ # @param [String] fields
1865
+ # Selector specifying which fields to include in a partial response.
1866
+ # @param [String] quota_user
1867
+ # Available to use for quota purposes for server-side applications. Can be any
1868
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1869
+ # @param [Google::Apis::RequestOptions] options
1870
+ # Request-specific options
1871
+ #
1872
+ # @yield [result, err] Result & error if block supplied
1873
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
1874
+ # @yieldparam err [StandardError] error object if request failed
1875
+ #
1876
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
1877
+ #
1878
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1879
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1880
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1881
+ def delete_project_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
1882
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1883
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
1884
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
1885
+ command.params['name'] = name unless name.nil?
1886
+ command.query['fields'] = fields unless fields.nil?
1887
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1888
+ execute_or_queue_command(command, &block)
1889
+ end
1890
+
1891
+ # Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
1892
+ # templates-deid to learn more.
1893
+ # @param [String] name
1894
+ # Required. Resource name of the organization and deidentify template to be read,
1895
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
1896
+ # projects/project-id/deidentifyTemplates/432452342.
1897
+ # @param [String] fields
1898
+ # Selector specifying which fields to include in a partial response.
1899
+ # @param [String] quota_user
1900
+ # Available to use for quota purposes for server-side applications. Can be any
1901
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1902
+ # @param [Google::Apis::RequestOptions] options
1903
+ # Request-specific options
1904
+ #
1905
+ # @yield [result, err] Result & error if block supplied
1906
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
1907
+ # @yieldparam err [StandardError] error object if request failed
1908
+ #
1909
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
1910
+ #
1911
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1912
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1913
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1914
+ def get_project_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
1915
+ command = make_simple_command(:get, 'v2/{+name}', options)
1916
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
1917
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
1918
+ command.params['name'] = name unless name.nil?
1919
+ command.query['fields'] = fields unless fields.nil?
1920
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1921
+ execute_or_queue_command(command, &block)
1922
+ end
1923
+
1924
+ # Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-
1925
+ # templates-deid to learn more.
1926
+ # @param [String] parent
1927
+ # Required. Parent resource name. The format of this value varies depending on
1928
+ # the scope of the request (project or organization) and whether you have [
1929
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
1930
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
1931
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
1932
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
1933
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
1934
+ # location specified (defaults to global): `organizations/`ORG_ID The following
1935
+ # example `parent` string specifies a parent project with the identifier `
1936
+ # example-project`, and specifies the `europe-west3` location for processing
1937
+ # data: parent=projects/example-project/locations/europe-west3
1938
+ # @param [String] location_id
1939
+ # Deprecated. This field has no effect.
1940
+ # @param [String] order_by
1941
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
1942
+ # postfix. This list is case-insensitive, default sorting order is ascending,
1943
+ # redundant space characters are insignificant. Example: `name asc,update_time,
1944
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
1945
+ # the template was created. - `update_time`: corresponds to time the template
1946
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
1947
+ # corresponds to template's display name.
1948
+ # @param [Fixnum] page_size
1949
+ # Size of the page, can be limited by server. If zero server returns a page of
1950
+ # max size 100.
1951
+ # @param [String] page_token
1952
+ # Page token to continue retrieval. Comes from previous call to `
1953
+ # ListDeidentifyTemplates`.
1954
+ # @param [String] fields
1955
+ # Selector specifying which fields to include in a partial response.
1956
+ # @param [String] quota_user
1957
+ # Available to use for quota purposes for server-side applications. Can be any
1958
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1959
+ # @param [Google::Apis::RequestOptions] options
1960
+ # Request-specific options
1961
+ #
1962
+ # @yield [result, err] Result & error if block supplied
1963
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object
1964
+ # @yieldparam err [StandardError] error object if request failed
1965
+ #
1966
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse]
1967
+ #
1968
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1969
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1970
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1971
+ def list_project_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1972
+ command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options)
1973
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation
1974
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse
1975
+ command.params['parent'] = parent unless parent.nil?
1976
+ command.query['locationId'] = location_id unless location_id.nil?
1977
+ command.query['orderBy'] = order_by unless order_by.nil?
1978
+ command.query['pageSize'] = page_size unless page_size.nil?
1979
+ command.query['pageToken'] = page_token unless page_token.nil?
1980
+ command.query['fields'] = fields unless fields.nil?
1981
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1982
+ execute_or_queue_command(command, &block)
1983
+ end
1984
+
1985
+ # Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
1986
+ # templates-deid to learn more.
1987
+ # @param [String] name
1988
+ # Required. Resource name of organization and deidentify template to be updated,
1989
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
1990
+ # projects/project-id/deidentifyTemplates/432452342.
1991
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_request_object
1992
+ # @param [String] fields
1993
+ # Selector specifying which fields to include in a partial response.
1994
+ # @param [String] quota_user
1995
+ # Available to use for quota purposes for server-side applications. Can be any
1996
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1997
+ # @param [Google::Apis::RequestOptions] options
1998
+ # Request-specific options
1999
+ #
2000
+ # @yield [result, err] Result & error if block supplied
2001
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
2002
+ # @yieldparam err [StandardError] error object if request failed
2003
+ #
2004
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
2005
+ #
2006
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2007
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2008
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2009
+ def patch_project_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2010
+ command = make_simple_command(:patch, 'v2/{+name}', options)
2011
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation
2012
+ command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object
2013
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
2014
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
2015
+ command.params['name'] = name unless name.nil?
2016
+ command.query['fields'] = fields unless fields.nil?
2017
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2018
+ execute_or_queue_command(command, &block)
2019
+ end
2020
+
2021
+ # Starts asynchronous cancellation on a long-running DlpJob. The server makes a
2022
+ # best effort to cancel the DlpJob, but success is not guaranteed. See https://
2023
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
2024
+ # docs/compute-risk-analysis to learn more.
2025
+ # @param [String] name
2026
+ # Required. The name of the DlpJob resource to be cancelled.
2027
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest] google_privacy_dlp_v2_cancel_dlp_job_request_object
2028
+ # @param [String] fields
2029
+ # Selector specifying which fields to include in a partial response.
2030
+ # @param [String] quota_user
2031
+ # Available to use for quota purposes for server-side applications. Can be any
2032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2033
+ # @param [Google::Apis::RequestOptions] options
2034
+ # Request-specific options
2035
+ #
2036
+ # @yield [result, err] Result & error if block supplied
2037
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
2038
+ # @yieldparam err [StandardError] error object if request failed
2039
+ #
2040
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
2041
+ #
2042
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2043
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2044
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2045
+ def cancel_project_dlp_job(name, google_privacy_dlp_v2_cancel_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2046
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
2047
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest::Representation
2048
+ command.request_object = google_privacy_dlp_v2_cancel_dlp_job_request_object
2049
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
2050
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
2051
+ command.params['name'] = name unless name.nil?
2052
+ command.query['fields'] = fields unless fields.nil?
2053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2054
+ execute_or_queue_command(command, &block)
2055
+ end
2056
+
2057
+ # Creates a new job to inspect storage or calculate risk metrics. See https://
2058
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
2059
+ # docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes
2060
+ # are specified in inspect jobs, the system will automatically choose what
2061
+ # detectors to run. By default this may be all types, but may change over time
2062
+ # as detectors are updated.
2063
+ # @param [String] parent
2064
+ # Required. Parent resource name. The format of this value varies depending on
2065
+ # whether you have [specified a processing location](https://cloud.google.com/
2066
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
2067
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2068
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2069
+ # string specifies a parent project with the identifier `example-project`, and
2070
+ # specifies the `europe-west3` location for processing data: parent=projects/
2071
+ # example-project/locations/europe-west3
2072
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest] google_privacy_dlp_v2_create_dlp_job_request_object
2073
+ # @param [String] fields
2074
+ # Selector specifying which fields to include in a partial response.
2075
+ # @param [String] quota_user
2076
+ # Available to use for quota purposes for server-side applications. Can be any
2077
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2078
+ # @param [Google::Apis::RequestOptions] options
2079
+ # Request-specific options
2080
+ #
2081
+ # @yield [result, err] Result & error if block supplied
2082
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
2083
+ # @yieldparam err [StandardError] error object if request failed
2084
+ #
2085
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
2086
+ #
2087
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2088
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2089
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2090
+ def create_project_dlp_job(parent, google_privacy_dlp_v2_create_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2091
+ command = make_simple_command(:post, 'v2/{+parent}/dlpJobs', options)
2092
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest::Representation
2093
+ command.request_object = google_privacy_dlp_v2_create_dlp_job_request_object
2094
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
2095
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
2096
+ command.params['parent'] = parent unless parent.nil?
2097
+ command.query['fields'] = fields unless fields.nil?
2098
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2099
+ execute_or_queue_command(command, &block)
2100
+ end
2101
+
2102
+ # Deletes a long-running DlpJob. This method indicates that the client is no
2103
+ # longer interested in the DlpJob result. The job will be cancelled if possible.
2104
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.
2105
+ # google.com/dlp/docs/compute-risk-analysis to learn more.
2106
+ # @param [String] name
2107
+ # Required. The name of the DlpJob resource to be deleted.
2108
+ # @param [String] fields
2109
+ # Selector specifying which fields to include in a partial response.
2110
+ # @param [String] quota_user
2111
+ # Available to use for quota purposes for server-side applications. Can be any
2112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2113
+ # @param [Google::Apis::RequestOptions] options
2114
+ # Request-specific options
2115
+ #
2116
+ # @yield [result, err] Result & error if block supplied
2117
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
2118
+ # @yieldparam err [StandardError] error object if request failed
2119
+ #
2120
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
2121
+ #
2122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2125
+ def delete_project_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block)
2126
+ command = make_simple_command(:delete, 'v2/{+name}', options)
2127
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
2128
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
2129
+ command.params['name'] = name unless name.nil?
2130
+ command.query['fields'] = fields unless fields.nil?
2131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2132
+ execute_or_queue_command(command, &block)
2133
+ end
2134
+
2135
+ # Gets the latest state of a long-running DlpJob. See https://cloud.google.com/
2136
+ # dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-
2137
+ # analysis to learn more.
2138
+ # @param [String] name
2139
+ # Required. The name of the DlpJob resource.
2140
+ # @param [String] fields
2141
+ # Selector specifying which fields to include in a partial response.
2142
+ # @param [String] quota_user
2143
+ # Available to use for quota purposes for server-side applications. Can be any
2144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2145
+ # @param [Google::Apis::RequestOptions] options
2146
+ # Request-specific options
2147
+ #
2148
+ # @yield [result, err] Result & error if block supplied
2149
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
2150
+ # @yieldparam err [StandardError] error object if request failed
2151
+ #
2152
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
2153
+ #
2154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2157
+ def get_project_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block)
2158
+ command = make_simple_command(:get, 'v2/{+name}', options)
2159
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
2160
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
2161
+ command.params['name'] = name unless name.nil?
2162
+ command.query['fields'] = fields unless fields.nil?
2163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2164
+ execute_or_queue_command(command, &block)
2165
+ end
2166
+
2167
+ # Lists DlpJobs that match the specified filter in the request. See https://
2168
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
2169
+ # docs/compute-risk-analysis to learn more.
2170
+ # @param [String] parent
2171
+ # Required. Parent resource name. The format of this value varies depending on
2172
+ # whether you have [specified a processing location](https://cloud.google.com/
2173
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
2174
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2175
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2176
+ # string specifies a parent project with the identifier `example-project`, and
2177
+ # specifies the `europe-west3` location for processing data: parent=projects/
2178
+ # example-project/locations/europe-west3
2179
+ # @param [String] filter
2180
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
2181
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
2182
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
2183
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
2184
+ # inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `
2185
+ # inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The
2186
+ # resource name of the trigger that created job. - 'end_time` - Corresponds to
2187
+ # time the job finished. - 'start_time` - Corresponds to time the job finished. *
2188
+ # Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|
2189
+ # FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - '
2190
+ # start_time` - Corresponds to time the job finished. * The operator must be `=`
2191
+ # or `!=`. Examples: * inspected_storage = cloud_storage AND state = done *
2192
+ # inspected_storage = cloud_storage OR inspected_storage = bigquery *
2193
+ # inspected_storage = cloud_storage AND (state = done OR state = canceled) *
2194
+ # end_time > \"2017-12-12T00:00:00+00:00\" The length of this field should be no
2195
+ # more than 500 characters.
2196
+ # @param [String] location_id
2197
+ # Deprecated. This field has no effect.
2198
+ # @param [String] order_by
2199
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
2200
+ # postfix. This list is case-insensitive, default sorting order is ascending,
2201
+ # redundant space characters are insignificant. Example: `name asc, end_time asc,
2202
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
2203
+ # the job was created. - `end_time`: corresponds to time the job ended. - `name`:
2204
+ # corresponds to job's name. - `state`: corresponds to `state`
2205
+ # @param [Fixnum] page_size
2206
+ # The standard list page size.
2207
+ # @param [String] page_token
2208
+ # The standard list page token.
2209
+ # @param [String] type
2210
+ # The type of job. Defaults to `DlpJobType.INSPECT`
2211
+ # @param [String] fields
2212
+ # Selector specifying which fields to include in a partial response.
2213
+ # @param [String] quota_user
2214
+ # Available to use for quota purposes for server-side applications. Can be any
2215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2216
+ # @param [Google::Apis::RequestOptions] options
2217
+ # Request-specific options
2218
+ #
2219
+ # @yield [result, err] Result & error if block supplied
2220
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] parsed result object
2221
+ # @yieldparam err [StandardError] error object if request failed
2222
+ #
2223
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse]
2224
+ #
2225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2228
+ def list_project_dlp_jobs(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
2229
+ command = make_simple_command(:get, 'v2/{+parent}/dlpJobs', options)
2230
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation
2231
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse
2232
+ command.params['parent'] = parent unless parent.nil?
2233
+ command.query['filter'] = filter unless filter.nil?
2234
+ command.query['locationId'] = location_id unless location_id.nil?
2235
+ command.query['orderBy'] = order_by unless order_by.nil?
2236
+ command.query['pageSize'] = page_size unless page_size.nil?
2237
+ command.query['pageToken'] = page_token unless page_token.nil?
2238
+ command.query['type'] = type unless type.nil?
2239
+ command.query['fields'] = fields unless fields.nil?
2240
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2241
+ execute_or_queue_command(command, &block)
2242
+ end
2243
+
2244
+ # Redacts potentially sensitive info from an image. This method has limits on
2245
+ # input size, processing time, and output size. See https://cloud.google.com/dlp/
2246
+ # docs/redacting-sensitive-data-images to learn more. When no InfoTypes or
2247
+ # CustomInfoTypes are specified in this request, the system will automatically
2248
+ # choose what detectors to run. By default this may be all types, but may change
2249
+ # over time as detectors are updated.
2250
+ # @param [String] parent
2251
+ # Parent resource name. The format of this value varies depending on whether you
2252
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
2253
+ # specifying-location): + Projects scope, location specified: `projects/`
2254
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2255
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2256
+ # string specifies a parent project with the identifier `example-project`, and
2257
+ # specifies the `europe-west3` location for processing data: parent=projects/
2258
+ # example-project/locations/europe-west3
2259
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest] google_privacy_dlp_v2_redact_image_request_object
2260
+ # @param [String] fields
2261
+ # Selector specifying which fields to include in a partial response.
2262
+ # @param [String] quota_user
2263
+ # Available to use for quota purposes for server-side applications. Can be any
2264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2265
+ # @param [Google::Apis::RequestOptions] options
2266
+ # Request-specific options
2267
+ #
2268
+ # @yield [result, err] Result & error if block supplied
2269
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse] parsed result object
2270
+ # @yieldparam err [StandardError] error object if request failed
2271
+ #
2272
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse]
2273
+ #
2274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2277
+ def redact_project_image(parent, google_privacy_dlp_v2_redact_image_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2278
+ command = make_simple_command(:post, 'v2/{+parent}/image:redact', options)
2279
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest::Representation
2280
+ command.request_object = google_privacy_dlp_v2_redact_image_request_object
2281
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse::Representation
2282
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse
2283
+ command.params['parent'] = parent unless parent.nil?
2284
+ command.query['fields'] = fields unless fields.nil?
2285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2286
+ execute_or_queue_command(command, &block)
2287
+ end
2288
+
2289
+ # Creates an InspectTemplate for re-using frequently used configuration for
2290
+ # inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/
2291
+ # creating-templates to learn more.
2292
+ # @param [String] parent
2293
+ # Required. Parent resource name. The format of this value varies depending on
2294
+ # the scope of the request (project or organization) and whether you have [
2295
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
2296
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
2297
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
2298
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
2299
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
2300
+ # location specified (defaults to global): `organizations/`ORG_ID The following
2301
+ # example `parent` string specifies a parent project with the identifier `
2302
+ # example-project`, and specifies the `europe-west3` location for processing
2303
+ # data: parent=projects/example-project/locations/europe-west3
2304
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_request_object
2305
+ # @param [String] fields
2306
+ # Selector specifying which fields to include in a partial response.
2307
+ # @param [String] quota_user
2308
+ # Available to use for quota purposes for server-side applications. Can be any
2309
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2310
+ # @param [Google::Apis::RequestOptions] options
2311
+ # Request-specific options
2312
+ #
2313
+ # @yield [result, err] Result & error if block supplied
2314
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
2315
+ # @yieldparam err [StandardError] error object if request failed
2316
+ #
2317
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
2318
+ #
2319
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2320
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2321
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2322
+ def create_project_inspect_template(parent, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2323
+ command = make_simple_command(:post, 'v2/{+parent}/inspectTemplates', options)
2324
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation
2325
+ command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object
2326
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
2327
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
2328
+ command.params['parent'] = parent unless parent.nil?
2329
+ command.query['fields'] = fields unless fields.nil?
2330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2331
+ execute_or_queue_command(command, &block)
2332
+ end
2333
+
2334
+ # Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
2335
+ # templates to learn more.
2336
+ # @param [String] name
2337
+ # Required. Resource name of the organization and inspectTemplate to be deleted,
2338
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
2339
+ # project-id/inspectTemplates/432452342.
2340
+ # @param [String] fields
2341
+ # Selector specifying which fields to include in a partial response.
2342
+ # @param [String] quota_user
2343
+ # Available to use for quota purposes for server-side applications. Can be any
2344
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2345
+ # @param [Google::Apis::RequestOptions] options
2346
+ # Request-specific options
2347
+ #
2348
+ # @yield [result, err] Result & error if block supplied
2349
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
2350
+ # @yieldparam err [StandardError] error object if request failed
2351
+ #
2352
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
2353
+ #
2354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2357
+ def delete_project_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
2358
+ command = make_simple_command(:delete, 'v2/{+name}', options)
2359
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
2360
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
2361
+ command.params['name'] = name unless name.nil?
2362
+ command.query['fields'] = fields unless fields.nil?
2363
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2364
+ execute_or_queue_command(command, &block)
2365
+ end
2366
+
2367
+ # Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
2368
+ # templates to learn more.
2369
+ # @param [String] name
2370
+ # Required. Resource name of the organization and inspectTemplate to be read,
2371
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
2372
+ # project-id/inspectTemplates/432452342.
2373
+ # @param [String] fields
2374
+ # Selector specifying which fields to include in a partial response.
2375
+ # @param [String] quota_user
2376
+ # Available to use for quota purposes for server-side applications. Can be any
2377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2378
+ # @param [Google::Apis::RequestOptions] options
2379
+ # Request-specific options
2380
+ #
2381
+ # @yield [result, err] Result & error if block supplied
2382
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
2383
+ # @yieldparam err [StandardError] error object if request failed
2384
+ #
2385
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
2386
+ #
2387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2390
+ def get_project_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
2391
+ command = make_simple_command(:get, 'v2/{+name}', options)
2392
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
2393
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
2394
+ command.params['name'] = name unless name.nil?
2395
+ command.query['fields'] = fields unless fields.nil?
2396
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2397
+ execute_or_queue_command(command, &block)
2398
+ end
2399
+
2400
+ # Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-
2401
+ # templates to learn more.
2402
+ # @param [String] parent
2403
+ # Required. Parent resource name. The format of this value varies depending on
2404
+ # the scope of the request (project or organization) and whether you have [
2405
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
2406
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
2407
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
2408
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
2409
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
2410
+ # location specified (defaults to global): `organizations/`ORG_ID The following
2411
+ # example `parent` string specifies a parent project with the identifier `
2412
+ # example-project`, and specifies the `europe-west3` location for processing
2413
+ # data: parent=projects/example-project/locations/europe-west3
2414
+ # @param [String] location_id
2415
+ # Deprecated. This field has no effect.
2416
+ # @param [String] order_by
2417
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
2418
+ # postfix. This list is case-insensitive, default sorting order is ascending,
2419
+ # redundant space characters are insignificant. Example: `name asc,update_time,
2420
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
2421
+ # the template was created. - `update_time`: corresponds to time the template
2422
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
2423
+ # corresponds to template's display name.
2424
+ # @param [Fixnum] page_size
2425
+ # Size of the page, can be limited by server. If zero server returns a page of
2426
+ # max size 100.
2427
+ # @param [String] page_token
2428
+ # Page token to continue retrieval. Comes from previous call to `
2429
+ # ListInspectTemplates`.
2430
+ # @param [String] fields
2431
+ # Selector specifying which fields to include in a partial response.
2432
+ # @param [String] quota_user
2433
+ # Available to use for quota purposes for server-side applications. Can be any
2434
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2435
+ # @param [Google::Apis::RequestOptions] options
2436
+ # Request-specific options
2437
+ #
2438
+ # @yield [result, err] Result & error if block supplied
2439
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object
2440
+ # @yieldparam err [StandardError] error object if request failed
2441
+ #
2442
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse]
2443
+ #
2444
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2445
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2446
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2447
+ def list_project_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2448
+ command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options)
2449
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation
2450
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse
2451
+ command.params['parent'] = parent unless parent.nil?
2452
+ command.query['locationId'] = location_id unless location_id.nil?
2453
+ command.query['orderBy'] = order_by unless order_by.nil?
2454
+ command.query['pageSize'] = page_size unless page_size.nil?
2455
+ command.query['pageToken'] = page_token unless page_token.nil?
2456
+ command.query['fields'] = fields unless fields.nil?
2457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2458
+ execute_or_queue_command(command, &block)
2459
+ end
2460
+
2461
+ # Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
2462
+ # templates to learn more.
2463
+ # @param [String] name
2464
+ # Required. Resource name of organization and inspectTemplate to be updated, for
2465
+ # example `organizations/433245324/inspectTemplates/432452342` or projects/
2466
+ # project-id/inspectTemplates/432452342.
2467
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_request_object
2468
+ # @param [String] fields
2469
+ # Selector specifying which fields to include in a partial response.
2470
+ # @param [String] quota_user
2471
+ # Available to use for quota purposes for server-side applications. Can be any
2472
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2473
+ # @param [Google::Apis::RequestOptions] options
2474
+ # Request-specific options
2475
+ #
2476
+ # @yield [result, err] Result & error if block supplied
2477
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
2478
+ # @yieldparam err [StandardError] error object if request failed
2479
+ #
2480
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
2481
+ #
2482
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2483
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2484
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2485
+ def patch_project_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2486
+ command = make_simple_command(:patch, 'v2/{+name}', options)
2487
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation
2488
+ command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object
2489
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
2490
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
2491
+ command.params['name'] = name unless name.nil?
2492
+ command.query['fields'] = fields unless fields.nil?
2493
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2494
+ execute_or_queue_command(command, &block)
2495
+ end
2496
+
2497
+ # Activate a job trigger. Causes the immediate execute of a trigger instead of
2498
+ # waiting on the trigger event to occur.
2499
+ # @param [String] name
2500
+ # Required. Resource name of the trigger to activate, for example `projects/dlp-
2501
+ # test-project/jobTriggers/53234423`.
2502
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest] google_privacy_dlp_v2_activate_job_trigger_request_object
2503
+ # @param [String] fields
2504
+ # Selector specifying which fields to include in a partial response.
2505
+ # @param [String] quota_user
2506
+ # Available to use for quota purposes for server-side applications. Can be any
2507
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2508
+ # @param [Google::Apis::RequestOptions] options
2509
+ # Request-specific options
2510
+ #
2511
+ # @yield [result, err] Result & error if block supplied
2512
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
2513
+ # @yieldparam err [StandardError] error object if request failed
2514
+ #
2515
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
2516
+ #
2517
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2518
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2519
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2520
+ def activate_project_job_trigger(name, google_privacy_dlp_v2_activate_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2521
+ command = make_simple_command(:post, 'v2/{+name}:activate', options)
2522
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest::Representation
2523
+ command.request_object = google_privacy_dlp_v2_activate_job_trigger_request_object
2524
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
2525
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
2526
+ command.params['name'] = name unless name.nil?
2527
+ command.query['fields'] = fields unless fields.nil?
2528
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2529
+ execute_or_queue_command(command, &block)
2530
+ end
2531
+
2532
+ # Creates a job trigger to run DLP actions such as scanning storage for
2533
+ # sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/
2534
+ # creating-job-triggers to learn more.
2535
+ # @param [String] parent
2536
+ # Required. Parent resource name. The format of this value varies depending on
2537
+ # whether you have [specified a processing location](https://cloud.google.com/
2538
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
2539
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2540
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2541
+ # string specifies a parent project with the identifier `example-project`, and
2542
+ # specifies the `europe-west3` location for processing data: parent=projects/
2543
+ # example-project/locations/europe-west3
2544
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest] google_privacy_dlp_v2_create_job_trigger_request_object
2545
+ # @param [String] fields
2546
+ # Selector specifying which fields to include in a partial response.
2547
+ # @param [String] quota_user
2548
+ # Available to use for quota purposes for server-side applications. Can be any
2549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2550
+ # @param [Google::Apis::RequestOptions] options
2551
+ # Request-specific options
2552
+ #
2553
+ # @yield [result, err] Result & error if block supplied
2554
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
2555
+ # @yieldparam err [StandardError] error object if request failed
2556
+ #
2557
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
2558
+ #
2559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2562
+ def create_project_job_trigger(parent, google_privacy_dlp_v2_create_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2563
+ command = make_simple_command(:post, 'v2/{+parent}/jobTriggers', options)
2564
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest::Representation
2565
+ command.request_object = google_privacy_dlp_v2_create_job_trigger_request_object
2566
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
2567
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
2568
+ command.params['parent'] = parent unless parent.nil?
2569
+ command.query['fields'] = fields unless fields.nil?
2570
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2571
+ execute_or_queue_command(command, &block)
2572
+ end
2573
+
2574
+ # Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
2575
+ # triggers to learn more.
2576
+ # @param [String] name
2577
+ # Required. Resource name of the project and the triggeredJob, for example `
2578
+ # projects/dlp-test-project/jobTriggers/53234423`.
2579
+ # @param [String] fields
2580
+ # Selector specifying which fields to include in a partial response.
2581
+ # @param [String] quota_user
2582
+ # Available to use for quota purposes for server-side applications. Can be any
2583
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2584
+ # @param [Google::Apis::RequestOptions] options
2585
+ # Request-specific options
2586
+ #
2587
+ # @yield [result, err] Result & error if block supplied
2588
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
2589
+ # @yieldparam err [StandardError] error object if request failed
2590
+ #
2591
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
2592
+ #
2593
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2594
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2595
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2596
+ def delete_project_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
2597
+ command = make_simple_command(:delete, 'v2/{+name}', options)
2598
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
2599
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
2600
+ command.params['name'] = name unless name.nil?
2601
+ command.query['fields'] = fields unless fields.nil?
2602
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2603
+ execute_or_queue_command(command, &block)
2604
+ end
2605
+
2606
+ # Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
2607
+ # triggers to learn more.
2608
+ # @param [String] name
2609
+ # Required. Resource name of the project and the triggeredJob, for example `
2610
+ # projects/dlp-test-project/jobTriggers/53234423`.
2611
+ # @param [String] fields
2612
+ # Selector specifying which fields to include in a partial response.
2613
+ # @param [String] quota_user
2614
+ # Available to use for quota purposes for server-side applications. Can be any
2615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2616
+ # @param [Google::Apis::RequestOptions] options
2617
+ # Request-specific options
2618
+ #
2619
+ # @yield [result, err] Result & error if block supplied
2620
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
2621
+ # @yieldparam err [StandardError] error object if request failed
2622
+ #
2623
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
2624
+ #
2625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2628
+ def get_project_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
2629
+ command = make_simple_command(:get, 'v2/{+name}', options)
2630
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
2631
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
2632
+ command.params['name'] = name unless name.nil?
2633
+ command.query['fields'] = fields unless fields.nil?
2634
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2635
+ execute_or_queue_command(command, &block)
2636
+ end
2637
+
2638
+ # Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-
2639
+ # triggers to learn more.
2640
+ # @param [String] parent
2641
+ # Required. Parent resource name. The format of this value varies depending on
2642
+ # whether you have [specified a processing location](https://cloud.google.com/
2643
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
2644
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2645
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2646
+ # string specifies a parent project with the identifier `example-project`, and
2647
+ # specifies the `europe-west3` location for processing data: parent=projects/
2648
+ # example-project/locations/europe-west3
2649
+ # @param [String] filter
2650
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
2651
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
2652
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
2653
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
2654
+ # inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` -
2655
+ # DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted
2656
+ # timestamp, surrounded by quotation marks. Nanoseconds are ignored. - '
2657
+ # error_count' - Number of errors that have occurred while running. * The
2658
+ # operator must be `=` or `!=` for status and inspected_storage. Examples: *
2659
+ # inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage =
2660
+ # cloud_storage OR inspected_storage = bigquery * inspected_storage =
2661
+ # cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time > \"2017-
2662
+ # 12-12T00:00:00+00:00\" The length of this field should be no more than 500
2663
+ # characters.
2664
+ # @param [String] location_id
2665
+ # Deprecated. This field has no effect.
2666
+ # @param [String] order_by
2667
+ # Comma separated list of triggeredJob fields to order by, followed by `asc` or `
2668
+ # desc` postfix. This list is case-insensitive, default sorting order is
2669
+ # ascending, redundant space characters are insignificant. Example: `name asc,
2670
+ # update_time, create_time desc` Supported fields are: - `create_time`:
2671
+ # corresponds to time the JobTrigger was created. - `update_time`: corresponds
2672
+ # to time the JobTrigger was last updated. - `last_run_time`: corresponds to the
2673
+ # last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `
2674
+ # display_name`: corresponds to JobTrigger's display name. - `status`:
2675
+ # corresponds to JobTrigger's status.
2676
+ # @param [Fixnum] page_size
2677
+ # Size of the page, can be limited by a server.
2678
+ # @param [String] page_token
2679
+ # Page token to continue retrieval. Comes from previous call to ListJobTriggers.
2680
+ # `order_by` field must not change for subsequent calls.
2681
+ # @param [String] fields
2682
+ # Selector specifying which fields to include in a partial response.
2683
+ # @param [String] quota_user
2684
+ # Available to use for quota purposes for server-side applications. Can be any
2685
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2686
+ # @param [Google::Apis::RequestOptions] options
2687
+ # Request-specific options
2688
+ #
2689
+ # @yield [result, err] Result & error if block supplied
2690
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] parsed result object
2691
+ # @yieldparam err [StandardError] error object if request failed
2692
+ #
2693
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse]
2694
+ #
2695
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2696
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2697
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2698
+ def list_project_job_triggers(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2699
+ command = make_simple_command(:get, 'v2/{+parent}/jobTriggers', options)
2700
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation
2701
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse
2702
+ command.params['parent'] = parent unless parent.nil?
2703
+ command.query['filter'] = filter unless filter.nil?
2704
+ command.query['locationId'] = location_id unless location_id.nil?
2705
+ command.query['orderBy'] = order_by unless order_by.nil?
2706
+ command.query['pageSize'] = page_size unless page_size.nil?
2707
+ command.query['pageToken'] = page_token unless page_token.nil?
2708
+ command.query['fields'] = fields unless fields.nil?
2709
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2710
+ execute_or_queue_command(command, &block)
2711
+ end
2712
+
2713
+ # Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
2714
+ # triggers to learn more.
2715
+ # @param [String] name
2716
+ # Required. Resource name of the project and the triggeredJob, for example `
2717
+ # projects/dlp-test-project/jobTriggers/53234423`.
2718
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest] google_privacy_dlp_v2_update_job_trigger_request_object
2719
+ # @param [String] fields
2720
+ # Selector specifying which fields to include in a partial response.
2721
+ # @param [String] quota_user
2722
+ # Available to use for quota purposes for server-side applications. Can be any
2723
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2724
+ # @param [Google::Apis::RequestOptions] options
2725
+ # Request-specific options
2726
+ #
2727
+ # @yield [result, err] Result & error if block supplied
2728
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
2729
+ # @yieldparam err [StandardError] error object if request failed
2730
+ #
2731
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
2732
+ #
2733
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2734
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2735
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2736
+ def patch_project_job_trigger(name, google_privacy_dlp_v2_update_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2737
+ command = make_simple_command(:patch, 'v2/{+name}', options)
2738
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest::Representation
2739
+ command.request_object = google_privacy_dlp_v2_update_job_trigger_request_object
2740
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
2741
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
2742
+ command.params['name'] = name unless name.nil?
2743
+ command.query['fields'] = fields unless fields.nil?
2744
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2745
+ execute_or_queue_command(command, &block)
2746
+ end
2747
+
2748
+ # De-identifies potentially sensitive info from a ContentItem. This method has
2749
+ # limits on input size and output size. See https://cloud.google.com/dlp/docs/
2750
+ # deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes
2751
+ # are specified in this request, the system will automatically choose what
2752
+ # detectors to run. By default this may be all types, but may change over time
2753
+ # as detectors are updated.
2754
+ # @param [String] parent
2755
+ # Parent resource name. The format of this value varies depending on whether you
2756
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
2757
+ # specifying-location): + Projects scope, location specified: `projects/`
2758
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2759
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2760
+ # string specifies a parent project with the identifier `example-project`, and
2761
+ # specifies the `europe-west3` location for processing data: parent=projects/
2762
+ # example-project/locations/europe-west3
2763
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest] google_privacy_dlp_v2_deidentify_content_request_object
2764
+ # @param [String] fields
2765
+ # Selector specifying which fields to include in a partial response.
2766
+ # @param [String] quota_user
2767
+ # Available to use for quota purposes for server-side applications. Can be any
2768
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2769
+ # @param [Google::Apis::RequestOptions] options
2770
+ # Request-specific options
2771
+ #
2772
+ # @yield [result, err] Result & error if block supplied
2773
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse] parsed result object
2774
+ # @yieldparam err [StandardError] error object if request failed
2775
+ #
2776
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse]
2777
+ #
2778
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2779
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2780
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2781
+ def deidentify_project_location_content(parent, google_privacy_dlp_v2_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2782
+ command = make_simple_command(:post, 'v2/{+parent}/content:deidentify', options)
2783
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentRequest::Representation
2784
+ command.request_object = google_privacy_dlp_v2_deidentify_content_request_object
2785
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse::Representation
2786
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyContentResponse
2787
+ command.params['parent'] = parent unless parent.nil?
2788
+ command.query['fields'] = fields unless fields.nil?
2789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2790
+ execute_or_queue_command(command, &block)
2791
+ end
2792
+
2793
+ # Finds potentially sensitive info in content. This method has limits on input
2794
+ # size, processing time, and output size. When no InfoTypes or CustomInfoTypes
2795
+ # are specified in this request, the system will automatically choose what
2796
+ # detectors to run. By default this may be all types, but may change over time
2797
+ # as detectors are updated. For how to guides, see https://cloud.google.com/dlp/
2798
+ # docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,
2799
+ # @param [String] parent
2800
+ # Parent resource name. The format of this value varies depending on whether you
2801
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
2802
+ # specifying-location): + Projects scope, location specified: `projects/`
2803
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2804
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2805
+ # string specifies a parent project with the identifier `example-project`, and
2806
+ # specifies the `europe-west3` location for processing data: parent=projects/
2807
+ # example-project/locations/europe-west3
2808
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest] google_privacy_dlp_v2_inspect_content_request_object
2809
+ # @param [String] fields
2810
+ # Selector specifying which fields to include in a partial response.
2811
+ # @param [String] quota_user
2812
+ # Available to use for quota purposes for server-side applications. Can be any
2813
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2814
+ # @param [Google::Apis::RequestOptions] options
2815
+ # Request-specific options
2816
+ #
2817
+ # @yield [result, err] Result & error if block supplied
2818
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse] parsed result object
2819
+ # @yieldparam err [StandardError] error object if request failed
2820
+ #
2821
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse]
2822
+ #
2823
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2824
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2825
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2826
+ def inspect_project_location_content(parent, google_privacy_dlp_v2_inspect_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2827
+ command = make_simple_command(:post, 'v2/{+parent}/content:inspect', options)
2828
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentRequest::Representation
2829
+ command.request_object = google_privacy_dlp_v2_inspect_content_request_object
2830
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse::Representation
2831
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectContentResponse
2832
+ command.params['parent'] = parent unless parent.nil?
2833
+ command.query['fields'] = fields unless fields.nil?
2834
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2835
+ execute_or_queue_command(command, &block)
2836
+ end
2837
+
2838
+ # Re-identifies content that has been de-identified. See https://cloud.google.
2839
+ # com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to
2840
+ # learn more.
2841
+ # @param [String] parent
2842
+ # Required. Parent resource name. The format of this value varies depending on
2843
+ # whether you have [specified a processing location](https://cloud.google.com/
2844
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
2845
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
2846
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
2847
+ # string specifies a parent project with the identifier `example-project`, and
2848
+ # specifies the `europe-west3` location for processing data: parent=projects/
2849
+ # example-project/locations/europe-west3
2850
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest] google_privacy_dlp_v2_reidentify_content_request_object
2851
+ # @param [String] fields
2852
+ # Selector specifying which fields to include in a partial response.
2853
+ # @param [String] quota_user
2854
+ # Available to use for quota purposes for server-side applications. Can be any
2855
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2856
+ # @param [Google::Apis::RequestOptions] options
2857
+ # Request-specific options
2858
+ #
2859
+ # @yield [result, err] Result & error if block supplied
2860
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse] parsed result object
2861
+ # @yieldparam err [StandardError] error object if request failed
2862
+ #
2863
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse]
2864
+ #
2865
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2866
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2867
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2868
+ def reidentify_project_location_content(parent, google_privacy_dlp_v2_reidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2869
+ command = make_simple_command(:post, 'v2/{+parent}/content:reidentify', options)
2870
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentRequest::Representation
2871
+ command.request_object = google_privacy_dlp_v2_reidentify_content_request_object
2872
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse::Representation
2873
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ReidentifyContentResponse
2874
+ command.params['parent'] = parent unless parent.nil?
2875
+ command.query['fields'] = fields unless fields.nil?
2876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2877
+ execute_or_queue_command(command, &block)
2878
+ end
2879
+
2880
+ # Creates a DeidentifyTemplate for re-using frequently used configuration for de-
2881
+ # identifying content, images, and storage. See https://cloud.google.com/dlp/
2882
+ # docs/creating-templates-deid to learn more.
2883
+ # @param [String] parent
2884
+ # Required. Parent resource name. The format of this value varies depending on
2885
+ # the scope of the request (project or organization) and whether you have [
2886
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
2887
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
2888
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
2889
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
2890
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
2891
+ # location specified (defaults to global): `organizations/`ORG_ID The following
2892
+ # example `parent` string specifies a parent project with the identifier `
2893
+ # example-project`, and specifies the `europe-west3` location for processing
2894
+ # data: parent=projects/example-project/locations/europe-west3
2895
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest] google_privacy_dlp_v2_create_deidentify_template_request_object
2896
+ # @param [String] fields
2897
+ # Selector specifying which fields to include in a partial response.
2898
+ # @param [String] quota_user
2899
+ # Available to use for quota purposes for server-side applications. Can be any
2900
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2901
+ # @param [Google::Apis::RequestOptions] options
2902
+ # Request-specific options
2903
+ #
2904
+ # @yield [result, err] Result & error if block supplied
2905
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
2906
+ # @yieldparam err [StandardError] error object if request failed
2907
+ #
2908
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
2909
+ #
2910
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2911
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2912
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2913
+ def create_project_location_deidentify_template(parent, google_privacy_dlp_v2_create_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2914
+ command = make_simple_command(:post, 'v2/{+parent}/deidentifyTemplates', options)
2915
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDeidentifyTemplateRequest::Representation
2916
+ command.request_object = google_privacy_dlp_v2_create_deidentify_template_request_object
2917
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
2918
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
2919
+ command.params['parent'] = parent unless parent.nil?
2920
+ command.query['fields'] = fields unless fields.nil?
2921
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2922
+ execute_or_queue_command(command, &block)
2923
+ end
2924
+
2925
+ # Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
2926
+ # templates-deid to learn more.
2927
+ # @param [String] name
2928
+ # Required. Resource name of the organization and deidentify template to be
2929
+ # deleted, for example `organizations/433245324/deidentifyTemplates/432452342`
2930
+ # or projects/project-id/deidentifyTemplates/432452342.
2931
+ # @param [String] fields
2932
+ # Selector specifying which fields to include in a partial response.
2933
+ # @param [String] quota_user
2934
+ # Available to use for quota purposes for server-side applications. Can be any
2935
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2936
+ # @param [Google::Apis::RequestOptions] options
2937
+ # Request-specific options
2938
+ #
2939
+ # @yield [result, err] Result & error if block supplied
2940
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
2941
+ # @yieldparam err [StandardError] error object if request failed
2942
+ #
2943
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
2944
+ #
2945
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2946
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2947
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2948
+ def delete_project_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
2949
+ command = make_simple_command(:delete, 'v2/{+name}', options)
2950
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
2951
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
2952
+ command.params['name'] = name unless name.nil?
2953
+ command.query['fields'] = fields unless fields.nil?
2954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2955
+ execute_or_queue_command(command, &block)
2956
+ end
2957
+
2958
+ # Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
2959
+ # templates-deid to learn more.
2960
+ # @param [String] name
2961
+ # Required. Resource name of the organization and deidentify template to be read,
2962
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
2963
+ # projects/project-id/deidentifyTemplates/432452342.
2964
+ # @param [String] fields
2965
+ # Selector specifying which fields to include in a partial response.
2966
+ # @param [String] quota_user
2967
+ # Available to use for quota purposes for server-side applications. Can be any
2968
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2969
+ # @param [Google::Apis::RequestOptions] options
2970
+ # Request-specific options
2971
+ #
2972
+ # @yield [result, err] Result & error if block supplied
2973
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
2974
+ # @yieldparam err [StandardError] error object if request failed
2975
+ #
2976
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
2977
+ #
2978
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2979
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2980
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2981
+ def get_project_location_deidentify_template(name, fields: nil, quota_user: nil, options: nil, &block)
2982
+ command = make_simple_command(:get, 'v2/{+name}', options)
2983
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
2984
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
2985
+ command.params['name'] = name unless name.nil?
2986
+ command.query['fields'] = fields unless fields.nil?
2987
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2988
+ execute_or_queue_command(command, &block)
2989
+ end
2990
+
2991
+ # Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-
2992
+ # templates-deid to learn more.
2993
+ # @param [String] parent
2994
+ # Required. Parent resource name. The format of this value varies depending on
2995
+ # the scope of the request (project or organization) and whether you have [
2996
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
2997
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
2998
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
2999
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
3000
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
3001
+ # location specified (defaults to global): `organizations/`ORG_ID The following
3002
+ # example `parent` string specifies a parent project with the identifier `
3003
+ # example-project`, and specifies the `europe-west3` location for processing
3004
+ # data: parent=projects/example-project/locations/europe-west3
3005
+ # @param [String] location_id
3006
+ # Deprecated. This field has no effect.
3007
+ # @param [String] order_by
3008
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
3009
+ # postfix. This list is case-insensitive, default sorting order is ascending,
3010
+ # redundant space characters are insignificant. Example: `name asc,update_time,
3011
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
3012
+ # the template was created. - `update_time`: corresponds to time the template
3013
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
3014
+ # corresponds to template's display name.
3015
+ # @param [Fixnum] page_size
3016
+ # Size of the page, can be limited by server. If zero server returns a page of
3017
+ # max size 100.
3018
+ # @param [String] page_token
3019
+ # Page token to continue retrieval. Comes from previous call to `
3020
+ # ListDeidentifyTemplates`.
3021
+ # @param [String] fields
3022
+ # Selector specifying which fields to include in a partial response.
3023
+ # @param [String] quota_user
3024
+ # Available to use for quota purposes for server-side applications. Can be any
3025
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3026
+ # @param [Google::Apis::RequestOptions] options
3027
+ # Request-specific options
3028
+ #
3029
+ # @yield [result, err] Result & error if block supplied
3030
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse] parsed result object
3031
+ # @yieldparam err [StandardError] error object if request failed
3032
+ #
3033
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse]
3034
+ #
3035
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3036
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3037
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3038
+ def list_project_location_deidentify_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3039
+ command = make_simple_command(:get, 'v2/{+parent}/deidentifyTemplates', options)
3040
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse::Representation
3041
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDeidentifyTemplatesResponse
3042
+ command.params['parent'] = parent unless parent.nil?
3043
+ command.query['locationId'] = location_id unless location_id.nil?
3044
+ command.query['orderBy'] = order_by unless order_by.nil?
3045
+ command.query['pageSize'] = page_size unless page_size.nil?
3046
+ command.query['pageToken'] = page_token unless page_token.nil?
3047
+ command.query['fields'] = fields unless fields.nil?
3048
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3049
+ execute_or_queue_command(command, &block)
3050
+ end
3051
+
3052
+ # Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-
3053
+ # templates-deid to learn more.
3054
+ # @param [String] name
3055
+ # Required. Resource name of organization and deidentify template to be updated,
3056
+ # for example `organizations/433245324/deidentifyTemplates/432452342` or
3057
+ # projects/project-id/deidentifyTemplates/432452342.
3058
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest] google_privacy_dlp_v2_update_deidentify_template_request_object
3059
+ # @param [String] fields
3060
+ # Selector specifying which fields to include in a partial response.
3061
+ # @param [String] quota_user
3062
+ # Available to use for quota purposes for server-side applications. Can be any
3063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3064
+ # @param [Google::Apis::RequestOptions] options
3065
+ # Request-specific options
3066
+ #
3067
+ # @yield [result, err] Result & error if block supplied
3068
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate] parsed result object
3069
+ # @yieldparam err [StandardError] error object if request failed
3070
+ #
3071
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate]
3072
+ #
3073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3076
+ def patch_project_location_deidentify_template(name, google_privacy_dlp_v2_update_deidentify_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3077
+ command = make_simple_command(:patch, 'v2/{+name}', options)
3078
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest::Representation
3079
+ command.request_object = google_privacy_dlp_v2_update_deidentify_template_request_object
3080
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate::Representation
3081
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DeidentifyTemplate
3082
+ command.params['name'] = name unless name.nil?
3083
+ command.query['fields'] = fields unless fields.nil?
3084
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3085
+ execute_or_queue_command(command, &block)
3086
+ end
3087
+
3088
+ # Starts asynchronous cancellation on a long-running DlpJob. The server makes a
3089
+ # best effort to cancel the DlpJob, but success is not guaranteed. See https://
3090
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
3091
+ # docs/compute-risk-analysis to learn more.
3092
+ # @param [String] name
3093
+ # Required. The name of the DlpJob resource to be cancelled.
3094
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest] google_privacy_dlp_v2_cancel_dlp_job_request_object
3095
+ # @param [String] fields
3096
+ # Selector specifying which fields to include in a partial response.
3097
+ # @param [String] quota_user
3098
+ # Available to use for quota purposes for server-side applications. Can be any
3099
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3100
+ # @param [Google::Apis::RequestOptions] options
3101
+ # Request-specific options
3102
+ #
3103
+ # @yield [result, err] Result & error if block supplied
3104
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3105
+ # @yieldparam err [StandardError] error object if request failed
3106
+ #
3107
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3108
+ #
3109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3112
+ def cancel_project_location_dlp_job(name, google_privacy_dlp_v2_cancel_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3113
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
3114
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CancelDlpJobRequest::Representation
3115
+ command.request_object = google_privacy_dlp_v2_cancel_dlp_job_request_object
3116
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3117
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3118
+ command.params['name'] = name unless name.nil?
3119
+ command.query['fields'] = fields unless fields.nil?
3120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3121
+ execute_or_queue_command(command, &block)
3122
+ end
3123
+
3124
+ # Creates a new job to inspect storage or calculate risk metrics. See https://
3125
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
3126
+ # docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes
3127
+ # are specified in inspect jobs, the system will automatically choose what
3128
+ # detectors to run. By default this may be all types, but may change over time
3129
+ # as detectors are updated.
3130
+ # @param [String] parent
3131
+ # Required. Parent resource name. The format of this value varies depending on
3132
+ # whether you have [specified a processing location](https://cloud.google.com/
3133
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
3134
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
3135
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
3136
+ # string specifies a parent project with the identifier `example-project`, and
3137
+ # specifies the `europe-west3` location for processing data: parent=projects/
3138
+ # example-project/locations/europe-west3
3139
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest] google_privacy_dlp_v2_create_dlp_job_request_object
3140
+ # @param [String] fields
3141
+ # Selector specifying which fields to include in a partial response.
3142
+ # @param [String] quota_user
3143
+ # Available to use for quota purposes for server-side applications. Can be any
3144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3145
+ # @param [Google::Apis::RequestOptions] options
3146
+ # Request-specific options
3147
+ #
3148
+ # @yield [result, err] Result & error if block supplied
3149
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
3150
+ # @yieldparam err [StandardError] error object if request failed
3151
+ #
3152
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
3153
+ #
3154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3157
+ def create_project_location_dlp_job(parent, google_privacy_dlp_v2_create_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3158
+ command = make_simple_command(:post, 'v2/{+parent}/dlpJobs', options)
3159
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateDlpJobRequest::Representation
3160
+ command.request_object = google_privacy_dlp_v2_create_dlp_job_request_object
3161
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
3162
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
3163
+ command.params['parent'] = parent unless parent.nil?
3164
+ command.query['fields'] = fields unless fields.nil?
3165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3166
+ execute_or_queue_command(command, &block)
3167
+ end
3168
+
3169
+ # Deletes a long-running DlpJob. This method indicates that the client is no
3170
+ # longer interested in the DlpJob result. The job will be cancelled if possible.
3171
+ # See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.
3172
+ # google.com/dlp/docs/compute-risk-analysis to learn more.
3173
+ # @param [String] name
3174
+ # Required. The name of the DlpJob resource to be deleted.
3175
+ # @param [String] fields
3176
+ # Selector specifying which fields to include in a partial response.
3177
+ # @param [String] quota_user
3178
+ # Available to use for quota purposes for server-side applications. Can be any
3179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3180
+ # @param [Google::Apis::RequestOptions] options
3181
+ # Request-specific options
3182
+ #
3183
+ # @yield [result, err] Result & error if block supplied
3184
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3185
+ # @yieldparam err [StandardError] error object if request failed
3186
+ #
3187
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3188
+ #
3189
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3190
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3191
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3192
+ def delete_project_location_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block)
3193
+ command = make_simple_command(:delete, 'v2/{+name}', options)
3194
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3195
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3196
+ command.params['name'] = name unless name.nil?
3197
+ command.query['fields'] = fields unless fields.nil?
3198
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3199
+ execute_or_queue_command(command, &block)
3200
+ end
3201
+
3202
+ # Finish a running hybrid DlpJob. Triggers the finalization steps and running of
3203
+ # any enabled actions that have not yet run.
3204
+ # @param [String] name
3205
+ # Required. The name of the DlpJob resource to be cancelled.
3206
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2FinishDlpJobRequest] google_privacy_dlp_v2_finish_dlp_job_request_object
3207
+ # @param [String] fields
3208
+ # Selector specifying which fields to include in a partial response.
3209
+ # @param [String] quota_user
3210
+ # Available to use for quota purposes for server-side applications. Can be any
3211
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3212
+ # @param [Google::Apis::RequestOptions] options
3213
+ # Request-specific options
3214
+ #
3215
+ # @yield [result, err] Result & error if block supplied
3216
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3217
+ # @yieldparam err [StandardError] error object if request failed
3218
+ #
3219
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3220
+ #
3221
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3222
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3223
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3224
+ def finish_project_location_dlp_job(name, google_privacy_dlp_v2_finish_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3225
+ command = make_simple_command(:post, 'v2/{+name}:finish', options)
3226
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2FinishDlpJobRequest::Representation
3227
+ command.request_object = google_privacy_dlp_v2_finish_dlp_job_request_object
3228
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3229
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3230
+ command.params['name'] = name unless name.nil?
3231
+ command.query['fields'] = fields unless fields.nil?
3232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3233
+ execute_or_queue_command(command, &block)
3234
+ end
3235
+
3236
+ # Gets the latest state of a long-running DlpJob. See https://cloud.google.com/
3237
+ # dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-
3238
+ # analysis to learn more.
3239
+ # @param [String] name
3240
+ # Required. The name of the DlpJob resource.
3241
+ # @param [String] fields
3242
+ # Selector specifying which fields to include in a partial response.
3243
+ # @param [String] quota_user
3244
+ # Available to use for quota purposes for server-side applications. Can be any
3245
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3246
+ # @param [Google::Apis::RequestOptions] options
3247
+ # Request-specific options
3248
+ #
3249
+ # @yield [result, err] Result & error if block supplied
3250
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
3251
+ # @yieldparam err [StandardError] error object if request failed
3252
+ #
3253
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
3254
+ #
3255
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3256
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3257
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3258
+ def get_project_location_dlp_job(name, fields: nil, quota_user: nil, options: nil, &block)
3259
+ command = make_simple_command(:get, 'v2/{+name}', options)
3260
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
3261
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
3262
+ command.params['name'] = name unless name.nil?
3263
+ command.query['fields'] = fields unless fields.nil?
3264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3265
+ execute_or_queue_command(command, &block)
3266
+ end
3267
+
3268
+ # Inspect hybrid content and store findings to a job. To review the findings,
3269
+ # inspect the job. Inspection will occur asynchronously.
3270
+ # @param [String] name
3271
+ # Required. Resource name of the job to execute a hybrid inspect on, for example
3272
+ # `projects/dlp-test-project/dlpJob/53234423`.
3273
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectDlpJobRequest] google_privacy_dlp_v2_hybrid_inspect_dlp_job_request_object
3274
+ # @param [String] fields
3275
+ # Selector specifying which fields to include in a partial response.
3276
+ # @param [String] quota_user
3277
+ # Available to use for quota purposes for server-side applications. Can be any
3278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3279
+ # @param [Google::Apis::RequestOptions] options
3280
+ # Request-specific options
3281
+ #
3282
+ # @yield [result, err] Result & error if block supplied
3283
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse] parsed result object
3284
+ # @yieldparam err [StandardError] error object if request failed
3285
+ #
3286
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse]
3287
+ #
3288
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3289
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3290
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3291
+ def hybrid_project_location_dlp_job_inspect(name, google_privacy_dlp_v2_hybrid_inspect_dlp_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3292
+ command = make_simple_command(:post, 'v2/{+name}:hybridInspect', options)
3293
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectDlpJobRequest::Representation
3294
+ command.request_object = google_privacy_dlp_v2_hybrid_inspect_dlp_job_request_object
3295
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse::Representation
3296
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse
3297
+ command.params['name'] = name unless name.nil?
3298
+ command.query['fields'] = fields unless fields.nil?
3299
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3300
+ execute_or_queue_command(command, &block)
3301
+ end
3302
+
3303
+ # Lists DlpJobs that match the specified filter in the request. See https://
3304
+ # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/
3305
+ # docs/compute-risk-analysis to learn more.
3306
+ # @param [String] parent
3307
+ # Required. Parent resource name. The format of this value varies depending on
3308
+ # whether you have [specified a processing location](https://cloud.google.com/
3309
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
3310
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
3311
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
3312
+ # string specifies a parent project with the identifier `example-project`, and
3313
+ # specifies the `europe-west3` location for processing data: parent=projects/
3314
+ # example-project/locations/europe-west3
3315
+ # @param [String] filter
3316
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
3317
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
3318
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
3319
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
3320
+ # inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `
3321
+ # inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The
3322
+ # resource name of the trigger that created job. - 'end_time` - Corresponds to
3323
+ # time the job finished. - 'start_time` - Corresponds to time the job finished. *
3324
+ # Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|
3325
+ # FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - '
3326
+ # start_time` - Corresponds to time the job finished. * The operator must be `=`
3327
+ # or `!=`. Examples: * inspected_storage = cloud_storage AND state = done *
3328
+ # inspected_storage = cloud_storage OR inspected_storage = bigquery *
3329
+ # inspected_storage = cloud_storage AND (state = done OR state = canceled) *
3330
+ # end_time > \"2017-12-12T00:00:00+00:00\" The length of this field should be no
3331
+ # more than 500 characters.
3332
+ # @param [String] location_id
3333
+ # Deprecated. This field has no effect.
3334
+ # @param [String] order_by
3335
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
3336
+ # postfix. This list is case-insensitive, default sorting order is ascending,
3337
+ # redundant space characters are insignificant. Example: `name asc, end_time asc,
3338
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
3339
+ # the job was created. - `end_time`: corresponds to time the job ended. - `name`:
3340
+ # corresponds to job's name. - `state`: corresponds to `state`
3341
+ # @param [Fixnum] page_size
3342
+ # The standard list page size.
3343
+ # @param [String] page_token
3344
+ # The standard list page token.
3345
+ # @param [String] type
3346
+ # The type of job. Defaults to `DlpJobType.INSPECT`
3347
+ # @param [String] fields
3348
+ # Selector specifying which fields to include in a partial response.
3349
+ # @param [String] quota_user
3350
+ # Available to use for quota purposes for server-side applications. Can be any
3351
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3352
+ # @param [Google::Apis::RequestOptions] options
3353
+ # Request-specific options
3354
+ #
3355
+ # @yield [result, err] Result & error if block supplied
3356
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] parsed result object
3357
+ # @yieldparam err [StandardError] error object if request failed
3358
+ #
3359
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse]
3360
+ #
3361
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3362
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3363
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3364
+ def list_project_location_dlp_jobs(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
3365
+ command = make_simple_command(:get, 'v2/{+parent}/dlpJobs', options)
3366
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation
3367
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse
3368
+ command.params['parent'] = parent unless parent.nil?
3369
+ command.query['filter'] = filter unless filter.nil?
3370
+ command.query['locationId'] = location_id unless location_id.nil?
3371
+ command.query['orderBy'] = order_by unless order_by.nil?
3372
+ command.query['pageSize'] = page_size unless page_size.nil?
3373
+ command.query['pageToken'] = page_token unless page_token.nil?
3374
+ command.query['type'] = type unless type.nil?
3375
+ command.query['fields'] = fields unless fields.nil?
3376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3377
+ execute_or_queue_command(command, &block)
3378
+ end
3379
+
3380
+ # Redacts potentially sensitive info from an image. This method has limits on
3381
+ # input size, processing time, and output size. See https://cloud.google.com/dlp/
3382
+ # docs/redacting-sensitive-data-images to learn more. When no InfoTypes or
3383
+ # CustomInfoTypes are specified in this request, the system will automatically
3384
+ # choose what detectors to run. By default this may be all types, but may change
3385
+ # over time as detectors are updated.
3386
+ # @param [String] parent
3387
+ # Parent resource name. The format of this value varies depending on whether you
3388
+ # have [specified a processing location](https://cloud.google.com/dlp/docs/
3389
+ # specifying-location): + Projects scope, location specified: `projects/`
3390
+ # PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
3391
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
3392
+ # string specifies a parent project with the identifier `example-project`, and
3393
+ # specifies the `europe-west3` location for processing data: parent=projects/
3394
+ # example-project/locations/europe-west3
3395
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest] google_privacy_dlp_v2_redact_image_request_object
3396
+ # @param [String] fields
3397
+ # Selector specifying which fields to include in a partial response.
3398
+ # @param [String] quota_user
3399
+ # Available to use for quota purposes for server-side applications. Can be any
3400
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3401
+ # @param [Google::Apis::RequestOptions] options
3402
+ # Request-specific options
3403
+ #
3404
+ # @yield [result, err] Result & error if block supplied
3405
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse] parsed result object
3406
+ # @yieldparam err [StandardError] error object if request failed
3407
+ #
3408
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse]
3409
+ #
3410
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3411
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3412
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3413
+ def redact_project_location_image(parent, google_privacy_dlp_v2_redact_image_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3414
+ command = make_simple_command(:post, 'v2/{+parent}/image:redact', options)
3415
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageRequest::Representation
3416
+ command.request_object = google_privacy_dlp_v2_redact_image_request_object
3417
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse::Representation
3418
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2RedactImageResponse
3419
+ command.params['parent'] = parent unless parent.nil?
3420
+ command.query['fields'] = fields unless fields.nil?
3421
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3422
+ execute_or_queue_command(command, &block)
3423
+ end
3424
+
3425
+ # Creates an InspectTemplate for re-using frequently used configuration for
3426
+ # inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/
3427
+ # creating-templates to learn more.
3428
+ # @param [String] parent
3429
+ # Required. Parent resource name. The format of this value varies depending on
3430
+ # the scope of the request (project or organization) and whether you have [
3431
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
3432
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
3433
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
3434
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
3435
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
3436
+ # location specified (defaults to global): `organizations/`ORG_ID The following
3437
+ # example `parent` string specifies a parent project with the identifier `
3438
+ # example-project`, and specifies the `europe-west3` location for processing
3439
+ # data: parent=projects/example-project/locations/europe-west3
3440
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest] google_privacy_dlp_v2_create_inspect_template_request_object
3441
+ # @param [String] fields
3442
+ # Selector specifying which fields to include in a partial response.
3443
+ # @param [String] quota_user
3444
+ # Available to use for quota purposes for server-side applications. Can be any
3445
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3446
+ # @param [Google::Apis::RequestOptions] options
3447
+ # Request-specific options
3448
+ #
3449
+ # @yield [result, err] Result & error if block supplied
3450
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
3451
+ # @yieldparam err [StandardError] error object if request failed
3452
+ #
3453
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
3454
+ #
3455
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3456
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3457
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3458
+ def create_project_location_inspect_template(parent, google_privacy_dlp_v2_create_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3459
+ command = make_simple_command(:post, 'v2/{+parent}/inspectTemplates', options)
3460
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateInspectTemplateRequest::Representation
3461
+ command.request_object = google_privacy_dlp_v2_create_inspect_template_request_object
3462
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
3463
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
3464
+ command.params['parent'] = parent unless parent.nil?
3465
+ command.query['fields'] = fields unless fields.nil?
3466
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3467
+ execute_or_queue_command(command, &block)
3468
+ end
3469
+
3470
+ # Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
3471
+ # templates to learn more.
3472
+ # @param [String] name
3473
+ # Required. Resource name of the organization and inspectTemplate to be deleted,
3474
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
3475
+ # project-id/inspectTemplates/432452342.
3476
+ # @param [String] fields
3477
+ # Selector specifying which fields to include in a partial response.
3478
+ # @param [String] quota_user
3479
+ # Available to use for quota purposes for server-side applications. Can be any
3480
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3481
+ # @param [Google::Apis::RequestOptions] options
3482
+ # Request-specific options
3483
+ #
3484
+ # @yield [result, err] Result & error if block supplied
3485
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3486
+ # @yieldparam err [StandardError] error object if request failed
3487
+ #
3488
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3489
+ #
3490
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3491
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3492
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3493
+ def delete_project_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
3494
+ command = make_simple_command(:delete, 'v2/{+name}', options)
3495
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3496
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3497
+ command.params['name'] = name unless name.nil?
3498
+ command.query['fields'] = fields unless fields.nil?
3499
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3500
+ execute_or_queue_command(command, &block)
3501
+ end
3502
+
3503
+ # Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
3504
+ # templates to learn more.
3505
+ # @param [String] name
3506
+ # Required. Resource name of the organization and inspectTemplate to be read,
3507
+ # for example `organizations/433245324/inspectTemplates/432452342` or projects/
3508
+ # project-id/inspectTemplates/432452342.
3509
+ # @param [String] fields
3510
+ # Selector specifying which fields to include in a partial response.
3511
+ # @param [String] quota_user
3512
+ # Available to use for quota purposes for server-side applications. Can be any
3513
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3514
+ # @param [Google::Apis::RequestOptions] options
3515
+ # Request-specific options
3516
+ #
3517
+ # @yield [result, err] Result & error if block supplied
3518
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
3519
+ # @yieldparam err [StandardError] error object if request failed
3520
+ #
3521
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
3522
+ #
3523
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3524
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3525
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3526
+ def get_project_location_inspect_template(name, fields: nil, quota_user: nil, options: nil, &block)
3527
+ command = make_simple_command(:get, 'v2/{+name}', options)
3528
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
3529
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
3530
+ command.params['name'] = name unless name.nil?
3531
+ command.query['fields'] = fields unless fields.nil?
3532
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3533
+ execute_or_queue_command(command, &block)
3534
+ end
3535
+
3536
+ # Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-
3537
+ # templates to learn more.
3538
+ # @param [String] parent
3539
+ # Required. Parent resource name. The format of this value varies depending on
3540
+ # the scope of the request (project or organization) and whether you have [
3541
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
3542
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
3543
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
3544
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
3545
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
3546
+ # location specified (defaults to global): `organizations/`ORG_ID The following
3547
+ # example `parent` string specifies a parent project with the identifier `
3548
+ # example-project`, and specifies the `europe-west3` location for processing
3549
+ # data: parent=projects/example-project/locations/europe-west3
3550
+ # @param [String] location_id
3551
+ # Deprecated. This field has no effect.
3552
+ # @param [String] order_by
3553
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
3554
+ # postfix. This list is case-insensitive, default sorting order is ascending,
3555
+ # redundant space characters are insignificant. Example: `name asc,update_time,
3556
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
3557
+ # the template was created. - `update_time`: corresponds to time the template
3558
+ # was last updated. - `name`: corresponds to template's name. - `display_name`:
3559
+ # corresponds to template's display name.
3560
+ # @param [Fixnum] page_size
3561
+ # Size of the page, can be limited by server. If zero server returns a page of
3562
+ # max size 100.
3563
+ # @param [String] page_token
3564
+ # Page token to continue retrieval. Comes from previous call to `
3565
+ # ListInspectTemplates`.
3566
+ # @param [String] fields
3567
+ # Selector specifying which fields to include in a partial response.
3568
+ # @param [String] quota_user
3569
+ # Available to use for quota purposes for server-side applications. Can be any
3570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3571
+ # @param [Google::Apis::RequestOptions] options
3572
+ # Request-specific options
3573
+ #
3574
+ # @yield [result, err] Result & error if block supplied
3575
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse] parsed result object
3576
+ # @yieldparam err [StandardError] error object if request failed
3577
+ #
3578
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse]
3579
+ #
3580
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3581
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3582
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3583
+ def list_project_location_inspect_templates(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3584
+ command = make_simple_command(:get, 'v2/{+parent}/inspectTemplates', options)
3585
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse::Representation
3586
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListInspectTemplatesResponse
3587
+ command.params['parent'] = parent unless parent.nil?
3588
+ command.query['locationId'] = location_id unless location_id.nil?
3589
+ command.query['orderBy'] = order_by unless order_by.nil?
3590
+ command.query['pageSize'] = page_size unless page_size.nil?
3591
+ command.query['pageToken'] = page_token unless page_token.nil?
3592
+ command.query['fields'] = fields unless fields.nil?
3593
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3594
+ execute_or_queue_command(command, &block)
3595
+ end
3596
+
3597
+ # Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-
3598
+ # templates to learn more.
3599
+ # @param [String] name
3600
+ # Required. Resource name of organization and inspectTemplate to be updated, for
3601
+ # example `organizations/433245324/inspectTemplates/432452342` or projects/
3602
+ # project-id/inspectTemplates/432452342.
3603
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest] google_privacy_dlp_v2_update_inspect_template_request_object
3604
+ # @param [String] fields
3605
+ # Selector specifying which fields to include in a partial response.
3606
+ # @param [String] quota_user
3607
+ # Available to use for quota purposes for server-side applications. Can be any
3608
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3609
+ # @param [Google::Apis::RequestOptions] options
3610
+ # Request-specific options
3611
+ #
3612
+ # @yield [result, err] Result & error if block supplied
3613
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate] parsed result object
3614
+ # @yieldparam err [StandardError] error object if request failed
3615
+ #
3616
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate]
3617
+ #
3618
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3619
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3620
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3621
+ def patch_project_location_inspect_template(name, google_privacy_dlp_v2_update_inspect_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3622
+ command = make_simple_command(:patch, 'v2/{+name}', options)
3623
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateInspectTemplateRequest::Representation
3624
+ command.request_object = google_privacy_dlp_v2_update_inspect_template_request_object
3625
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate::Representation
3626
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate
3627
+ command.params['name'] = name unless name.nil?
3628
+ command.query['fields'] = fields unless fields.nil?
3629
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3630
+ execute_or_queue_command(command, &block)
3631
+ end
3632
+
3633
+ # Activate a job trigger. Causes the immediate execute of a trigger instead of
3634
+ # waiting on the trigger event to occur.
3635
+ # @param [String] name
3636
+ # Required. Resource name of the trigger to activate, for example `projects/dlp-
3637
+ # test-project/jobTriggers/53234423`.
3638
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest] google_privacy_dlp_v2_activate_job_trigger_request_object
3639
+ # @param [String] fields
3640
+ # Selector specifying which fields to include in a partial response.
3641
+ # @param [String] quota_user
3642
+ # Available to use for quota purposes for server-side applications. Can be any
3643
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3644
+ # @param [Google::Apis::RequestOptions] options
3645
+ # Request-specific options
3646
+ #
3647
+ # @yield [result, err] Result & error if block supplied
3648
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob] parsed result object
3649
+ # @yieldparam err [StandardError] error object if request failed
3650
+ #
3651
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob]
3652
+ #
3653
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3654
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3655
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3656
+ def activate_project_location_job_trigger(name, google_privacy_dlp_v2_activate_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3657
+ command = make_simple_command(:post, 'v2/{+name}:activate', options)
3658
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ActivateJobTriggerRequest::Representation
3659
+ command.request_object = google_privacy_dlp_v2_activate_job_trigger_request_object
3660
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob::Representation
3661
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2DlpJob
3662
+ command.params['name'] = name unless name.nil?
3663
+ command.query['fields'] = fields unless fields.nil?
3664
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3665
+ execute_or_queue_command(command, &block)
3666
+ end
3667
+
3668
+ # Creates a job trigger to run DLP actions such as scanning storage for
3669
+ # sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/
3670
+ # creating-job-triggers to learn more.
3671
+ # @param [String] parent
3672
+ # Required. Parent resource name. The format of this value varies depending on
3673
+ # whether you have [specified a processing location](https://cloud.google.com/
3674
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
3675
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
3676
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
3677
+ # string specifies a parent project with the identifier `example-project`, and
3678
+ # specifies the `europe-west3` location for processing data: parent=projects/
3679
+ # example-project/locations/europe-west3
3680
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest] google_privacy_dlp_v2_create_job_trigger_request_object
3681
+ # @param [String] fields
3682
+ # Selector specifying which fields to include in a partial response.
3683
+ # @param [String] quota_user
3684
+ # Available to use for quota purposes for server-side applications. Can be any
3685
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3686
+ # @param [Google::Apis::RequestOptions] options
3687
+ # Request-specific options
3688
+ #
3689
+ # @yield [result, err] Result & error if block supplied
3690
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
3691
+ # @yieldparam err [StandardError] error object if request failed
3692
+ #
3693
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
3694
+ #
3695
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3696
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3697
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3698
+ def create_project_location_job_trigger(parent, google_privacy_dlp_v2_create_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3699
+ command = make_simple_command(:post, 'v2/{+parent}/jobTriggers', options)
3700
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest::Representation
3701
+ command.request_object = google_privacy_dlp_v2_create_job_trigger_request_object
3702
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
3703
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
3704
+ command.params['parent'] = parent unless parent.nil?
3705
+ command.query['fields'] = fields unless fields.nil?
3706
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3707
+ execute_or_queue_command(command, &block)
3708
+ end
3709
+
3710
+ # Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
3711
+ # triggers to learn more.
3712
+ # @param [String] name
3713
+ # Required. Resource name of the project and the triggeredJob, for example `
3714
+ # projects/dlp-test-project/jobTriggers/53234423`.
3715
+ # @param [String] fields
3716
+ # Selector specifying which fields to include in a partial response.
3717
+ # @param [String] quota_user
3718
+ # Available to use for quota purposes for server-side applications. Can be any
3719
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3720
+ # @param [Google::Apis::RequestOptions] options
3721
+ # Request-specific options
3722
+ #
3723
+ # @yield [result, err] Result & error if block supplied
3724
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3725
+ # @yieldparam err [StandardError] error object if request failed
3726
+ #
3727
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3728
+ #
3729
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3730
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3731
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3732
+ def delete_project_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
3733
+ command = make_simple_command(:delete, 'v2/{+name}', options)
3734
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3735
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3736
+ command.params['name'] = name unless name.nil?
3737
+ command.query['fields'] = fields unless fields.nil?
3738
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3739
+ execute_or_queue_command(command, &block)
3740
+ end
3741
+
3742
+ # Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
3743
+ # triggers to learn more.
3744
+ # @param [String] name
3745
+ # Required. Resource name of the project and the triggeredJob, for example `
3746
+ # projects/dlp-test-project/jobTriggers/53234423`.
3747
+ # @param [String] fields
3748
+ # Selector specifying which fields to include in a partial response.
3749
+ # @param [String] quota_user
3750
+ # Available to use for quota purposes for server-side applications. Can be any
3751
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3752
+ # @param [Google::Apis::RequestOptions] options
3753
+ # Request-specific options
3754
+ #
3755
+ # @yield [result, err] Result & error if block supplied
3756
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
3757
+ # @yieldparam err [StandardError] error object if request failed
3758
+ #
3759
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
3760
+ #
3761
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3762
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3763
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3764
+ def get_project_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block)
3765
+ command = make_simple_command(:get, 'v2/{+name}', options)
3766
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
3767
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
3768
+ command.params['name'] = name unless name.nil?
3769
+ command.query['fields'] = fields unless fields.nil?
3770
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3771
+ execute_or_queue_command(command, &block)
3772
+ end
3773
+
3774
+ # Inspect hybrid content and store findings to a trigger. The inspection will be
3775
+ # processed asynchronously. To review the findings monitor the jobs within the
3776
+ # trigger.
3777
+ # @param [String] name
3778
+ # Required. Resource name of the trigger to execute a hybrid inspect on, for
3779
+ # example `projects/dlp-test-project/jobTriggers/53234423`.
3780
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectJobTriggerRequest] google_privacy_dlp_v2_hybrid_inspect_job_trigger_request_object
3781
+ # @param [String] fields
3782
+ # Selector specifying which fields to include in a partial response.
3783
+ # @param [String] quota_user
3784
+ # Available to use for quota purposes for server-side applications. Can be any
3785
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3786
+ # @param [Google::Apis::RequestOptions] options
3787
+ # Request-specific options
3788
+ #
3789
+ # @yield [result, err] Result & error if block supplied
3790
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse] parsed result object
3791
+ # @yieldparam err [StandardError] error object if request failed
3792
+ #
3793
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse]
3794
+ #
3795
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3796
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3797
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3798
+ def hybrid_project_location_job_trigger_inspect(name, google_privacy_dlp_v2_hybrid_inspect_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3799
+ command = make_simple_command(:post, 'v2/{+name}:hybridInspect', options)
3800
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectJobTriggerRequest::Representation
3801
+ command.request_object = google_privacy_dlp_v2_hybrid_inspect_job_trigger_request_object
3802
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse::Representation
3803
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2HybridInspectResponse
3804
+ command.params['name'] = name unless name.nil?
3805
+ command.query['fields'] = fields unless fields.nil?
3806
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3807
+ execute_or_queue_command(command, &block)
3808
+ end
3809
+
3810
+ # Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-
3811
+ # triggers to learn more.
3812
+ # @param [String] parent
3813
+ # Required. Parent resource name. The format of this value varies depending on
3814
+ # whether you have [specified a processing location](https://cloud.google.com/
3815
+ # dlp/docs/specifying-location): + Projects scope, location specified: `projects/
3816
+ # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (
3817
+ # defaults to global): `projects/`PROJECT_ID The following example `parent`
3818
+ # string specifies a parent project with the identifier `example-project`, and
3819
+ # specifies the `europe-west3` location for processing data: parent=projects/
3820
+ # example-project/locations/europe-west3
3821
+ # @param [String] filter
3822
+ # Allows filtering. Supported syntax: * Filter expressions are made up of one or
3823
+ # more restrictions. * Restrictions can be combined by `AND` or `OR` logical
3824
+ # operators. A sequence of restrictions implicitly uses `AND`. * A restriction
3825
+ # has the form of ``field` `operator` `value``. * Supported fields/values for
3826
+ # inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` -
3827
+ # DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted
3828
+ # timestamp, surrounded by quotation marks. Nanoseconds are ignored. - '
3829
+ # error_count' - Number of errors that have occurred while running. * The
3830
+ # operator must be `=` or `!=` for status and inspected_storage. Examples: *
3831
+ # inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage =
3832
+ # cloud_storage OR inspected_storage = bigquery * inspected_storage =
3833
+ # cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time > \"2017-
3834
+ # 12-12T00:00:00+00:00\" The length of this field should be no more than 500
3835
+ # characters.
3836
+ # @param [String] location_id
3837
+ # Deprecated. This field has no effect.
3838
+ # @param [String] order_by
3839
+ # Comma separated list of triggeredJob fields to order by, followed by `asc` or `
3840
+ # desc` postfix. This list is case-insensitive, default sorting order is
3841
+ # ascending, redundant space characters are insignificant. Example: `name asc,
3842
+ # update_time, create_time desc` Supported fields are: - `create_time`:
3843
+ # corresponds to time the JobTrigger was created. - `update_time`: corresponds
3844
+ # to time the JobTrigger was last updated. - `last_run_time`: corresponds to the
3845
+ # last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `
3846
+ # display_name`: corresponds to JobTrigger's display name. - `status`:
3847
+ # corresponds to JobTrigger's status.
3848
+ # @param [Fixnum] page_size
3849
+ # Size of the page, can be limited by a server.
3850
+ # @param [String] page_token
3851
+ # Page token to continue retrieval. Comes from previous call to ListJobTriggers.
3852
+ # `order_by` field must not change for subsequent calls.
3853
+ # @param [String] fields
3854
+ # Selector specifying which fields to include in a partial response.
3855
+ # @param [String] quota_user
3856
+ # Available to use for quota purposes for server-side applications. Can be any
3857
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3858
+ # @param [Google::Apis::RequestOptions] options
3859
+ # Request-specific options
3860
+ #
3861
+ # @yield [result, err] Result & error if block supplied
3862
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] parsed result object
3863
+ # @yieldparam err [StandardError] error object if request failed
3864
+ #
3865
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse]
3866
+ #
3867
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3868
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3869
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3870
+ def list_project_location_job_triggers(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3871
+ command = make_simple_command(:get, 'v2/{+parent}/jobTriggers', options)
3872
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation
3873
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse
3874
+ command.params['parent'] = parent unless parent.nil?
3875
+ command.query['filter'] = filter unless filter.nil?
3876
+ command.query['locationId'] = location_id unless location_id.nil?
3877
+ command.query['orderBy'] = order_by unless order_by.nil?
3878
+ command.query['pageSize'] = page_size unless page_size.nil?
3879
+ command.query['pageToken'] = page_token unless page_token.nil?
3880
+ command.query['fields'] = fields unless fields.nil?
3881
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3882
+ execute_or_queue_command(command, &block)
3883
+ end
3884
+
3885
+ # Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-
3886
+ # triggers to learn more.
3887
+ # @param [String] name
3888
+ # Required. Resource name of the project and the triggeredJob, for example `
3889
+ # projects/dlp-test-project/jobTriggers/53234423`.
3890
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest] google_privacy_dlp_v2_update_job_trigger_request_object
3891
+ # @param [String] fields
3892
+ # Selector specifying which fields to include in a partial response.
3893
+ # @param [String] quota_user
3894
+ # Available to use for quota purposes for server-side applications. Can be any
3895
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3896
+ # @param [Google::Apis::RequestOptions] options
3897
+ # Request-specific options
3898
+ #
3899
+ # @yield [result, err] Result & error if block supplied
3900
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object
3901
+ # @yieldparam err [StandardError] error object if request failed
3902
+ #
3903
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger]
3904
+ #
3905
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3906
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3907
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3908
+ def patch_project_location_job_trigger(name, google_privacy_dlp_v2_update_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3909
+ command = make_simple_command(:patch, 'v2/{+name}', options)
3910
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest::Representation
3911
+ command.request_object = google_privacy_dlp_v2_update_job_trigger_request_object
3912
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation
3913
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger
3914
+ command.params['name'] = name unless name.nil?
3915
+ command.query['fields'] = fields unless fields.nil?
3916
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3917
+ execute_or_queue_command(command, &block)
3918
+ end
3919
+
3920
+ # Creates a pre-built stored infoType to be used for inspection. See https://
3921
+ # cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
3922
+ # @param [String] parent
3923
+ # Required. Parent resource name. The format of this value varies depending on
3924
+ # the scope of the request (project or organization) and whether you have [
3925
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
3926
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
3927
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
3928
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
3929
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
3930
+ # location specified (defaults to global): `organizations/`ORG_ID The following
3931
+ # example `parent` string specifies a parent project with the identifier `
3932
+ # example-project`, and specifies the `europe-west3` location for processing
3933
+ # data: parent=projects/example-project/locations/europe-west3
3934
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_request_object
3935
+ # @param [String] fields
3936
+ # Selector specifying which fields to include in a partial response.
3937
+ # @param [String] quota_user
3938
+ # Available to use for quota purposes for server-side applications. Can be any
3939
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3940
+ # @param [Google::Apis::RequestOptions] options
3941
+ # Request-specific options
3942
+ #
3943
+ # @yield [result, err] Result & error if block supplied
3944
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
3945
+ # @yieldparam err [StandardError] error object if request failed
3946
+ #
3947
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
3948
+ #
3949
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3950
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3951
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3952
+ def create_project_location_stored_info_type(parent, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3953
+ command = make_simple_command(:post, 'v2/{+parent}/storedInfoTypes', options)
3954
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation
3955
+ command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object
3956
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
3957
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
3958
+ command.params['parent'] = parent unless parent.nil?
3959
+ command.query['fields'] = fields unless fields.nil?
3960
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3961
+ execute_or_queue_command(command, &block)
3962
+ end
3963
+
3964
+ # Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-
3965
+ # stored-infotypes to learn more.
3966
+ # @param [String] name
3967
+ # Required. Resource name of the organization and storedInfoType to be deleted,
3968
+ # for example `organizations/433245324/storedInfoTypes/432452342` or projects/
3969
+ # project-id/storedInfoTypes/432452342.
3970
+ # @param [String] fields
3971
+ # Selector specifying which fields to include in a partial response.
3972
+ # @param [String] quota_user
3973
+ # Available to use for quota purposes for server-side applications. Can be any
3974
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3975
+ # @param [Google::Apis::RequestOptions] options
3976
+ # Request-specific options
3977
+ #
3978
+ # @yield [result, err] Result & error if block supplied
3979
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
3980
+ # @yieldparam err [StandardError] error object if request failed
3981
+ #
3982
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
3983
+ #
3984
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3985
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3986
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3987
+ def delete_project_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
3988
+ command = make_simple_command(:delete, 'v2/{+name}', options)
3989
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
3990
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
3991
+ command.params['name'] = name unless name.nil?
3992
+ command.query['fields'] = fields unless fields.nil?
3993
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3994
+ execute_or_queue_command(command, &block)
3995
+ end
3996
+
3997
+ # Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-
3998
+ # infotypes to learn more.
3999
+ # @param [String] name
4000
+ # Required. Resource name of the organization and storedInfoType to be read, for
4001
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
4002
+ # project-id/storedInfoTypes/432452342.
4003
+ # @param [String] fields
4004
+ # Selector specifying which fields to include in a partial response.
4005
+ # @param [String] quota_user
4006
+ # Available to use for quota purposes for server-side applications. Can be any
4007
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4008
+ # @param [Google::Apis::RequestOptions] options
4009
+ # Request-specific options
4010
+ #
4011
+ # @yield [result, err] Result & error if block supplied
4012
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
4013
+ # @yieldparam err [StandardError] error object if request failed
4014
+ #
4015
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
4016
+ #
4017
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4018
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4019
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4020
+ def get_project_location_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
4021
+ command = make_simple_command(:get, 'v2/{+name}', options)
4022
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
4023
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
4024
+ command.params['name'] = name unless name.nil?
4025
+ command.query['fields'] = fields unless fields.nil?
4026
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4027
+ execute_or_queue_command(command, &block)
4028
+ end
4029
+
4030
+ # Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-
4031
+ # infotypes to learn more.
4032
+ # @param [String] parent
4033
+ # Required. Parent resource name. The format of this value varies depending on
4034
+ # the scope of the request (project or organization) and whether you have [
4035
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
4036
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
4037
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
4038
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
4039
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
4040
+ # location specified (defaults to global): `organizations/`ORG_ID The following
4041
+ # example `parent` string specifies a parent project with the identifier `
4042
+ # example-project`, and specifies the `europe-west3` location for processing
4043
+ # data: parent=projects/example-project/locations/europe-west3
4044
+ # @param [String] location_id
4045
+ # Deprecated. This field has no effect.
4046
+ # @param [String] order_by
4047
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
4048
+ # postfix. This list is case-insensitive, default sorting order is ascending,
4049
+ # redundant space characters are insignificant. Example: `name asc, display_name,
4050
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
4051
+ # the most recent version of the resource was created. - `state`: corresponds to
4052
+ # the state of the resource. - `name`: corresponds to resource name. - `
4053
+ # display_name`: corresponds to info type's display name.
4054
+ # @param [Fixnum] page_size
4055
+ # Size of the page, can be limited by server. If zero server returns a page of
4056
+ # max size 100.
4057
+ # @param [String] page_token
4058
+ # Page token to continue retrieval. Comes from previous call to `
4059
+ # ListStoredInfoTypes`.
4060
+ # @param [String] fields
4061
+ # Selector specifying which fields to include in a partial response.
4062
+ # @param [String] quota_user
4063
+ # Available to use for quota purposes for server-side applications. Can be any
4064
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4065
+ # @param [Google::Apis::RequestOptions] options
4066
+ # Request-specific options
4067
+ #
4068
+ # @yield [result, err] Result & error if block supplied
4069
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object
4070
+ # @yieldparam err [StandardError] error object if request failed
4071
+ #
4072
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse]
4073
+ #
4074
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4075
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4076
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4077
+ def list_project_location_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
4078
+ command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options)
4079
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation
4080
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse
4081
+ command.params['parent'] = parent unless parent.nil?
4082
+ command.query['locationId'] = location_id unless location_id.nil?
4083
+ command.query['orderBy'] = order_by unless order_by.nil?
4084
+ command.query['pageSize'] = page_size unless page_size.nil?
4085
+ command.query['pageToken'] = page_token unless page_token.nil?
4086
+ command.query['fields'] = fields unless fields.nil?
4087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4088
+ execute_or_queue_command(command, &block)
4089
+ end
4090
+
4091
+ # Updates the stored infoType by creating a new version. The existing version
4092
+ # will continue to be used until the new version is ready. See https://cloud.
4093
+ # google.com/dlp/docs/creating-stored-infotypes to learn more.
4094
+ # @param [String] name
4095
+ # Required. Resource name of organization and storedInfoType to be updated, for
4096
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
4097
+ # project-id/storedInfoTypes/432452342.
4098
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_request_object
4099
+ # @param [String] fields
4100
+ # Selector specifying which fields to include in a partial response.
4101
+ # @param [String] quota_user
4102
+ # Available to use for quota purposes for server-side applications. Can be any
4103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4104
+ # @param [Google::Apis::RequestOptions] options
4105
+ # Request-specific options
4106
+ #
4107
+ # @yield [result, err] Result & error if block supplied
4108
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
4109
+ # @yieldparam err [StandardError] error object if request failed
4110
+ #
4111
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
4112
+ #
4113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4116
+ def patch_project_location_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4117
+ command = make_simple_command(:patch, 'v2/{+name}', options)
4118
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation
4119
+ command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object
4120
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
4121
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
4122
+ command.params['name'] = name unless name.nil?
4123
+ command.query['fields'] = fields unless fields.nil?
4124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4125
+ execute_or_queue_command(command, &block)
4126
+ end
4127
+
4128
+ # Creates a pre-built stored infoType to be used for inspection. See https://
4129
+ # cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4130
+ # @param [String] parent
4131
+ # Required. Parent resource name. The format of this value varies depending on
4132
+ # the scope of the request (project or organization) and whether you have [
4133
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
4134
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
4135
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
4136
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
4137
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
4138
+ # location specified (defaults to global): `organizations/`ORG_ID The following
4139
+ # example `parent` string specifies a parent project with the identifier `
4140
+ # example-project`, and specifies the `europe-west3` location for processing
4141
+ # data: parent=projects/example-project/locations/europe-west3
4142
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest] google_privacy_dlp_v2_create_stored_info_type_request_object
4143
+ # @param [String] fields
4144
+ # Selector specifying which fields to include in a partial response.
4145
+ # @param [String] quota_user
4146
+ # Available to use for quota purposes for server-side applications. Can be any
4147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4148
+ # @param [Google::Apis::RequestOptions] options
4149
+ # Request-specific options
4150
+ #
4151
+ # @yield [result, err] Result & error if block supplied
4152
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
4153
+ # @yieldparam err [StandardError] error object if request failed
4154
+ #
4155
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
4156
+ #
4157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4160
+ def create_project_stored_info_type(parent, google_privacy_dlp_v2_create_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4161
+ command = make_simple_command(:post, 'v2/{+parent}/storedInfoTypes', options)
4162
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateStoredInfoTypeRequest::Representation
4163
+ command.request_object = google_privacy_dlp_v2_create_stored_info_type_request_object
4164
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
4165
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
4166
+ command.params['parent'] = parent unless parent.nil?
4167
+ command.query['fields'] = fields unless fields.nil?
4168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4169
+ execute_or_queue_command(command, &block)
4170
+ end
4171
+
4172
+ # Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-
4173
+ # stored-infotypes to learn more.
4174
+ # @param [String] name
4175
+ # Required. Resource name of the organization and storedInfoType to be deleted,
4176
+ # for example `organizations/433245324/storedInfoTypes/432452342` or projects/
4177
+ # project-id/storedInfoTypes/432452342.
4178
+ # @param [String] fields
4179
+ # Selector specifying which fields to include in a partial response.
4180
+ # @param [String] quota_user
4181
+ # Available to use for quota purposes for server-side applications. Can be any
4182
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4183
+ # @param [Google::Apis::RequestOptions] options
4184
+ # Request-specific options
4185
+ #
4186
+ # @yield [result, err] Result & error if block supplied
4187
+ # @yieldparam result [Google::Apis::DlpV2::GoogleProtobufEmpty] parsed result object
4188
+ # @yieldparam err [StandardError] error object if request failed
4189
+ #
4190
+ # @return [Google::Apis::DlpV2::GoogleProtobufEmpty]
4191
+ #
4192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4195
+ def delete_project_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
4196
+ command = make_simple_command(:delete, 'v2/{+name}', options)
4197
+ command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation
4198
+ command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty
4199
+ command.params['name'] = name unless name.nil?
4200
+ command.query['fields'] = fields unless fields.nil?
4201
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4202
+ execute_or_queue_command(command, &block)
4203
+ end
4204
+
4205
+ # Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-
4206
+ # infotypes to learn more.
4207
+ # @param [String] name
4208
+ # Required. Resource name of the organization and storedInfoType to be read, for
4209
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
4210
+ # project-id/storedInfoTypes/432452342.
4211
+ # @param [String] fields
4212
+ # Selector specifying which fields to include in a partial response.
4213
+ # @param [String] quota_user
4214
+ # Available to use for quota purposes for server-side applications. Can be any
4215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4216
+ # @param [Google::Apis::RequestOptions] options
4217
+ # Request-specific options
4218
+ #
4219
+ # @yield [result, err] Result & error if block supplied
4220
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
4221
+ # @yieldparam err [StandardError] error object if request failed
4222
+ #
4223
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
4224
+ #
4225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4228
+ def get_project_stored_info_type(name, fields: nil, quota_user: nil, options: nil, &block)
4229
+ command = make_simple_command(:get, 'v2/{+name}', options)
4230
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
4231
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
4232
+ command.params['name'] = name unless name.nil?
4233
+ command.query['fields'] = fields unless fields.nil?
4234
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4235
+ execute_or_queue_command(command, &block)
4236
+ end
4237
+
4238
+ # Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-
4239
+ # infotypes to learn more.
4240
+ # @param [String] parent
4241
+ # Required. Parent resource name. The format of this value varies depending on
4242
+ # the scope of the request (project or organization) and whether you have [
4243
+ # specified a processing location](https://cloud.google.com/dlp/docs/specifying-
4244
+ # location): + Projects scope, location specified: `projects/`PROJECT_ID`/
4245
+ # locations/`LOCATION_ID + Projects scope, no location specified (defaults to
4246
+ # global): `projects/`PROJECT_ID + Organizations scope, location specified: `
4247
+ # organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no
4248
+ # location specified (defaults to global): `organizations/`ORG_ID The following
4249
+ # example `parent` string specifies a parent project with the identifier `
4250
+ # example-project`, and specifies the `europe-west3` location for processing
4251
+ # data: parent=projects/example-project/locations/europe-west3
4252
+ # @param [String] location_id
4253
+ # Deprecated. This field has no effect.
4254
+ # @param [String] order_by
4255
+ # Comma separated list of fields to order by, followed by `asc` or `desc`
4256
+ # postfix. This list is case-insensitive, default sorting order is ascending,
4257
+ # redundant space characters are insignificant. Example: `name asc, display_name,
4258
+ # create_time desc` Supported fields are: - `create_time`: corresponds to time
4259
+ # the most recent version of the resource was created. - `state`: corresponds to
4260
+ # the state of the resource. - `name`: corresponds to resource name. - `
4261
+ # display_name`: corresponds to info type's display name.
4262
+ # @param [Fixnum] page_size
4263
+ # Size of the page, can be limited by server. If zero server returns a page of
4264
+ # max size 100.
4265
+ # @param [String] page_token
4266
+ # Page token to continue retrieval. Comes from previous call to `
4267
+ # ListStoredInfoTypes`.
4268
+ # @param [String] fields
4269
+ # Selector specifying which fields to include in a partial response.
4270
+ # @param [String] quota_user
4271
+ # Available to use for quota purposes for server-side applications. Can be any
4272
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4273
+ # @param [Google::Apis::RequestOptions] options
4274
+ # Request-specific options
4275
+ #
4276
+ # @yield [result, err] Result & error if block supplied
4277
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse] parsed result object
4278
+ # @yieldparam err [StandardError] error object if request failed
4279
+ #
4280
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse]
4281
+ #
4282
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4283
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4284
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4285
+ def list_project_stored_info_types(parent, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
4286
+ command = make_simple_command(:get, 'v2/{+parent}/storedInfoTypes', options)
4287
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse::Representation
4288
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListStoredInfoTypesResponse
4289
+ command.params['parent'] = parent unless parent.nil?
4290
+ command.query['locationId'] = location_id unless location_id.nil?
4291
+ command.query['orderBy'] = order_by unless order_by.nil?
4292
+ command.query['pageSize'] = page_size unless page_size.nil?
4293
+ command.query['pageToken'] = page_token unless page_token.nil?
4294
+ command.query['fields'] = fields unless fields.nil?
4295
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4296
+ execute_or_queue_command(command, &block)
4297
+ end
4298
+
4299
+ # Updates the stored infoType by creating a new version. The existing version
4300
+ # will continue to be used until the new version is ready. See https://cloud.
4301
+ # google.com/dlp/docs/creating-stored-infotypes to learn more.
4302
+ # @param [String] name
4303
+ # Required. Resource name of organization and storedInfoType to be updated, for
4304
+ # example `organizations/433245324/storedInfoTypes/432452342` or projects/
4305
+ # project-id/storedInfoTypes/432452342.
4306
+ # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest] google_privacy_dlp_v2_update_stored_info_type_request_object
4307
+ # @param [String] fields
4308
+ # Selector specifying which fields to include in a partial response.
4309
+ # @param [String] quota_user
4310
+ # Available to use for quota purposes for server-side applications. Can be any
4311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4312
+ # @param [Google::Apis::RequestOptions] options
4313
+ # Request-specific options
4314
+ #
4315
+ # @yield [result, err] Result & error if block supplied
4316
+ # @yieldparam result [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType] parsed result object
4317
+ # @yieldparam err [StandardError] error object if request failed
4318
+ #
4319
+ # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType]
4320
+ #
4321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4324
+ def patch_project_stored_info_type(name, google_privacy_dlp_v2_update_stored_info_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4325
+ command = make_simple_command(:patch, 'v2/{+name}', options)
4326
+ command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation
4327
+ command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object
4328
+ command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation
4329
+ command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType
4330
+ command.params['name'] = name unless name.nil?
4331
+ command.query['fields'] = fields unless fields.nil?
4332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4333
+ execute_or_queue_command(command, &block)
4334
+ end
4335
+
4336
+ protected
4337
+
4338
+ def apply_command_defaults(command)
4339
+ command.query['key'] = key unless key.nil?
4340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4341
+ end
4342
+ end
4343
+ end
4344
+ end
4345
+ end