google-cloud-dlp-v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-dlp-v2.rb +21 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/lib/google/cloud/dlp/v2.rb +35 -0
- data/lib/google/cloud/dlp/v2/dlp_service.rb +57 -0
- data/lib/google/cloud/dlp/v2/dlp_service/client.rb +3448 -0
- data/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +51 -0
- data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +384 -0
- data/lib/google/cloud/dlp/v2/version.rb +28 -0
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +1201 -0
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +213 -0
- data/lib/google/privacy/dlp/v2/storage_pb.rb +247 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/privacy/dlp/v2/dlp.rb +3702 -0
- data/proto_docs/google/privacy/dlp/v2/storage.rb +795 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/date.rb +50 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/timeofday.rb +44 -0
- metadata +184 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/dlp/v2"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/common_resources.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module Google
|
13
|
+
module Cloud
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/dlp/v2/dlp_service"
|
20
|
+
require "google/cloud/dlp/v2/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dlp
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/dlp/v2"
|
29
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
30
|
+
#
|
31
|
+
module V2
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/dlp/v2/version"
|
24
|
+
|
25
|
+
require "google/cloud/dlp/v2/dlp_service/credentials"
|
26
|
+
require "google/cloud/dlp/v2/dlp_service/paths"
|
27
|
+
require "google/cloud/dlp/v2/dlp_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Dlp
|
32
|
+
module V2
|
33
|
+
##
|
34
|
+
# The Cloud Data Loss Prevention (DLP) API is a service that allows clients
|
35
|
+
# to detect the presence of Personally Identifiable Information (PII) and other
|
36
|
+
# privacy-sensitive data in user-supplied, unstructured data streams, like text
|
37
|
+
# blocks or images.
|
38
|
+
# The service also includes methods for sensitive data redaction and
|
39
|
+
# scheduling of data scans on Google Cloud Platform based data sets.
|
40
|
+
#
|
41
|
+
# To learn more about concepts and find how-to guides see
|
42
|
+
# https://cloud.google.com/dlp/docs/.
|
43
|
+
#
|
44
|
+
# To load this service and instantiate a client:
|
45
|
+
#
|
46
|
+
# require "google/cloud/dlp/v2/dlp_service"
|
47
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
48
|
+
#
|
49
|
+
module DlpService
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
helper_path = ::File.join __dir__, "dlp_service", "helpers.rb"
|
57
|
+
require "google/cloud/dlp/v2/dlp_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,3448 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/privacy/dlp/v2/dlp_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dlp
|
25
|
+
module V2
|
26
|
+
module DlpService
|
27
|
+
##
|
28
|
+
# Client for the DlpService service.
|
29
|
+
#
|
30
|
+
# The Cloud Data Loss Prevention (DLP) API is a service that allows clients
|
31
|
+
# to detect the presence of Personally Identifiable Information (PII) and other
|
32
|
+
# privacy-sensitive data in user-supplied, unstructured data streams, like text
|
33
|
+
# blocks or images.
|
34
|
+
# The service also includes methods for sensitive data redaction and
|
35
|
+
# scheduling of data scans on Google Cloud Platform based data sets.
|
36
|
+
#
|
37
|
+
# To learn more about concepts and find how-to guides see
|
38
|
+
# https://cloud.google.com/dlp/docs/.
|
39
|
+
#
|
40
|
+
class Client
|
41
|
+
include Paths
|
42
|
+
|
43
|
+
# @private
|
44
|
+
attr_reader :dlp_service_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the DlpService Client class.
|
48
|
+
#
|
49
|
+
# See {Google::Cloud::Dlp::V2::DlpService::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# ## Example
|
53
|
+
#
|
54
|
+
# To modify the configuration for all DlpService clients:
|
55
|
+
#
|
56
|
+
# Google::Cloud::Dlp::V2::DlpService::Client.configure do |config|
|
57
|
+
# config.timeout = 10_000
|
58
|
+
# end
|
59
|
+
#
|
60
|
+
# @yield [config] Configure the Client client.
|
61
|
+
# @yieldparam config [Client::Configuration]
|
62
|
+
#
|
63
|
+
# @return [Client::Configuration]
|
64
|
+
#
|
65
|
+
def self.configure
|
66
|
+
@configure ||= begin
|
67
|
+
namespace = ["Google", "Cloud", "Dlp", "V2"]
|
68
|
+
parent_config = while namespace.any?
|
69
|
+
parent_name = namespace.join "::"
|
70
|
+
parent_const = const_get parent_name
|
71
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
72
|
+
namespace.pop
|
73
|
+
end
|
74
|
+
default_config = Client::Configuration.new parent_config
|
75
|
+
|
76
|
+
default_config.rpcs.inspect_content.timeout = 300.0
|
77
|
+
default_config.rpcs.inspect_content.retry_policy = {
|
78
|
+
initial_delay: 0.1,
|
79
|
+
max_delay: 60.0,
|
80
|
+
multiplier: 1.3,
|
81
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config.rpcs.redact_image.timeout = 300.0
|
85
|
+
default_config.rpcs.redact_image.retry_policy = {
|
86
|
+
initial_delay: 0.1,
|
87
|
+
max_delay: 60.0,
|
88
|
+
multiplier: 1.3,
|
89
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
90
|
+
}
|
91
|
+
|
92
|
+
default_config.rpcs.deidentify_content.timeout = 300.0
|
93
|
+
default_config.rpcs.deidentify_content.retry_policy = {
|
94
|
+
initial_delay: 0.1,
|
95
|
+
max_delay: 60.0,
|
96
|
+
multiplier: 1.3,
|
97
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
98
|
+
}
|
99
|
+
|
100
|
+
default_config.rpcs.reidentify_content.timeout = 300.0
|
101
|
+
default_config.rpcs.reidentify_content.retry_policy = {
|
102
|
+
initial_delay: 0.1,
|
103
|
+
max_delay: 60.0,
|
104
|
+
multiplier: 1.3,
|
105
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
106
|
+
}
|
107
|
+
|
108
|
+
default_config.rpcs.list_info_types.timeout = 300.0
|
109
|
+
default_config.rpcs.list_info_types.retry_policy = {
|
110
|
+
initial_delay: 0.1,
|
111
|
+
max_delay: 60.0,
|
112
|
+
multiplier: 1.3,
|
113
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
114
|
+
}
|
115
|
+
|
116
|
+
default_config.rpcs.create_inspect_template.timeout = 300.0
|
117
|
+
|
118
|
+
default_config.rpcs.update_inspect_template.timeout = 300.0
|
119
|
+
|
120
|
+
default_config.rpcs.get_inspect_template.timeout = 300.0
|
121
|
+
default_config.rpcs.get_inspect_template.retry_policy = {
|
122
|
+
initial_delay: 0.1,
|
123
|
+
max_delay: 60.0,
|
124
|
+
multiplier: 1.3,
|
125
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
126
|
+
}
|
127
|
+
|
128
|
+
default_config.rpcs.list_inspect_templates.timeout = 300.0
|
129
|
+
default_config.rpcs.list_inspect_templates.retry_policy = {
|
130
|
+
initial_delay: 0.1,
|
131
|
+
max_delay: 60.0,
|
132
|
+
multiplier: 1.3,
|
133
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
134
|
+
}
|
135
|
+
|
136
|
+
default_config.rpcs.delete_inspect_template.timeout = 300.0
|
137
|
+
default_config.rpcs.delete_inspect_template.retry_policy = {
|
138
|
+
initial_delay: 0.1,
|
139
|
+
max_delay: 60.0,
|
140
|
+
multiplier: 1.3,
|
141
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
142
|
+
}
|
143
|
+
|
144
|
+
default_config.rpcs.create_deidentify_template.timeout = 300.0
|
145
|
+
|
146
|
+
default_config.rpcs.update_deidentify_template.timeout = 300.0
|
147
|
+
|
148
|
+
default_config.rpcs.get_deidentify_template.timeout = 300.0
|
149
|
+
default_config.rpcs.get_deidentify_template.retry_policy = {
|
150
|
+
initial_delay: 0.1,
|
151
|
+
max_delay: 60.0,
|
152
|
+
multiplier: 1.3,
|
153
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
154
|
+
}
|
155
|
+
|
156
|
+
default_config.rpcs.list_deidentify_templates.timeout = 300.0
|
157
|
+
default_config.rpcs.list_deidentify_templates.retry_policy = {
|
158
|
+
initial_delay: 0.1,
|
159
|
+
max_delay: 60.0,
|
160
|
+
multiplier: 1.3,
|
161
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
162
|
+
}
|
163
|
+
|
164
|
+
default_config.rpcs.delete_deidentify_template.timeout = 300.0
|
165
|
+
default_config.rpcs.delete_deidentify_template.retry_policy = {
|
166
|
+
initial_delay: 0.1,
|
167
|
+
max_delay: 60.0,
|
168
|
+
multiplier: 1.3,
|
169
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
170
|
+
}
|
171
|
+
|
172
|
+
default_config.rpcs.create_job_trigger.timeout = 300.0
|
173
|
+
|
174
|
+
default_config.rpcs.update_job_trigger.timeout = 300.0
|
175
|
+
|
176
|
+
default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0
|
177
|
+
default_config.rpcs.hybrid_inspect_job_trigger.retry_policy = {
|
178
|
+
initial_delay: 0.1,
|
179
|
+
max_delay: 60.0,
|
180
|
+
multiplier: 1.3,
|
181
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
182
|
+
}
|
183
|
+
|
184
|
+
default_config.rpcs.get_job_trigger.timeout = 300.0
|
185
|
+
default_config.rpcs.get_job_trigger.retry_policy = {
|
186
|
+
initial_delay: 0.1,
|
187
|
+
max_delay: 60.0,
|
188
|
+
multiplier: 1.3,
|
189
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
190
|
+
}
|
191
|
+
|
192
|
+
default_config.rpcs.list_job_triggers.timeout = 300.0
|
193
|
+
default_config.rpcs.list_job_triggers.retry_policy = {
|
194
|
+
initial_delay: 0.1,
|
195
|
+
max_delay: 60.0,
|
196
|
+
multiplier: 1.3,
|
197
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
198
|
+
}
|
199
|
+
|
200
|
+
default_config.rpcs.delete_job_trigger.timeout = 300.0
|
201
|
+
default_config.rpcs.delete_job_trigger.retry_policy = {
|
202
|
+
initial_delay: 0.1,
|
203
|
+
max_delay: 60.0,
|
204
|
+
multiplier: 1.3,
|
205
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
206
|
+
}
|
207
|
+
|
208
|
+
default_config.rpcs.activate_job_trigger.timeout = 300.0
|
209
|
+
|
210
|
+
default_config.rpcs.create_dlp_job.timeout = 300.0
|
211
|
+
|
212
|
+
default_config.rpcs.list_dlp_jobs.timeout = 300.0
|
213
|
+
default_config.rpcs.list_dlp_jobs.retry_policy = {
|
214
|
+
initial_delay: 0.1,
|
215
|
+
max_delay: 60.0,
|
216
|
+
multiplier: 1.3,
|
217
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
218
|
+
}
|
219
|
+
|
220
|
+
default_config.rpcs.get_dlp_job.timeout = 300.0
|
221
|
+
default_config.rpcs.get_dlp_job.retry_policy = {
|
222
|
+
initial_delay: 0.1,
|
223
|
+
max_delay: 60.0,
|
224
|
+
multiplier: 1.3,
|
225
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
226
|
+
}
|
227
|
+
|
228
|
+
default_config.rpcs.delete_dlp_job.timeout = 300.0
|
229
|
+
default_config.rpcs.delete_dlp_job.retry_policy = {
|
230
|
+
initial_delay: 0.1,
|
231
|
+
max_delay: 60.0,
|
232
|
+
multiplier: 1.3,
|
233
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
234
|
+
}
|
235
|
+
|
236
|
+
default_config.rpcs.cancel_dlp_job.timeout = 300.0
|
237
|
+
|
238
|
+
default_config.rpcs.create_stored_info_type.timeout = 300.0
|
239
|
+
|
240
|
+
default_config.rpcs.update_stored_info_type.timeout = 300.0
|
241
|
+
|
242
|
+
default_config.rpcs.get_stored_info_type.timeout = 300.0
|
243
|
+
default_config.rpcs.get_stored_info_type.retry_policy = {
|
244
|
+
initial_delay: 0.1,
|
245
|
+
max_delay: 60.0,
|
246
|
+
multiplier: 1.3,
|
247
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
248
|
+
}
|
249
|
+
|
250
|
+
default_config.rpcs.list_stored_info_types.timeout = 300.0
|
251
|
+
default_config.rpcs.list_stored_info_types.retry_policy = {
|
252
|
+
initial_delay: 0.1,
|
253
|
+
max_delay: 60.0,
|
254
|
+
multiplier: 1.3,
|
255
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
256
|
+
}
|
257
|
+
|
258
|
+
default_config.rpcs.delete_stored_info_type.timeout = 300.0
|
259
|
+
default_config.rpcs.delete_stored_info_type.retry_policy = {
|
260
|
+
initial_delay: 0.1,
|
261
|
+
max_delay: 60.0,
|
262
|
+
multiplier: 1.3,
|
263
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
264
|
+
}
|
265
|
+
|
266
|
+
default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0
|
267
|
+
default_config.rpcs.hybrid_inspect_dlp_job.retry_policy = {
|
268
|
+
initial_delay: 0.1,
|
269
|
+
max_delay: 60.0,
|
270
|
+
multiplier: 1.3,
|
271
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
272
|
+
}
|
273
|
+
|
274
|
+
default_config.rpcs.finish_dlp_job.timeout = 300.0
|
275
|
+
default_config.rpcs.finish_dlp_job.retry_policy = {
|
276
|
+
initial_delay: 0.1,
|
277
|
+
max_delay: 60.0,
|
278
|
+
multiplier: 1.3,
|
279
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
280
|
+
}
|
281
|
+
|
282
|
+
default_config
|
283
|
+
end
|
284
|
+
yield @configure if block_given?
|
285
|
+
@configure
|
286
|
+
end
|
287
|
+
|
288
|
+
##
|
289
|
+
# Configure the DlpService Client instance.
|
290
|
+
#
|
291
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
292
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
293
|
+
# should be made on {Client.configure}.
|
294
|
+
#
|
295
|
+
# See {Google::Cloud::Dlp::V2::DlpService::Client::Configuration}
|
296
|
+
# for a description of the configuration fields.
|
297
|
+
#
|
298
|
+
# @yield [config] Configure the Client client.
|
299
|
+
# @yieldparam config [Client::Configuration]
|
300
|
+
#
|
301
|
+
# @return [Client::Configuration]
|
302
|
+
#
|
303
|
+
def configure
|
304
|
+
yield @config if block_given?
|
305
|
+
@config
|
306
|
+
end
|
307
|
+
|
308
|
+
##
|
309
|
+
# Create a new DlpService client object.
|
310
|
+
#
|
311
|
+
# ## Examples
|
312
|
+
#
|
313
|
+
# To create a new DlpService client with the default
|
314
|
+
# configuration:
|
315
|
+
#
|
316
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
317
|
+
#
|
318
|
+
# To create a new DlpService client with a custom
|
319
|
+
# configuration:
|
320
|
+
#
|
321
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new do |config|
|
322
|
+
# config.timeout = 10_000
|
323
|
+
# end
|
324
|
+
#
|
325
|
+
# @yield [config] Configure the DlpService client.
|
326
|
+
# @yieldparam config [Client::Configuration]
|
327
|
+
#
|
328
|
+
def initialize
|
329
|
+
# These require statements are intentionally placed here to initialize
|
330
|
+
# the gRPC module only when it's required.
|
331
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
332
|
+
require "gapic/grpc"
|
333
|
+
require "google/privacy/dlp/v2/dlp_services_pb"
|
334
|
+
|
335
|
+
# Create the configuration object
|
336
|
+
@config = Configuration.new Client.configure
|
337
|
+
|
338
|
+
# Yield the configuration if needed
|
339
|
+
yield @config if block_given?
|
340
|
+
|
341
|
+
# Create credentials
|
342
|
+
credentials = @config.credentials
|
343
|
+
credentials ||= Credentials.default scope: @config.scope
|
344
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
345
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
346
|
+
end
|
347
|
+
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
348
|
+
|
349
|
+
@dlp_service_stub = Gapic::ServiceStub.new(
|
350
|
+
Google::Cloud::Dlp::V2::DlpService::Stub,
|
351
|
+
credentials: credentials,
|
352
|
+
endpoint: @config.endpoint,
|
353
|
+
channel_args: @config.channel_args,
|
354
|
+
interceptors: @config.interceptors
|
355
|
+
)
|
356
|
+
end
|
357
|
+
|
358
|
+
# Service calls
|
359
|
+
|
360
|
+
##
|
361
|
+
# Finds potentially sensitive info in content.
|
362
|
+
# This method has limits on input size, processing time, and output size.
|
363
|
+
#
|
364
|
+
# When no InfoTypes or CustomInfoTypes are specified in this request, the
|
365
|
+
# system will automatically choose what detectors to run. By default this may
|
366
|
+
# be all types, but may change over time as detectors are updated.
|
367
|
+
#
|
368
|
+
# For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
|
369
|
+
# and https://cloud.google.com/dlp/docs/inspecting-text,
|
370
|
+
#
|
371
|
+
# @overload inspect_content(request, options = nil)
|
372
|
+
# Pass arguments to `inspect_content` via a request object, either of type
|
373
|
+
# {Google::Cloud::Dlp::V2::InspectContentRequest} or an equivalent Hash.
|
374
|
+
#
|
375
|
+
# @param request [Google::Cloud::Dlp::V2::InspectContentRequest, Hash]
|
376
|
+
# A request object representing the call parameters. Required. To specify no
|
377
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
378
|
+
# @param options [Gapic::CallOptions, Hash]
|
379
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
380
|
+
#
|
381
|
+
# @overload inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil)
|
382
|
+
# Pass arguments to `inspect_content` via keyword arguments. Note that at
|
383
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
384
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
385
|
+
#
|
386
|
+
# @param parent [String]
|
387
|
+
# The parent resource name, for example projects/my-project-id.
|
388
|
+
# @param inspect_config [Google::Cloud::Dlp::V2::InspectConfig, Hash]
|
389
|
+
# Configuration for the inspector. What specified here will override
|
390
|
+
# the template referenced by the inspect_template_name argument.
|
391
|
+
# @param item [Google::Cloud::Dlp::V2::ContentItem, Hash]
|
392
|
+
# The item to inspect.
|
393
|
+
# @param inspect_template_name [String]
|
394
|
+
# Template to use. Any configuration directly specified in
|
395
|
+
# inspect_config will override those set in the template. Singular fields
|
396
|
+
# that are set in this request will replace their corresponding fields in the
|
397
|
+
# template. Repeated fields are appended. Singular sub-messages and groups
|
398
|
+
# are recursively merged.
|
399
|
+
# @param location_id [String]
|
400
|
+
# The geographic location to process content inspection. Reserved for future
|
401
|
+
# extensions.
|
402
|
+
#
|
403
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
404
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::InspectContentResponse]
|
405
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
406
|
+
#
|
407
|
+
# @return [Google::Cloud::Dlp::V2::InspectContentResponse]
|
408
|
+
#
|
409
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
410
|
+
#
|
411
|
+
def inspect_content request, options = nil
|
412
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
413
|
+
|
414
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::InspectContentRequest
|
415
|
+
|
416
|
+
# Converts hash and nil to an options object
|
417
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
418
|
+
|
419
|
+
# Customize the options with defaults
|
420
|
+
metadata = @config.rpcs.inspect_content.metadata.to_h
|
421
|
+
|
422
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
423
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
424
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
425
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
426
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
427
|
+
|
428
|
+
header_params = {
|
429
|
+
"parent" => request.parent
|
430
|
+
}
|
431
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
432
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.rpcs.inspect_content.timeout,
|
435
|
+
metadata: metadata,
|
436
|
+
retry_policy: @config.rpcs.inspect_content.retry_policy
|
437
|
+
options.apply_defaults metadata: @config.metadata,
|
438
|
+
retry_policy: @config.retry_policy
|
439
|
+
|
440
|
+
@dlp_service_stub.call_rpc :inspect_content, request, options: options do |response, operation|
|
441
|
+
yield response, operation if block_given?
|
442
|
+
return response
|
443
|
+
end
|
444
|
+
rescue GRPC::BadStatus => e
|
445
|
+
raise Google::Cloud::Error.from_error(e)
|
446
|
+
end
|
447
|
+
|
448
|
+
##
|
449
|
+
# Redacts potentially sensitive info from an image.
|
450
|
+
# This method has limits on input size, processing time, and output size.
|
451
|
+
# See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
|
452
|
+
# learn more.
|
453
|
+
#
|
454
|
+
# When no InfoTypes or CustomInfoTypes are specified in this request, the
|
455
|
+
# system will automatically choose what detectors to run. By default this may
|
456
|
+
# be all types, but may change over time as detectors are updated.
|
457
|
+
#
|
458
|
+
# @overload redact_image(request, options = nil)
|
459
|
+
# Pass arguments to `redact_image` via a request object, either of type
|
460
|
+
# {Google::Cloud::Dlp::V2::RedactImageRequest} or an equivalent Hash.
|
461
|
+
#
|
462
|
+
# @param request [Google::Cloud::Dlp::V2::RedactImageRequest, Hash]
|
463
|
+
# A request object representing the call parameters. Required. To specify no
|
464
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
465
|
+
# @param options [Gapic::CallOptions, Hash]
|
466
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
467
|
+
#
|
468
|
+
# @overload redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil)
|
469
|
+
# Pass arguments to `redact_image` via keyword arguments. Note that at
|
470
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
471
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
472
|
+
#
|
473
|
+
# @param parent [String]
|
474
|
+
# The parent resource name, for example projects/my-project-id.
|
475
|
+
# @param location_id [String]
|
476
|
+
# The geographic location to process the request. Reserved for future
|
477
|
+
# extensions.
|
478
|
+
# @param inspect_config [Google::Cloud::Dlp::V2::InspectConfig, Hash]
|
479
|
+
# Configuration for the inspector.
|
480
|
+
# @param image_redaction_configs [Array<Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, Hash>]
|
481
|
+
# The configuration for specifying what content to redact from images.
|
482
|
+
# @param include_findings [Boolean]
|
483
|
+
# Whether the response should include findings along with the redacted
|
484
|
+
# image.
|
485
|
+
# @param byte_item [Google::Cloud::Dlp::V2::ByteContentItem, Hash]
|
486
|
+
# The content must be PNG, JPEG, SVG or BMP.
|
487
|
+
#
|
488
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
489
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::RedactImageResponse]
|
490
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
491
|
+
#
|
492
|
+
# @return [Google::Cloud::Dlp::V2::RedactImageResponse]
|
493
|
+
#
|
494
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
495
|
+
#
|
496
|
+
def redact_image request, options = nil
|
497
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
498
|
+
|
499
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::RedactImageRequest
|
500
|
+
|
501
|
+
# Converts hash and nil to an options object
|
502
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
503
|
+
|
504
|
+
# Customize the options with defaults
|
505
|
+
metadata = @config.rpcs.redact_image.metadata.to_h
|
506
|
+
|
507
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
508
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
509
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
510
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
511
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
|
+
|
513
|
+
header_params = {
|
514
|
+
"parent" => request.parent
|
515
|
+
}
|
516
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
517
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
518
|
+
|
519
|
+
options.apply_defaults timeout: @config.rpcs.redact_image.timeout,
|
520
|
+
metadata: metadata,
|
521
|
+
retry_policy: @config.rpcs.redact_image.retry_policy
|
522
|
+
options.apply_defaults metadata: @config.metadata,
|
523
|
+
retry_policy: @config.retry_policy
|
524
|
+
|
525
|
+
@dlp_service_stub.call_rpc :redact_image, request, options: options do |response, operation|
|
526
|
+
yield response, operation if block_given?
|
527
|
+
return response
|
528
|
+
end
|
529
|
+
rescue GRPC::BadStatus => e
|
530
|
+
raise Google::Cloud::Error.from_error(e)
|
531
|
+
end
|
532
|
+
|
533
|
+
##
|
534
|
+
# De-identifies potentially sensitive info from a ContentItem.
|
535
|
+
# This method has limits on input size and output size.
|
536
|
+
# See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
|
537
|
+
# learn more.
|
538
|
+
#
|
539
|
+
# When no InfoTypes or CustomInfoTypes are specified in this request, the
|
540
|
+
# system will automatically choose what detectors to run. By default this may
|
541
|
+
# be all types, but may change over time as detectors are updated.
|
542
|
+
#
|
543
|
+
# @overload deidentify_content(request, options = nil)
|
544
|
+
# Pass arguments to `deidentify_content` via a request object, either of type
|
545
|
+
# {Google::Cloud::Dlp::V2::DeidentifyContentRequest} or an equivalent Hash.
|
546
|
+
#
|
547
|
+
# @param request [Google::Cloud::Dlp::V2::DeidentifyContentRequest, Hash]
|
548
|
+
# A request object representing the call parameters. Required. To specify no
|
549
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
550
|
+
# @param options [Gapic::CallOptions, Hash]
|
551
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
552
|
+
#
|
553
|
+
# @overload deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil)
|
554
|
+
# Pass arguments to `deidentify_content` via keyword arguments. Note that at
|
555
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
556
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
557
|
+
#
|
558
|
+
# @param parent [String]
|
559
|
+
# The parent resource name, for example projects/my-project-id.
|
560
|
+
# @param deidentify_config [Google::Cloud::Dlp::V2::DeidentifyConfig, Hash]
|
561
|
+
# Configuration for the de-identification of the content item.
|
562
|
+
# Items specified here will override the template referenced by the
|
563
|
+
# deidentify_template_name argument.
|
564
|
+
# @param inspect_config [Google::Cloud::Dlp::V2::InspectConfig, Hash]
|
565
|
+
# Configuration for the inspector.
|
566
|
+
# Items specified here will override the template referenced by the
|
567
|
+
# inspect_template_name argument.
|
568
|
+
# @param item [Google::Cloud::Dlp::V2::ContentItem, Hash]
|
569
|
+
# The item to de-identify. Will be treated as text.
|
570
|
+
# @param inspect_template_name [String]
|
571
|
+
# Template to use. Any configuration directly specified in
|
572
|
+
# inspect_config will override those set in the template. Singular fields
|
573
|
+
# that are set in this request will replace their corresponding fields in the
|
574
|
+
# template. Repeated fields are appended. Singular sub-messages and groups
|
575
|
+
# are recursively merged.
|
576
|
+
# @param deidentify_template_name [String]
|
577
|
+
# Template to use. Any configuration directly specified in
|
578
|
+
# deidentify_config will override those set in the template. Singular fields
|
579
|
+
# that are set in this request will replace their corresponding fields in the
|
580
|
+
# template. Repeated fields are appended. Singular sub-messages and groups
|
581
|
+
# are recursively merged.
|
582
|
+
# @param location_id [String]
|
583
|
+
# The geographic location to process de-identification. Reserved for future
|
584
|
+
# extensions.
|
585
|
+
#
|
586
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
587
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DeidentifyContentResponse]
|
588
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
589
|
+
#
|
590
|
+
# @return [Google::Cloud::Dlp::V2::DeidentifyContentResponse]
|
591
|
+
#
|
592
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
593
|
+
#
|
594
|
+
def deidentify_content request, options = nil
|
595
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
596
|
+
|
597
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeidentifyContentRequest
|
598
|
+
|
599
|
+
# Converts hash and nil to an options object
|
600
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
601
|
+
|
602
|
+
# Customize the options with defaults
|
603
|
+
metadata = @config.rpcs.deidentify_content.metadata.to_h
|
604
|
+
|
605
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
606
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
607
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
608
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
609
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
610
|
+
|
611
|
+
header_params = {
|
612
|
+
"parent" => request.parent
|
613
|
+
}
|
614
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
615
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
616
|
+
|
617
|
+
options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout,
|
618
|
+
metadata: metadata,
|
619
|
+
retry_policy: @config.rpcs.deidentify_content.retry_policy
|
620
|
+
options.apply_defaults metadata: @config.metadata,
|
621
|
+
retry_policy: @config.retry_policy
|
622
|
+
|
623
|
+
@dlp_service_stub.call_rpc :deidentify_content, request, options: options do |response, operation|
|
624
|
+
yield response, operation if block_given?
|
625
|
+
return response
|
626
|
+
end
|
627
|
+
rescue GRPC::BadStatus => e
|
628
|
+
raise Google::Cloud::Error.from_error(e)
|
629
|
+
end
|
630
|
+
|
631
|
+
##
|
632
|
+
# Re-identifies content that has been de-identified.
|
633
|
+
# See
|
634
|
+
# https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
|
635
|
+
# to learn more.
|
636
|
+
#
|
637
|
+
# @overload reidentify_content(request, options = nil)
|
638
|
+
# Pass arguments to `reidentify_content` via a request object, either of type
|
639
|
+
# {Google::Cloud::Dlp::V2::ReidentifyContentRequest} or an equivalent Hash.
|
640
|
+
#
|
641
|
+
# @param request [Google::Cloud::Dlp::V2::ReidentifyContentRequest, Hash]
|
642
|
+
# A request object representing the call parameters. Required. To specify no
|
643
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
644
|
+
# @param options [Gapic::CallOptions, Hash]
|
645
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
646
|
+
#
|
647
|
+
# @overload reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil)
|
648
|
+
# Pass arguments to `reidentify_content` via keyword arguments. Note that at
|
649
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
650
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
651
|
+
#
|
652
|
+
# @param parent [String]
|
653
|
+
# Required. The parent resource name.
|
654
|
+
# @param reidentify_config [Google::Cloud::Dlp::V2::DeidentifyConfig, Hash]
|
655
|
+
# Configuration for the re-identification of the content item.
|
656
|
+
# This field shares the same proto message type that is used for
|
657
|
+
# de-identification, however its usage here is for the reversal of the
|
658
|
+
# previous de-identification. Re-identification is performed by examining
|
659
|
+
# the transformations used to de-identify the items and executing the
|
660
|
+
# reverse. This requires that only reversible transformations
|
661
|
+
# be provided here. The reversible transformations are:
|
662
|
+
#
|
663
|
+
# - `CryptoDeterministicConfig`
|
664
|
+
# - `CryptoReplaceFfxFpeConfig`
|
665
|
+
# @param inspect_config [Google::Cloud::Dlp::V2::InspectConfig, Hash]
|
666
|
+
# Configuration for the inspector.
|
667
|
+
# @param item [Google::Cloud::Dlp::V2::ContentItem, Hash]
|
668
|
+
# The item to re-identify. Will be treated as text.
|
669
|
+
# @param inspect_template_name [String]
|
670
|
+
# Template to use. Any configuration directly specified in
|
671
|
+
# `inspect_config` will override those set in the template. Singular fields
|
672
|
+
# that are set in this request will replace their corresponding fields in the
|
673
|
+
# template. Repeated fields are appended. Singular sub-messages and groups
|
674
|
+
# are recursively merged.
|
675
|
+
# @param reidentify_template_name [String]
|
676
|
+
# Template to use. References an instance of `DeidentifyTemplate`.
|
677
|
+
# Any configuration directly specified in `reidentify_config` or
|
678
|
+
# `inspect_config` will override those set in the template. Singular fields
|
679
|
+
# that are set in this request will replace their corresponding fields in the
|
680
|
+
# template. Repeated fields are appended. Singular sub-messages and groups
|
681
|
+
# are recursively merged.
|
682
|
+
# @param location_id [String]
|
683
|
+
# The geographic location to process content reidentification. Reserved for
|
684
|
+
# future extensions.
|
685
|
+
#
|
686
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
687
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::ReidentifyContentResponse]
|
688
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
689
|
+
#
|
690
|
+
# @return [Google::Cloud::Dlp::V2::ReidentifyContentResponse]
|
691
|
+
#
|
692
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
693
|
+
#
|
694
|
+
def reidentify_content request, options = nil
|
695
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
696
|
+
|
697
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ReidentifyContentRequest
|
698
|
+
|
699
|
+
# Converts hash and nil to an options object
|
700
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
701
|
+
|
702
|
+
# Customize the options with defaults
|
703
|
+
metadata = @config.rpcs.reidentify_content.metadata.to_h
|
704
|
+
|
705
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
706
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
707
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
708
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
709
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
710
|
+
|
711
|
+
header_params = {
|
712
|
+
"parent" => request.parent
|
713
|
+
}
|
714
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
715
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
716
|
+
|
717
|
+
options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout,
|
718
|
+
metadata: metadata,
|
719
|
+
retry_policy: @config.rpcs.reidentify_content.retry_policy
|
720
|
+
options.apply_defaults metadata: @config.metadata,
|
721
|
+
retry_policy: @config.retry_policy
|
722
|
+
|
723
|
+
@dlp_service_stub.call_rpc :reidentify_content, request, options: options do |response, operation|
|
724
|
+
yield response, operation if block_given?
|
725
|
+
return response
|
726
|
+
end
|
727
|
+
rescue GRPC::BadStatus => e
|
728
|
+
raise Google::Cloud::Error.from_error(e)
|
729
|
+
end
|
730
|
+
|
731
|
+
##
|
732
|
+
# Returns a list of the sensitive information types that the DLP API
|
733
|
+
# supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
|
734
|
+
# learn more.
|
735
|
+
#
|
736
|
+
# @overload list_info_types(request, options = nil)
|
737
|
+
# Pass arguments to `list_info_types` via a request object, either of type
|
738
|
+
# {Google::Cloud::Dlp::V2::ListInfoTypesRequest} or an equivalent Hash.
|
739
|
+
#
|
740
|
+
# @param request [Google::Cloud::Dlp::V2::ListInfoTypesRequest, Hash]
|
741
|
+
# A request object representing the call parameters. Required. To specify no
|
742
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
743
|
+
# @param options [Gapic::CallOptions, Hash]
|
744
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
745
|
+
#
|
746
|
+
# @overload list_info_types(language_code: nil, filter: nil, location_id: nil)
|
747
|
+
# Pass arguments to `list_info_types` via keyword arguments. Note that at
|
748
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
749
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
750
|
+
#
|
751
|
+
# @param language_code [String]
|
752
|
+
# BCP-47 language code for localized infoType friendly
|
753
|
+
# names. If omitted, or if localized strings are not available,
|
754
|
+
# en-US strings will be returned.
|
755
|
+
# @param filter [String]
|
756
|
+
# filter to only return infoTypes supported by certain parts of the
|
757
|
+
# API. Defaults to supported_by=INSPECT.
|
758
|
+
# @param location_id [String]
|
759
|
+
# The geographic location to list info types. Reserved for future
|
760
|
+
# extensions.
|
761
|
+
#
|
762
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
763
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::ListInfoTypesResponse]
|
764
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
765
|
+
#
|
766
|
+
# @return [Google::Cloud::Dlp::V2::ListInfoTypesResponse]
|
767
|
+
#
|
768
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
769
|
+
#
|
770
|
+
def list_info_types request, options = nil
|
771
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
772
|
+
|
773
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListInfoTypesRequest
|
774
|
+
|
775
|
+
# Converts hash and nil to an options object
|
776
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
777
|
+
|
778
|
+
# Customize the options with defaults
|
779
|
+
metadata = @config.rpcs.list_info_types.metadata.to_h
|
780
|
+
|
781
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
782
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
783
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
784
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
785
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
786
|
+
|
787
|
+
options.apply_defaults timeout: @config.rpcs.list_info_types.timeout,
|
788
|
+
metadata: metadata,
|
789
|
+
retry_policy: @config.rpcs.list_info_types.retry_policy
|
790
|
+
options.apply_defaults metadata: @config.metadata,
|
791
|
+
retry_policy: @config.retry_policy
|
792
|
+
|
793
|
+
@dlp_service_stub.call_rpc :list_info_types, request, options: options do |response, operation|
|
794
|
+
yield response, operation if block_given?
|
795
|
+
return response
|
796
|
+
end
|
797
|
+
rescue GRPC::BadStatus => e
|
798
|
+
raise Google::Cloud::Error.from_error(e)
|
799
|
+
end
|
800
|
+
|
801
|
+
##
|
802
|
+
# Creates an InspectTemplate for re-using frequently used configuration
|
803
|
+
# for inspecting content, images, and storage.
|
804
|
+
# See https://cloud.google.com/dlp/docs/creating-templates to learn more.
|
805
|
+
#
|
806
|
+
# @overload create_inspect_template(request, options = nil)
|
807
|
+
# Pass arguments to `create_inspect_template` via a request object, either of type
|
808
|
+
# {Google::Cloud::Dlp::V2::CreateInspectTemplateRequest} or an equivalent Hash.
|
809
|
+
#
|
810
|
+
# @param request [Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, Hash]
|
811
|
+
# A request object representing the call parameters. Required. To specify no
|
812
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
813
|
+
# @param options [Gapic::CallOptions, Hash]
|
814
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
815
|
+
#
|
816
|
+
# @overload create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil)
|
817
|
+
# Pass arguments to `create_inspect_template` via keyword arguments. Note that at
|
818
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
819
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
820
|
+
#
|
821
|
+
# @param parent [String]
|
822
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
823
|
+
# organizations/my-org-id.
|
824
|
+
# @param inspect_template [Google::Cloud::Dlp::V2::InspectTemplate, Hash]
|
825
|
+
# Required. The InspectTemplate to create.
|
826
|
+
# @param template_id [String]
|
827
|
+
# The template id can contain uppercase and lowercase letters,
|
828
|
+
# numbers, and hyphens; that is, it must match the regular
|
829
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
830
|
+
# characters. Can be empty to allow the system to generate one.
|
831
|
+
# @param location_id [String]
|
832
|
+
# The geographic location to store the inspection template. Reserved for
|
833
|
+
# future extensions.
|
834
|
+
#
|
835
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
836
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::InspectTemplate]
|
837
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
838
|
+
#
|
839
|
+
# @return [Google::Cloud::Dlp::V2::InspectTemplate]
|
840
|
+
#
|
841
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
842
|
+
#
|
843
|
+
def create_inspect_template request, options = nil
|
844
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
845
|
+
|
846
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CreateInspectTemplateRequest
|
847
|
+
|
848
|
+
# Converts hash and nil to an options object
|
849
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
850
|
+
|
851
|
+
# Customize the options with defaults
|
852
|
+
metadata = @config.rpcs.create_inspect_template.metadata.to_h
|
853
|
+
|
854
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
855
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
856
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
857
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
858
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
859
|
+
|
860
|
+
header_params = {
|
861
|
+
"parent" => request.parent
|
862
|
+
}
|
863
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
864
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
865
|
+
|
866
|
+
options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout,
|
867
|
+
metadata: metadata,
|
868
|
+
retry_policy: @config.rpcs.create_inspect_template.retry_policy
|
869
|
+
options.apply_defaults metadata: @config.metadata,
|
870
|
+
retry_policy: @config.retry_policy
|
871
|
+
|
872
|
+
@dlp_service_stub.call_rpc :create_inspect_template, request, options: options do |response, operation|
|
873
|
+
yield response, operation if block_given?
|
874
|
+
return response
|
875
|
+
end
|
876
|
+
rescue GRPC::BadStatus => e
|
877
|
+
raise Google::Cloud::Error.from_error(e)
|
878
|
+
end
|
879
|
+
|
880
|
+
##
|
881
|
+
# Updates the InspectTemplate.
|
882
|
+
# See https://cloud.google.com/dlp/docs/creating-templates to learn more.
|
883
|
+
#
|
884
|
+
# @overload update_inspect_template(request, options = nil)
|
885
|
+
# Pass arguments to `update_inspect_template` via a request object, either of type
|
886
|
+
# {Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest} or an equivalent Hash.
|
887
|
+
#
|
888
|
+
# @param request [Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, Hash]
|
889
|
+
# A request object representing the call parameters. Required. To specify no
|
890
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
891
|
+
# @param options [Gapic::CallOptions, Hash]
|
892
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
893
|
+
#
|
894
|
+
# @overload update_inspect_template(name: nil, inspect_template: nil, update_mask: nil)
|
895
|
+
# Pass arguments to `update_inspect_template` via keyword arguments. Note that at
|
896
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
897
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
898
|
+
#
|
899
|
+
# @param name [String]
|
900
|
+
# Required. Resource name of organization and inspectTemplate to be updated,
|
901
|
+
# for example `organizations/433245324/inspectTemplates/432452342` or
|
902
|
+
# projects/project-id/inspectTemplates/432452342.
|
903
|
+
# @param inspect_template [Google::Cloud::Dlp::V2::InspectTemplate, Hash]
|
904
|
+
# New InspectTemplate value.
|
905
|
+
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
906
|
+
# Mask to control which fields get updated.
|
907
|
+
#
|
908
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
909
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::InspectTemplate]
|
910
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
911
|
+
#
|
912
|
+
# @return [Google::Cloud::Dlp::V2::InspectTemplate]
|
913
|
+
#
|
914
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
915
|
+
#
|
916
|
+
def update_inspect_template request, options = nil
|
917
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
918
|
+
|
919
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest
|
920
|
+
|
921
|
+
# Converts hash and nil to an options object
|
922
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
923
|
+
|
924
|
+
# Customize the options with defaults
|
925
|
+
metadata = @config.rpcs.update_inspect_template.metadata.to_h
|
926
|
+
|
927
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
928
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
929
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
930
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
931
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
932
|
+
|
933
|
+
header_params = {
|
934
|
+
"name" => request.name
|
935
|
+
}
|
936
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
937
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
938
|
+
|
939
|
+
options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout,
|
940
|
+
metadata: metadata,
|
941
|
+
retry_policy: @config.rpcs.update_inspect_template.retry_policy
|
942
|
+
options.apply_defaults metadata: @config.metadata,
|
943
|
+
retry_policy: @config.retry_policy
|
944
|
+
|
945
|
+
@dlp_service_stub.call_rpc :update_inspect_template, request, options: options do |response, operation|
|
946
|
+
yield response, operation if block_given?
|
947
|
+
return response
|
948
|
+
end
|
949
|
+
rescue GRPC::BadStatus => e
|
950
|
+
raise Google::Cloud::Error.from_error(e)
|
951
|
+
end
|
952
|
+
|
953
|
+
##
|
954
|
+
# Gets an InspectTemplate.
|
955
|
+
# See https://cloud.google.com/dlp/docs/creating-templates to learn more.
|
956
|
+
#
|
957
|
+
# @overload get_inspect_template(request, options = nil)
|
958
|
+
# Pass arguments to `get_inspect_template` via a request object, either of type
|
959
|
+
# {Google::Cloud::Dlp::V2::GetInspectTemplateRequest} or an equivalent Hash.
|
960
|
+
#
|
961
|
+
# @param request [Google::Cloud::Dlp::V2::GetInspectTemplateRequest, Hash]
|
962
|
+
# A request object representing the call parameters. Required. To specify no
|
963
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
964
|
+
# @param options [Gapic::CallOptions, Hash]
|
965
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
966
|
+
#
|
967
|
+
# @overload get_inspect_template(name: nil)
|
968
|
+
# Pass arguments to `get_inspect_template` via keyword arguments. Note that at
|
969
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
970
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
971
|
+
#
|
972
|
+
# @param name [String]
|
973
|
+
# Required. Resource name of the organization and inspectTemplate to be read,
|
974
|
+
# for example `organizations/433245324/inspectTemplates/432452342` or
|
975
|
+
# projects/project-id/inspectTemplates/432452342.
|
976
|
+
#
|
977
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
978
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::InspectTemplate]
|
979
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
980
|
+
#
|
981
|
+
# @return [Google::Cloud::Dlp::V2::InspectTemplate]
|
982
|
+
#
|
983
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
984
|
+
#
|
985
|
+
def get_inspect_template request, options = nil
|
986
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
987
|
+
|
988
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::GetInspectTemplateRequest
|
989
|
+
|
990
|
+
# Converts hash and nil to an options object
|
991
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
992
|
+
|
993
|
+
# Customize the options with defaults
|
994
|
+
metadata = @config.rpcs.get_inspect_template.metadata.to_h
|
995
|
+
|
996
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
997
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
998
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
999
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1000
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1001
|
+
|
1002
|
+
header_params = {
|
1003
|
+
"name" => request.name
|
1004
|
+
}
|
1005
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1006
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1007
|
+
|
1008
|
+
options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout,
|
1009
|
+
metadata: metadata,
|
1010
|
+
retry_policy: @config.rpcs.get_inspect_template.retry_policy
|
1011
|
+
options.apply_defaults metadata: @config.metadata,
|
1012
|
+
retry_policy: @config.retry_policy
|
1013
|
+
|
1014
|
+
@dlp_service_stub.call_rpc :get_inspect_template, request, options: options do |response, operation|
|
1015
|
+
yield response, operation if block_given?
|
1016
|
+
return response
|
1017
|
+
end
|
1018
|
+
rescue GRPC::BadStatus => e
|
1019
|
+
raise Google::Cloud::Error.from_error(e)
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
##
|
1023
|
+
# Lists InspectTemplates.
|
1024
|
+
# See https://cloud.google.com/dlp/docs/creating-templates to learn more.
|
1025
|
+
#
|
1026
|
+
# @overload list_inspect_templates(request, options = nil)
|
1027
|
+
# Pass arguments to `list_inspect_templates` via a request object, either of type
|
1028
|
+
# {Google::Cloud::Dlp::V2::ListInspectTemplatesRequest} or an equivalent Hash.
|
1029
|
+
#
|
1030
|
+
# @param request [Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, Hash]
|
1031
|
+
# A request object representing the call parameters. Required. To specify no
|
1032
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1033
|
+
# @param options [Gapic::CallOptions, Hash]
|
1034
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1035
|
+
#
|
1036
|
+
# @overload list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil)
|
1037
|
+
# Pass arguments to `list_inspect_templates` via keyword arguments. Note that at
|
1038
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1039
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1040
|
+
#
|
1041
|
+
# @param parent [String]
|
1042
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
1043
|
+
# organizations/my-org-id.
|
1044
|
+
# @param page_token [String]
|
1045
|
+
# Page token to continue retrieval. Comes from previous call
|
1046
|
+
# to `ListInspectTemplates`.
|
1047
|
+
# @param page_size [Integer]
|
1048
|
+
# Size of the page, can be limited by server. If zero server returns
|
1049
|
+
# a page of max size 100.
|
1050
|
+
# @param order_by [String]
|
1051
|
+
# Comma separated list of fields to order by,
|
1052
|
+
# followed by `asc` or `desc` postfix. This list is case-insensitive,
|
1053
|
+
# default sorting order is ascending, redundant space characters are
|
1054
|
+
# insignificant.
|
1055
|
+
#
|
1056
|
+
# Example: `name asc,update_time, create_time desc`
|
1057
|
+
#
|
1058
|
+
# Supported fields are:
|
1059
|
+
#
|
1060
|
+
# - `create_time`: corresponds to time the template was created.
|
1061
|
+
# - `update_time`: corresponds to time the template was last updated.
|
1062
|
+
# - `name`: corresponds to template's name.
|
1063
|
+
# - `display_name`: corresponds to template's display name.
|
1064
|
+
# @param location_id [String]
|
1065
|
+
# The geographic location where inspection templates will be retrieved from.
|
1066
|
+
# Use `-` for all locations. Reserved for future extensions.
|
1067
|
+
#
|
1068
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1069
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::InspectTemplate>]
|
1070
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1071
|
+
#
|
1072
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::InspectTemplate>]
|
1073
|
+
#
|
1074
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1075
|
+
#
|
1076
|
+
def list_inspect_templates request, options = nil
|
1077
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1078
|
+
|
1079
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListInspectTemplatesRequest
|
1080
|
+
|
1081
|
+
# Converts hash and nil to an options object
|
1082
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1083
|
+
|
1084
|
+
# Customize the options with defaults
|
1085
|
+
metadata = @config.rpcs.list_inspect_templates.metadata.to_h
|
1086
|
+
|
1087
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1088
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1089
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1090
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1091
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1092
|
+
|
1093
|
+
header_params = {
|
1094
|
+
"parent" => request.parent
|
1095
|
+
}
|
1096
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1097
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1098
|
+
|
1099
|
+
options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout,
|
1100
|
+
metadata: metadata,
|
1101
|
+
retry_policy: @config.rpcs.list_inspect_templates.retry_policy
|
1102
|
+
options.apply_defaults metadata: @config.metadata,
|
1103
|
+
retry_policy: @config.retry_policy
|
1104
|
+
|
1105
|
+
@dlp_service_stub.call_rpc :list_inspect_templates, request, options: options do |response, operation|
|
1106
|
+
response = Gapic::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, request, response, operation, options
|
1107
|
+
yield response, operation if block_given?
|
1108
|
+
return response
|
1109
|
+
end
|
1110
|
+
rescue GRPC::BadStatus => e
|
1111
|
+
raise Google::Cloud::Error.from_error(e)
|
1112
|
+
end
|
1113
|
+
|
1114
|
+
##
|
1115
|
+
# Deletes an InspectTemplate.
|
1116
|
+
# See https://cloud.google.com/dlp/docs/creating-templates to learn more.
|
1117
|
+
#
|
1118
|
+
# @overload delete_inspect_template(request, options = nil)
|
1119
|
+
# Pass arguments to `delete_inspect_template` via a request object, either of type
|
1120
|
+
# {Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest} or an equivalent Hash.
|
1121
|
+
#
|
1122
|
+
# @param request [Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, Hash]
|
1123
|
+
# A request object representing the call parameters. Required. To specify no
|
1124
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1125
|
+
# @param options [Gapic::CallOptions, Hash]
|
1126
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1127
|
+
#
|
1128
|
+
# @overload delete_inspect_template(name: nil)
|
1129
|
+
# Pass arguments to `delete_inspect_template` via keyword arguments. Note that at
|
1130
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1131
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1132
|
+
#
|
1133
|
+
# @param name [String]
|
1134
|
+
# Required. Resource name of the organization and inspectTemplate to be
|
1135
|
+
# deleted, for example `organizations/433245324/inspectTemplates/432452342`
|
1136
|
+
# or projects/project-id/inspectTemplates/432452342.
|
1137
|
+
#
|
1138
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1139
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
1140
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1141
|
+
#
|
1142
|
+
# @return [Google::Protobuf::Empty]
|
1143
|
+
#
|
1144
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1145
|
+
#
|
1146
|
+
def delete_inspect_template request, options = nil
|
1147
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1148
|
+
|
1149
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest
|
1150
|
+
|
1151
|
+
# Converts hash and nil to an options object
|
1152
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1153
|
+
|
1154
|
+
# Customize the options with defaults
|
1155
|
+
metadata = @config.rpcs.delete_inspect_template.metadata.to_h
|
1156
|
+
|
1157
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1158
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1159
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1160
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1161
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1162
|
+
|
1163
|
+
header_params = {
|
1164
|
+
"name" => request.name
|
1165
|
+
}
|
1166
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1167
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1168
|
+
|
1169
|
+
options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout,
|
1170
|
+
metadata: metadata,
|
1171
|
+
retry_policy: @config.rpcs.delete_inspect_template.retry_policy
|
1172
|
+
options.apply_defaults metadata: @config.metadata,
|
1173
|
+
retry_policy: @config.retry_policy
|
1174
|
+
|
1175
|
+
@dlp_service_stub.call_rpc :delete_inspect_template, request, options: options do |response, operation|
|
1176
|
+
yield response, operation if block_given?
|
1177
|
+
return response
|
1178
|
+
end
|
1179
|
+
rescue GRPC::BadStatus => e
|
1180
|
+
raise Google::Cloud::Error.from_error(e)
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
##
|
1184
|
+
# Creates a DeidentifyTemplate for re-using frequently used configuration
|
1185
|
+
# for de-identifying content, images, and storage.
|
1186
|
+
# See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
|
1187
|
+
# more.
|
1188
|
+
#
|
1189
|
+
# @overload create_deidentify_template(request, options = nil)
|
1190
|
+
# Pass arguments to `create_deidentify_template` via a request object, either of type
|
1191
|
+
# {Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest} or an equivalent Hash.
|
1192
|
+
#
|
1193
|
+
# @param request [Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, Hash]
|
1194
|
+
# A request object representing the call parameters. Required. To specify no
|
1195
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1196
|
+
# @param options [Gapic::CallOptions, Hash]
|
1197
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1198
|
+
#
|
1199
|
+
# @overload create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil)
|
1200
|
+
# Pass arguments to `create_deidentify_template` via keyword arguments. Note that at
|
1201
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1202
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1203
|
+
#
|
1204
|
+
# @param parent [String]
|
1205
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
1206
|
+
# organizations/my-org-id.
|
1207
|
+
# @param deidentify_template [Google::Cloud::Dlp::V2::DeidentifyTemplate, Hash]
|
1208
|
+
# Required. The DeidentifyTemplate to create.
|
1209
|
+
# @param template_id [String]
|
1210
|
+
# The template id can contain uppercase and lowercase letters,
|
1211
|
+
# numbers, and hyphens; that is, it must match the regular
|
1212
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1213
|
+
# characters. Can be empty to allow the system to generate one.
|
1214
|
+
# @param location_id [String]
|
1215
|
+
# The geographic location to store the deidentification template. Reserved
|
1216
|
+
# for future extensions.
|
1217
|
+
#
|
1218
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1219
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1220
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1221
|
+
#
|
1222
|
+
# @return [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1223
|
+
#
|
1224
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1225
|
+
#
|
1226
|
+
def create_deidentify_template request, options = nil
|
1227
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1228
|
+
|
1229
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest
|
1230
|
+
|
1231
|
+
# Converts hash and nil to an options object
|
1232
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1233
|
+
|
1234
|
+
# Customize the options with defaults
|
1235
|
+
metadata = @config.rpcs.create_deidentify_template.metadata.to_h
|
1236
|
+
|
1237
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1238
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1239
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1240
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1241
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1242
|
+
|
1243
|
+
header_params = {
|
1244
|
+
"parent" => request.parent
|
1245
|
+
}
|
1246
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1247
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1248
|
+
|
1249
|
+
options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout,
|
1250
|
+
metadata: metadata,
|
1251
|
+
retry_policy: @config.rpcs.create_deidentify_template.retry_policy
|
1252
|
+
options.apply_defaults metadata: @config.metadata,
|
1253
|
+
retry_policy: @config.retry_policy
|
1254
|
+
|
1255
|
+
@dlp_service_stub.call_rpc :create_deidentify_template, request, options: options do |response, operation|
|
1256
|
+
yield response, operation if block_given?
|
1257
|
+
return response
|
1258
|
+
end
|
1259
|
+
rescue GRPC::BadStatus => e
|
1260
|
+
raise Google::Cloud::Error.from_error(e)
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
##
|
1264
|
+
# Updates the DeidentifyTemplate.
|
1265
|
+
# See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
|
1266
|
+
# more.
|
1267
|
+
#
|
1268
|
+
# @overload update_deidentify_template(request, options = nil)
|
1269
|
+
# Pass arguments to `update_deidentify_template` via a request object, either of type
|
1270
|
+
# {Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest} or an equivalent Hash.
|
1271
|
+
#
|
1272
|
+
# @param request [Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, Hash]
|
1273
|
+
# A request object representing the call parameters. Required. To specify no
|
1274
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1275
|
+
# @param options [Gapic::CallOptions, Hash]
|
1276
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1277
|
+
#
|
1278
|
+
# @overload update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil)
|
1279
|
+
# Pass arguments to `update_deidentify_template` via keyword arguments. Note that at
|
1280
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1281
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1282
|
+
#
|
1283
|
+
# @param name [String]
|
1284
|
+
# Required. Resource name of organization and deidentify template to be
|
1285
|
+
# updated, for example
|
1286
|
+
# `organizations/433245324/deidentifyTemplates/432452342` or
|
1287
|
+
# projects/project-id/deidentifyTemplates/432452342.
|
1288
|
+
# @param deidentify_template [Google::Cloud::Dlp::V2::DeidentifyTemplate, Hash]
|
1289
|
+
# New DeidentifyTemplate value.
|
1290
|
+
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
1291
|
+
# Mask to control which fields get updated.
|
1292
|
+
#
|
1293
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1294
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1295
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1296
|
+
#
|
1297
|
+
# @return [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1298
|
+
#
|
1299
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1300
|
+
#
|
1301
|
+
def update_deidentify_template request, options = nil
|
1302
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1303
|
+
|
1304
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest
|
1305
|
+
|
1306
|
+
# Converts hash and nil to an options object
|
1307
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1308
|
+
|
1309
|
+
# Customize the options with defaults
|
1310
|
+
metadata = @config.rpcs.update_deidentify_template.metadata.to_h
|
1311
|
+
|
1312
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1313
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1314
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1315
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1317
|
+
|
1318
|
+
header_params = {
|
1319
|
+
"name" => request.name
|
1320
|
+
}
|
1321
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1322
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1323
|
+
|
1324
|
+
options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout,
|
1325
|
+
metadata: metadata,
|
1326
|
+
retry_policy: @config.rpcs.update_deidentify_template.retry_policy
|
1327
|
+
options.apply_defaults metadata: @config.metadata,
|
1328
|
+
retry_policy: @config.retry_policy
|
1329
|
+
|
1330
|
+
@dlp_service_stub.call_rpc :update_deidentify_template, request, options: options do |response, operation|
|
1331
|
+
yield response, operation if block_given?
|
1332
|
+
return response
|
1333
|
+
end
|
1334
|
+
rescue GRPC::BadStatus => e
|
1335
|
+
raise Google::Cloud::Error.from_error(e)
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
##
|
1339
|
+
# Gets a DeidentifyTemplate.
|
1340
|
+
# See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
|
1341
|
+
# more.
|
1342
|
+
#
|
1343
|
+
# @overload get_deidentify_template(request, options = nil)
|
1344
|
+
# Pass arguments to `get_deidentify_template` via a request object, either of type
|
1345
|
+
# {Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest} or an equivalent Hash.
|
1346
|
+
#
|
1347
|
+
# @param request [Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, Hash]
|
1348
|
+
# A request object representing the call parameters. Required. To specify no
|
1349
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1350
|
+
# @param options [Gapic::CallOptions, Hash]
|
1351
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1352
|
+
#
|
1353
|
+
# @overload get_deidentify_template(name: nil)
|
1354
|
+
# Pass arguments to `get_deidentify_template` via keyword arguments. Note that at
|
1355
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1356
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1357
|
+
#
|
1358
|
+
# @param name [String]
|
1359
|
+
# Required. Resource name of the organization and deidentify template to be
|
1360
|
+
# read, for example `organizations/433245324/deidentifyTemplates/432452342`
|
1361
|
+
# or projects/project-id/deidentifyTemplates/432452342.
|
1362
|
+
#
|
1363
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1364
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1365
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1366
|
+
#
|
1367
|
+
# @return [Google::Cloud::Dlp::V2::DeidentifyTemplate]
|
1368
|
+
#
|
1369
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1370
|
+
#
|
1371
|
+
def get_deidentify_template request, options = nil
|
1372
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1373
|
+
|
1374
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest
|
1375
|
+
|
1376
|
+
# Converts hash and nil to an options object
|
1377
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1378
|
+
|
1379
|
+
# Customize the options with defaults
|
1380
|
+
metadata = @config.rpcs.get_deidentify_template.metadata.to_h
|
1381
|
+
|
1382
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1383
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1384
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1385
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1386
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1387
|
+
|
1388
|
+
header_params = {
|
1389
|
+
"name" => request.name
|
1390
|
+
}
|
1391
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1392
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1393
|
+
|
1394
|
+
options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout,
|
1395
|
+
metadata: metadata,
|
1396
|
+
retry_policy: @config.rpcs.get_deidentify_template.retry_policy
|
1397
|
+
options.apply_defaults metadata: @config.metadata,
|
1398
|
+
retry_policy: @config.retry_policy
|
1399
|
+
|
1400
|
+
@dlp_service_stub.call_rpc :get_deidentify_template, request, options: options do |response, operation|
|
1401
|
+
yield response, operation if block_given?
|
1402
|
+
return response
|
1403
|
+
end
|
1404
|
+
rescue GRPC::BadStatus => e
|
1405
|
+
raise Google::Cloud::Error.from_error(e)
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
##
|
1409
|
+
# Lists DeidentifyTemplates.
|
1410
|
+
# See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
|
1411
|
+
# more.
|
1412
|
+
#
|
1413
|
+
# @overload list_deidentify_templates(request, options = nil)
|
1414
|
+
# Pass arguments to `list_deidentify_templates` via a request object, either of type
|
1415
|
+
# {Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest} or an equivalent Hash.
|
1416
|
+
#
|
1417
|
+
# @param request [Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, Hash]
|
1418
|
+
# A request object representing the call parameters. Required. To specify no
|
1419
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1420
|
+
# @param options [Gapic::CallOptions, Hash]
|
1421
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1422
|
+
#
|
1423
|
+
# @overload list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil)
|
1424
|
+
# Pass arguments to `list_deidentify_templates` via keyword arguments. Note that at
|
1425
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1426
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1427
|
+
#
|
1428
|
+
# @param parent [String]
|
1429
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
1430
|
+
# organizations/my-org-id.
|
1431
|
+
# @param page_token [String]
|
1432
|
+
# Page token to continue retrieval. Comes from previous call
|
1433
|
+
# to `ListDeidentifyTemplates`.
|
1434
|
+
# @param page_size [Integer]
|
1435
|
+
# Size of the page, can be limited by server. If zero server returns
|
1436
|
+
# a page of max size 100.
|
1437
|
+
# @param order_by [String]
|
1438
|
+
# Comma separated list of fields to order by,
|
1439
|
+
# followed by `asc` or `desc` postfix. This list is case-insensitive,
|
1440
|
+
# default sorting order is ascending, redundant space characters are
|
1441
|
+
# insignificant.
|
1442
|
+
#
|
1443
|
+
# Example: `name asc,update_time, create_time desc`
|
1444
|
+
#
|
1445
|
+
# Supported fields are:
|
1446
|
+
#
|
1447
|
+
# - `create_time`: corresponds to time the template was created.
|
1448
|
+
# - `update_time`: corresponds to time the template was last updated.
|
1449
|
+
# - `name`: corresponds to template's name.
|
1450
|
+
# - `display_name`: corresponds to template's display name.
|
1451
|
+
# @param location_id [String]
|
1452
|
+
# The geographic location where deidentifications templates will be retrieved
|
1453
|
+
# from. Use `-` for all locations. Reserved for future extensions.
|
1454
|
+
#
|
1455
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1456
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::DeidentifyTemplate>]
|
1457
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1458
|
+
#
|
1459
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::DeidentifyTemplate>]
|
1460
|
+
#
|
1461
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1462
|
+
#
|
1463
|
+
def list_deidentify_templates request, options = nil
|
1464
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1465
|
+
|
1466
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest
|
1467
|
+
|
1468
|
+
# Converts hash and nil to an options object
|
1469
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1470
|
+
|
1471
|
+
# Customize the options with defaults
|
1472
|
+
metadata = @config.rpcs.list_deidentify_templates.metadata.to_h
|
1473
|
+
|
1474
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1475
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1476
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1477
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1478
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1479
|
+
|
1480
|
+
header_params = {
|
1481
|
+
"parent" => request.parent
|
1482
|
+
}
|
1483
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1484
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1485
|
+
|
1486
|
+
options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout,
|
1487
|
+
metadata: metadata,
|
1488
|
+
retry_policy: @config.rpcs.list_deidentify_templates.retry_policy
|
1489
|
+
options.apply_defaults metadata: @config.metadata,
|
1490
|
+
retry_policy: @config.retry_policy
|
1491
|
+
|
1492
|
+
@dlp_service_stub.call_rpc :list_deidentify_templates, request, options: options do |response, operation|
|
1493
|
+
response = Gapic::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, request, response, operation, options
|
1494
|
+
yield response, operation if block_given?
|
1495
|
+
return response
|
1496
|
+
end
|
1497
|
+
rescue GRPC::BadStatus => e
|
1498
|
+
raise Google::Cloud::Error.from_error(e)
|
1499
|
+
end
|
1500
|
+
|
1501
|
+
##
|
1502
|
+
# Deletes a DeidentifyTemplate.
|
1503
|
+
# See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
|
1504
|
+
# more.
|
1505
|
+
#
|
1506
|
+
# @overload delete_deidentify_template(request, options = nil)
|
1507
|
+
# Pass arguments to `delete_deidentify_template` via a request object, either of type
|
1508
|
+
# {Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest} or an equivalent Hash.
|
1509
|
+
#
|
1510
|
+
# @param request [Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, Hash]
|
1511
|
+
# A request object representing the call parameters. Required. To specify no
|
1512
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1513
|
+
# @param options [Gapic::CallOptions, Hash]
|
1514
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1515
|
+
#
|
1516
|
+
# @overload delete_deidentify_template(name: nil)
|
1517
|
+
# Pass arguments to `delete_deidentify_template` via keyword arguments. Note that at
|
1518
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1519
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1520
|
+
#
|
1521
|
+
# @param name [String]
|
1522
|
+
# Required. Resource name of the organization and deidentify template to be
|
1523
|
+
# deleted, for example
|
1524
|
+
# `organizations/433245324/deidentifyTemplates/432452342` or
|
1525
|
+
# projects/project-id/deidentifyTemplates/432452342.
|
1526
|
+
#
|
1527
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1528
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
1529
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1530
|
+
#
|
1531
|
+
# @return [Google::Protobuf::Empty]
|
1532
|
+
#
|
1533
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1534
|
+
#
|
1535
|
+
def delete_deidentify_template request, options = nil
|
1536
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1537
|
+
|
1538
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest
|
1539
|
+
|
1540
|
+
# Converts hash and nil to an options object
|
1541
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1542
|
+
|
1543
|
+
# Customize the options with defaults
|
1544
|
+
metadata = @config.rpcs.delete_deidentify_template.metadata.to_h
|
1545
|
+
|
1546
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1547
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1548
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1549
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1550
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1551
|
+
|
1552
|
+
header_params = {
|
1553
|
+
"name" => request.name
|
1554
|
+
}
|
1555
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1556
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1557
|
+
|
1558
|
+
options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout,
|
1559
|
+
metadata: metadata,
|
1560
|
+
retry_policy: @config.rpcs.delete_deidentify_template.retry_policy
|
1561
|
+
options.apply_defaults metadata: @config.metadata,
|
1562
|
+
retry_policy: @config.retry_policy
|
1563
|
+
|
1564
|
+
@dlp_service_stub.call_rpc :delete_deidentify_template, request, options: options do |response, operation|
|
1565
|
+
yield response, operation if block_given?
|
1566
|
+
return response
|
1567
|
+
end
|
1568
|
+
rescue GRPC::BadStatus => e
|
1569
|
+
raise Google::Cloud::Error.from_error(e)
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
##
|
1573
|
+
# Creates a job trigger to run DLP actions such as scanning storage for
|
1574
|
+
# sensitive information on a set schedule.
|
1575
|
+
# See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
|
1576
|
+
#
|
1577
|
+
# @overload create_job_trigger(request, options = nil)
|
1578
|
+
# Pass arguments to `create_job_trigger` via a request object, either of type
|
1579
|
+
# {Google::Cloud::Dlp::V2::CreateJobTriggerRequest} or an equivalent Hash.
|
1580
|
+
#
|
1581
|
+
# @param request [Google::Cloud::Dlp::V2::CreateJobTriggerRequest, Hash]
|
1582
|
+
# A request object representing the call parameters. Required. To specify no
|
1583
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1584
|
+
# @param options [Gapic::CallOptions, Hash]
|
1585
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1586
|
+
#
|
1587
|
+
# @overload create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil)
|
1588
|
+
# Pass arguments to `create_job_trigger` via keyword arguments. Note that at
|
1589
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1590
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1591
|
+
#
|
1592
|
+
# @param parent [String]
|
1593
|
+
# Required. The parent resource name, for example projects/my-project-id.
|
1594
|
+
# @param job_trigger [Google::Cloud::Dlp::V2::JobTrigger, Hash]
|
1595
|
+
# Required. The JobTrigger to create.
|
1596
|
+
# @param trigger_id [String]
|
1597
|
+
# The trigger id can contain uppercase and lowercase letters,
|
1598
|
+
# numbers, and hyphens; that is, it must match the regular
|
1599
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1600
|
+
# characters. Can be empty to allow the system to generate one.
|
1601
|
+
# @param location_id [String]
|
1602
|
+
# The geographic location to store the job trigger. Reserved for
|
1603
|
+
# future extensions.
|
1604
|
+
#
|
1605
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1606
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::JobTrigger]
|
1607
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1608
|
+
#
|
1609
|
+
# @return [Google::Cloud::Dlp::V2::JobTrigger]
|
1610
|
+
#
|
1611
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1612
|
+
#
|
1613
|
+
def create_job_trigger request, options = nil
|
1614
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1615
|
+
|
1616
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CreateJobTriggerRequest
|
1617
|
+
|
1618
|
+
# Converts hash and nil to an options object
|
1619
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1620
|
+
|
1621
|
+
# Customize the options with defaults
|
1622
|
+
metadata = @config.rpcs.create_job_trigger.metadata.to_h
|
1623
|
+
|
1624
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1625
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1626
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1627
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1628
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1629
|
+
|
1630
|
+
header_params = {
|
1631
|
+
"parent" => request.parent
|
1632
|
+
}
|
1633
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1634
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1635
|
+
|
1636
|
+
options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout,
|
1637
|
+
metadata: metadata,
|
1638
|
+
retry_policy: @config.rpcs.create_job_trigger.retry_policy
|
1639
|
+
options.apply_defaults metadata: @config.metadata,
|
1640
|
+
retry_policy: @config.retry_policy
|
1641
|
+
|
1642
|
+
@dlp_service_stub.call_rpc :create_job_trigger, request, options: options do |response, operation|
|
1643
|
+
yield response, operation if block_given?
|
1644
|
+
return response
|
1645
|
+
end
|
1646
|
+
rescue GRPC::BadStatus => e
|
1647
|
+
raise Google::Cloud::Error.from_error(e)
|
1648
|
+
end
|
1649
|
+
|
1650
|
+
##
|
1651
|
+
# Updates a job trigger.
|
1652
|
+
# See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
|
1653
|
+
#
|
1654
|
+
# @overload update_job_trigger(request, options = nil)
|
1655
|
+
# Pass arguments to `update_job_trigger` via a request object, either of type
|
1656
|
+
# {Google::Cloud::Dlp::V2::UpdateJobTriggerRequest} or an equivalent Hash.
|
1657
|
+
#
|
1658
|
+
# @param request [Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, Hash]
|
1659
|
+
# A request object representing the call parameters. Required. To specify no
|
1660
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1661
|
+
# @param options [Gapic::CallOptions, Hash]
|
1662
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1663
|
+
#
|
1664
|
+
# @overload update_job_trigger(name: nil, job_trigger: nil, update_mask: nil)
|
1665
|
+
# Pass arguments to `update_job_trigger` via keyword arguments. Note that at
|
1666
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1667
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1668
|
+
#
|
1669
|
+
# @param name [String]
|
1670
|
+
# Required. Resource name of the project and the triggeredJob, for example
|
1671
|
+
# `projects/dlp-test-project/jobTriggers/53234423`.
|
1672
|
+
# @param job_trigger [Google::Cloud::Dlp::V2::JobTrigger, Hash]
|
1673
|
+
# New JobTrigger value.
|
1674
|
+
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
1675
|
+
# Mask to control which fields get updated.
|
1676
|
+
#
|
1677
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1678
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::JobTrigger]
|
1679
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1680
|
+
#
|
1681
|
+
# @return [Google::Cloud::Dlp::V2::JobTrigger]
|
1682
|
+
#
|
1683
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1684
|
+
#
|
1685
|
+
def update_job_trigger request, options = nil
|
1686
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1687
|
+
|
1688
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::UpdateJobTriggerRequest
|
1689
|
+
|
1690
|
+
# Converts hash and nil to an options object
|
1691
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1692
|
+
|
1693
|
+
# Customize the options with defaults
|
1694
|
+
metadata = @config.rpcs.update_job_trigger.metadata.to_h
|
1695
|
+
|
1696
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1697
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1698
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1699
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1700
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1701
|
+
|
1702
|
+
header_params = {
|
1703
|
+
"name" => request.name
|
1704
|
+
}
|
1705
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1706
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1707
|
+
|
1708
|
+
options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout,
|
1709
|
+
metadata: metadata,
|
1710
|
+
retry_policy: @config.rpcs.update_job_trigger.retry_policy
|
1711
|
+
options.apply_defaults metadata: @config.metadata,
|
1712
|
+
retry_policy: @config.retry_policy
|
1713
|
+
|
1714
|
+
@dlp_service_stub.call_rpc :update_job_trigger, request, options: options do |response, operation|
|
1715
|
+
yield response, operation if block_given?
|
1716
|
+
return response
|
1717
|
+
end
|
1718
|
+
rescue GRPC::BadStatus => e
|
1719
|
+
raise Google::Cloud::Error.from_error(e)
|
1720
|
+
end
|
1721
|
+
|
1722
|
+
##
|
1723
|
+
# Inspect hybrid content and store findings to a trigger. The inspection
|
1724
|
+
# will be processed asynchronously. To review the findings monitor the
|
1725
|
+
# jobs within the trigger.
|
1726
|
+
# Early access feature is in a pre-release state and might change or have
|
1727
|
+
# limited support. For more information, see
|
1728
|
+
# https://cloud.google.com/products#product-launch-stages.
|
1729
|
+
#
|
1730
|
+
# @overload hybrid_inspect_job_trigger(request, options = nil)
|
1731
|
+
# Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type
|
1732
|
+
# {Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest} or an equivalent Hash.
|
1733
|
+
#
|
1734
|
+
# @param request [Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, Hash]
|
1735
|
+
# A request object representing the call parameters. Required. To specify no
|
1736
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1737
|
+
# @param options [Gapic::CallOptions, Hash]
|
1738
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1739
|
+
#
|
1740
|
+
# @overload hybrid_inspect_job_trigger(name: nil, hybrid_item: nil)
|
1741
|
+
# Pass arguments to `hybrid_inspect_job_trigger` via keyword arguments. Note that at
|
1742
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1743
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1744
|
+
#
|
1745
|
+
# @param name [String]
|
1746
|
+
# Required. Resource name of the trigger to execute a hybrid inspect on, for
|
1747
|
+
# example `projects/dlp-test-project/jobTriggers/53234423`.
|
1748
|
+
# @param hybrid_item [Google::Cloud::Dlp::V2::HybridContentItem, Hash]
|
1749
|
+
# The item to inspect.
|
1750
|
+
#
|
1751
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1752
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::HybridInspectResponse]
|
1753
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1754
|
+
#
|
1755
|
+
# @return [Google::Cloud::Dlp::V2::HybridInspectResponse]
|
1756
|
+
#
|
1757
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1758
|
+
#
|
1759
|
+
def hybrid_inspect_job_trigger request, options = nil
|
1760
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1761
|
+
|
1762
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest
|
1763
|
+
|
1764
|
+
# Converts hash and nil to an options object
|
1765
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1766
|
+
|
1767
|
+
# Customize the options with defaults
|
1768
|
+
metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h
|
1769
|
+
|
1770
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1771
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1772
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1773
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1774
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1775
|
+
|
1776
|
+
header_params = {
|
1777
|
+
"name" => request.name
|
1778
|
+
}
|
1779
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1780
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1781
|
+
|
1782
|
+
options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout,
|
1783
|
+
metadata: metadata,
|
1784
|
+
retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy
|
1785
|
+
options.apply_defaults metadata: @config.metadata,
|
1786
|
+
retry_policy: @config.retry_policy
|
1787
|
+
|
1788
|
+
@dlp_service_stub.call_rpc :hybrid_inspect_job_trigger, request, options: options do |response, operation|
|
1789
|
+
yield response, operation if block_given?
|
1790
|
+
return response
|
1791
|
+
end
|
1792
|
+
rescue GRPC::BadStatus => e
|
1793
|
+
raise Google::Cloud::Error.from_error(e)
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
##
|
1797
|
+
# Gets a job trigger.
|
1798
|
+
# See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
|
1799
|
+
#
|
1800
|
+
# @overload get_job_trigger(request, options = nil)
|
1801
|
+
# Pass arguments to `get_job_trigger` via a request object, either of type
|
1802
|
+
# {Google::Cloud::Dlp::V2::GetJobTriggerRequest} or an equivalent Hash.
|
1803
|
+
#
|
1804
|
+
# @param request [Google::Cloud::Dlp::V2::GetJobTriggerRequest, Hash]
|
1805
|
+
# A request object representing the call parameters. Required. To specify no
|
1806
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1807
|
+
# @param options [Gapic::CallOptions, Hash]
|
1808
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1809
|
+
#
|
1810
|
+
# @overload get_job_trigger(name: nil)
|
1811
|
+
# Pass arguments to `get_job_trigger` via keyword arguments. Note that at
|
1812
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1813
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1814
|
+
#
|
1815
|
+
# @param name [String]
|
1816
|
+
# Required. Resource name of the project and the triggeredJob, for example
|
1817
|
+
# `projects/dlp-test-project/jobTriggers/53234423`.
|
1818
|
+
#
|
1819
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1820
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::JobTrigger]
|
1821
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1822
|
+
#
|
1823
|
+
# @return [Google::Cloud::Dlp::V2::JobTrigger]
|
1824
|
+
#
|
1825
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1826
|
+
#
|
1827
|
+
def get_job_trigger request, options = nil
|
1828
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1829
|
+
|
1830
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::GetJobTriggerRequest
|
1831
|
+
|
1832
|
+
# Converts hash and nil to an options object
|
1833
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1834
|
+
|
1835
|
+
# Customize the options with defaults
|
1836
|
+
metadata = @config.rpcs.get_job_trigger.metadata.to_h
|
1837
|
+
|
1838
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1839
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1840
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1841
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1842
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1843
|
+
|
1844
|
+
header_params = {
|
1845
|
+
"name" => request.name
|
1846
|
+
}
|
1847
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1848
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1849
|
+
|
1850
|
+
options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout,
|
1851
|
+
metadata: metadata,
|
1852
|
+
retry_policy: @config.rpcs.get_job_trigger.retry_policy
|
1853
|
+
options.apply_defaults metadata: @config.metadata,
|
1854
|
+
retry_policy: @config.retry_policy
|
1855
|
+
|
1856
|
+
@dlp_service_stub.call_rpc :get_job_trigger, request, options: options do |response, operation|
|
1857
|
+
yield response, operation if block_given?
|
1858
|
+
return response
|
1859
|
+
end
|
1860
|
+
rescue GRPC::BadStatus => e
|
1861
|
+
raise Google::Cloud::Error.from_error(e)
|
1862
|
+
end
|
1863
|
+
|
1864
|
+
##
|
1865
|
+
# Lists job triggers.
|
1866
|
+
# See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
|
1867
|
+
#
|
1868
|
+
# @overload list_job_triggers(request, options = nil)
|
1869
|
+
# Pass arguments to `list_job_triggers` via a request object, either of type
|
1870
|
+
# {Google::Cloud::Dlp::V2::ListJobTriggersRequest} or an equivalent Hash.
|
1871
|
+
#
|
1872
|
+
# @param request [Google::Cloud::Dlp::V2::ListJobTriggersRequest, Hash]
|
1873
|
+
# A request object representing the call parameters. Required. To specify no
|
1874
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1875
|
+
# @param options [Gapic::CallOptions, Hash]
|
1876
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1877
|
+
#
|
1878
|
+
# @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, location_id: nil)
|
1879
|
+
# Pass arguments to `list_job_triggers` via keyword arguments. Note that at
|
1880
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1881
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1882
|
+
#
|
1883
|
+
# @param parent [String]
|
1884
|
+
# Required. The parent resource name, for example `projects/my-project-id`.
|
1885
|
+
# @param page_token [String]
|
1886
|
+
# Page token to continue retrieval. Comes from previous call
|
1887
|
+
# to ListJobTriggers. `order_by` field must not
|
1888
|
+
# change for subsequent calls.
|
1889
|
+
# @param page_size [Integer]
|
1890
|
+
# Size of the page, can be limited by a server.
|
1891
|
+
# @param order_by [String]
|
1892
|
+
# Comma separated list of triggeredJob fields to order by,
|
1893
|
+
# followed by `asc` or `desc` postfix. This list is case-insensitive,
|
1894
|
+
# default sorting order is ascending, redundant space characters are
|
1895
|
+
# insignificant.
|
1896
|
+
#
|
1897
|
+
# Example: `name asc,update_time, create_time desc`
|
1898
|
+
#
|
1899
|
+
# Supported fields are:
|
1900
|
+
#
|
1901
|
+
# - `create_time`: corresponds to time the JobTrigger was created.
|
1902
|
+
# - `update_time`: corresponds to time the JobTrigger was last updated.
|
1903
|
+
# - `last_run_time`: corresponds to the last time the JobTrigger ran.
|
1904
|
+
# - `name`: corresponds to JobTrigger's name.
|
1905
|
+
# - `display_name`: corresponds to JobTrigger's display name.
|
1906
|
+
# - `status`: corresponds to JobTrigger's status.
|
1907
|
+
# @param filter [String]
|
1908
|
+
# Allows filtering.
|
1909
|
+
#
|
1910
|
+
# Supported syntax:
|
1911
|
+
#
|
1912
|
+
# * Filter expressions are made up of one or more restrictions.
|
1913
|
+
# * Restrictions can be combined by `AND` or `OR` logical operators. A
|
1914
|
+
# sequence of restrictions implicitly uses `AND`.
|
1915
|
+
# * A restriction has the form of `{field} {operator} {value}`.
|
1916
|
+
# * Supported fields/values for inspect jobs:
|
1917
|
+
# - `status` - HEALTHY|PAUSED|CANCELLED
|
1918
|
+
# - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
|
1919
|
+
# - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
|
1920
|
+
# quotation marks. Nanoseconds are ignored.
|
1921
|
+
# - 'error_count' - Number of errors that have occurred while running.
|
1922
|
+
# * The operator must be `=` or `!=` for status and inspected_storage.
|
1923
|
+
#
|
1924
|
+
# Examples:
|
1925
|
+
#
|
1926
|
+
# * inspected_storage = cloud_storage AND status = HEALTHY
|
1927
|
+
# * inspected_storage = cloud_storage OR inspected_storage = bigquery
|
1928
|
+
# * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
|
1929
|
+
# * last_run_time > \"2017-12-12T00:00:00+00:00\"
|
1930
|
+
#
|
1931
|
+
# The length of this field should be no more than 500 characters.
|
1932
|
+
# @param location_id [String]
|
1933
|
+
# The geographic location where job triggers will be retrieved from.
|
1934
|
+
# Use `-` for all locations. Reserved for future extensions.
|
1935
|
+
#
|
1936
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1937
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::JobTrigger>]
|
1938
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1939
|
+
#
|
1940
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::JobTrigger>]
|
1941
|
+
#
|
1942
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1943
|
+
#
|
1944
|
+
def list_job_triggers request, options = nil
|
1945
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1946
|
+
|
1947
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListJobTriggersRequest
|
1948
|
+
|
1949
|
+
# Converts hash and nil to an options object
|
1950
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1951
|
+
|
1952
|
+
# Customize the options with defaults
|
1953
|
+
metadata = @config.rpcs.list_job_triggers.metadata.to_h
|
1954
|
+
|
1955
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1956
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1957
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1958
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1959
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1960
|
+
|
1961
|
+
header_params = {
|
1962
|
+
"parent" => request.parent
|
1963
|
+
}
|
1964
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1965
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1966
|
+
|
1967
|
+
options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout,
|
1968
|
+
metadata: metadata,
|
1969
|
+
retry_policy: @config.rpcs.list_job_triggers.retry_policy
|
1970
|
+
options.apply_defaults metadata: @config.metadata,
|
1971
|
+
retry_policy: @config.retry_policy
|
1972
|
+
|
1973
|
+
@dlp_service_stub.call_rpc :list_job_triggers, request, options: options do |response, operation|
|
1974
|
+
response = Gapic::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, request, response, operation, options
|
1975
|
+
yield response, operation if block_given?
|
1976
|
+
return response
|
1977
|
+
end
|
1978
|
+
rescue GRPC::BadStatus => e
|
1979
|
+
raise Google::Cloud::Error.from_error(e)
|
1980
|
+
end
|
1981
|
+
|
1982
|
+
##
|
1983
|
+
# Deletes a job trigger.
|
1984
|
+
# See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
|
1985
|
+
#
|
1986
|
+
# @overload delete_job_trigger(request, options = nil)
|
1987
|
+
# Pass arguments to `delete_job_trigger` via a request object, either of type
|
1988
|
+
# {Google::Cloud::Dlp::V2::DeleteJobTriggerRequest} or an equivalent Hash.
|
1989
|
+
#
|
1990
|
+
# @param request [Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, Hash]
|
1991
|
+
# A request object representing the call parameters. Required. To specify no
|
1992
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1993
|
+
# @param options [Gapic::CallOptions, Hash]
|
1994
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1995
|
+
#
|
1996
|
+
# @overload delete_job_trigger(name: nil)
|
1997
|
+
# Pass arguments to `delete_job_trigger` via keyword arguments. Note that at
|
1998
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1999
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2000
|
+
#
|
2001
|
+
# @param name [String]
|
2002
|
+
# Required. Resource name of the project and the triggeredJob, for example
|
2003
|
+
# `projects/dlp-test-project/jobTriggers/53234423`.
|
2004
|
+
#
|
2005
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2006
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
2007
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2008
|
+
#
|
2009
|
+
# @return [Google::Protobuf::Empty]
|
2010
|
+
#
|
2011
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2012
|
+
#
|
2013
|
+
def delete_job_trigger request, options = nil
|
2014
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2015
|
+
|
2016
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeleteJobTriggerRequest
|
2017
|
+
|
2018
|
+
# Converts hash and nil to an options object
|
2019
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2020
|
+
|
2021
|
+
# Customize the options with defaults
|
2022
|
+
metadata = @config.rpcs.delete_job_trigger.metadata.to_h
|
2023
|
+
|
2024
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2025
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2026
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2027
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2028
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2029
|
+
|
2030
|
+
header_params = {
|
2031
|
+
"name" => request.name
|
2032
|
+
}
|
2033
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2034
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2035
|
+
|
2036
|
+
options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout,
|
2037
|
+
metadata: metadata,
|
2038
|
+
retry_policy: @config.rpcs.delete_job_trigger.retry_policy
|
2039
|
+
options.apply_defaults metadata: @config.metadata,
|
2040
|
+
retry_policy: @config.retry_policy
|
2041
|
+
|
2042
|
+
@dlp_service_stub.call_rpc :delete_job_trigger, request, options: options do |response, operation|
|
2043
|
+
yield response, operation if block_given?
|
2044
|
+
return response
|
2045
|
+
end
|
2046
|
+
rescue GRPC::BadStatus => e
|
2047
|
+
raise Google::Cloud::Error.from_error(e)
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
##
|
2051
|
+
# Activate a job trigger. Causes the immediate execute of a trigger
|
2052
|
+
# instead of waiting on the trigger event to occur.
|
2053
|
+
#
|
2054
|
+
# @overload activate_job_trigger(request, options = nil)
|
2055
|
+
# Pass arguments to `activate_job_trigger` via a request object, either of type
|
2056
|
+
# {Google::Cloud::Dlp::V2::ActivateJobTriggerRequest} or an equivalent Hash.
|
2057
|
+
#
|
2058
|
+
# @param request [Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, Hash]
|
2059
|
+
# A request object representing the call parameters. Required. To specify no
|
2060
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2061
|
+
# @param options [Gapic::CallOptions, Hash]
|
2062
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2063
|
+
#
|
2064
|
+
# @overload activate_job_trigger(name: nil)
|
2065
|
+
# Pass arguments to `activate_job_trigger` via keyword arguments. Note that at
|
2066
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2067
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2068
|
+
#
|
2069
|
+
# @param name [String]
|
2070
|
+
# Required. Resource name of the trigger to activate, for example
|
2071
|
+
# `projects/dlp-test-project/jobTriggers/53234423`.
|
2072
|
+
#
|
2073
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2074
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DlpJob]
|
2075
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2076
|
+
#
|
2077
|
+
# @return [Google::Cloud::Dlp::V2::DlpJob]
|
2078
|
+
#
|
2079
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2080
|
+
#
|
2081
|
+
def activate_job_trigger request, options = nil
|
2082
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2083
|
+
|
2084
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ActivateJobTriggerRequest
|
2085
|
+
|
2086
|
+
# Converts hash and nil to an options object
|
2087
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2088
|
+
|
2089
|
+
# Customize the options with defaults
|
2090
|
+
metadata = @config.rpcs.activate_job_trigger.metadata.to_h
|
2091
|
+
|
2092
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2093
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2094
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2095
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2096
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2097
|
+
|
2098
|
+
header_params = {
|
2099
|
+
"name" => request.name
|
2100
|
+
}
|
2101
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2102
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2103
|
+
|
2104
|
+
options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout,
|
2105
|
+
metadata: metadata,
|
2106
|
+
retry_policy: @config.rpcs.activate_job_trigger.retry_policy
|
2107
|
+
options.apply_defaults metadata: @config.metadata,
|
2108
|
+
retry_policy: @config.retry_policy
|
2109
|
+
|
2110
|
+
@dlp_service_stub.call_rpc :activate_job_trigger, request, options: options do |response, operation|
|
2111
|
+
yield response, operation if block_given?
|
2112
|
+
return response
|
2113
|
+
end
|
2114
|
+
rescue GRPC::BadStatus => e
|
2115
|
+
raise Google::Cloud::Error.from_error(e)
|
2116
|
+
end
|
2117
|
+
|
2118
|
+
##
|
2119
|
+
# Creates a new job to inspect storage or calculate risk metrics.
|
2120
|
+
# See https://cloud.google.com/dlp/docs/inspecting-storage and
|
2121
|
+
# https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
|
2122
|
+
#
|
2123
|
+
# When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
|
2124
|
+
# system will automatically choose what detectors to run. By default this may
|
2125
|
+
# be all types, but may change over time as detectors are updated.
|
2126
|
+
#
|
2127
|
+
# @overload create_dlp_job(request, options = nil)
|
2128
|
+
# Pass arguments to `create_dlp_job` via a request object, either of type
|
2129
|
+
# {Google::Cloud::Dlp::V2::CreateDlpJobRequest} or an equivalent Hash.
|
2130
|
+
#
|
2131
|
+
# @param request [Google::Cloud::Dlp::V2::CreateDlpJobRequest, Hash]
|
2132
|
+
# A request object representing the call parameters. Required. To specify no
|
2133
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2134
|
+
# @param options [Gapic::CallOptions, Hash]
|
2135
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2136
|
+
#
|
2137
|
+
# @overload create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil)
|
2138
|
+
# Pass arguments to `create_dlp_job` via keyword arguments. Note that at
|
2139
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2140
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2141
|
+
#
|
2142
|
+
# @param parent [String]
|
2143
|
+
# Required. The parent resource name, for example projects/my-project-id.
|
2144
|
+
# @param inspect_job [Google::Cloud::Dlp::V2::InspectJobConfig, Hash]
|
2145
|
+
# Set to control what and how to inspect.
|
2146
|
+
# @param risk_job [Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, Hash]
|
2147
|
+
# Set to choose what metric to calculate.
|
2148
|
+
# @param job_id [String]
|
2149
|
+
# The job id can contain uppercase and lowercase letters,
|
2150
|
+
# numbers, and hyphens; that is, it must match the regular
|
2151
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2152
|
+
# characters. Can be empty to allow the system to generate one.
|
2153
|
+
# @param location_id [String]
|
2154
|
+
# The geographic location to store and process the job. Reserved for
|
2155
|
+
# future extensions.
|
2156
|
+
#
|
2157
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2158
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DlpJob]
|
2159
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2160
|
+
#
|
2161
|
+
# @return [Google::Cloud::Dlp::V2::DlpJob]
|
2162
|
+
#
|
2163
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2164
|
+
#
|
2165
|
+
def create_dlp_job request, options = nil
|
2166
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2167
|
+
|
2168
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CreateDlpJobRequest
|
2169
|
+
|
2170
|
+
# Converts hash and nil to an options object
|
2171
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2172
|
+
|
2173
|
+
# Customize the options with defaults
|
2174
|
+
metadata = @config.rpcs.create_dlp_job.metadata.to_h
|
2175
|
+
|
2176
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2177
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2178
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2179
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2180
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2181
|
+
|
2182
|
+
header_params = {
|
2183
|
+
"parent" => request.parent
|
2184
|
+
}
|
2185
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2186
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2187
|
+
|
2188
|
+
options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout,
|
2189
|
+
metadata: metadata,
|
2190
|
+
retry_policy: @config.rpcs.create_dlp_job.retry_policy
|
2191
|
+
options.apply_defaults metadata: @config.metadata,
|
2192
|
+
retry_policy: @config.retry_policy
|
2193
|
+
|
2194
|
+
@dlp_service_stub.call_rpc :create_dlp_job, request, options: options do |response, operation|
|
2195
|
+
yield response, operation if block_given?
|
2196
|
+
return response
|
2197
|
+
end
|
2198
|
+
rescue GRPC::BadStatus => e
|
2199
|
+
raise Google::Cloud::Error.from_error(e)
|
2200
|
+
end
|
2201
|
+
|
2202
|
+
##
|
2203
|
+
# Lists DlpJobs that match the specified filter in the request.
|
2204
|
+
# See https://cloud.google.com/dlp/docs/inspecting-storage and
|
2205
|
+
# https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
|
2206
|
+
#
|
2207
|
+
# @overload list_dlp_jobs(request, options = nil)
|
2208
|
+
# Pass arguments to `list_dlp_jobs` via a request object, either of type
|
2209
|
+
# {Google::Cloud::Dlp::V2::ListDlpJobsRequest} or an equivalent Hash.
|
2210
|
+
#
|
2211
|
+
# @param request [Google::Cloud::Dlp::V2::ListDlpJobsRequest, Hash]
|
2212
|
+
# A request object representing the call parameters. Required. To specify no
|
2213
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2214
|
+
# @param options [Gapic::CallOptions, Hash]
|
2215
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2216
|
+
#
|
2217
|
+
# @overload list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil)
|
2218
|
+
# Pass arguments to `list_dlp_jobs` via keyword arguments. Note that at
|
2219
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2220
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2221
|
+
#
|
2222
|
+
# @param parent [String]
|
2223
|
+
# Required. The parent resource name, for example projects/my-project-id.
|
2224
|
+
# @param filter [String]
|
2225
|
+
# Allows filtering.
|
2226
|
+
#
|
2227
|
+
# Supported syntax:
|
2228
|
+
#
|
2229
|
+
# * Filter expressions are made up of one or more restrictions.
|
2230
|
+
# * Restrictions can be combined by `AND` or `OR` logical operators. A
|
2231
|
+
# sequence of restrictions implicitly uses `AND`.
|
2232
|
+
# * A restriction has the form of `{field} {operator} {value}`.
|
2233
|
+
# * Supported fields/values for inspect jobs:
|
2234
|
+
# - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
|
2235
|
+
# - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
|
2236
|
+
# - `trigger_name` - The resource name of the trigger that created job.
|
2237
|
+
# - 'end_time` - Corresponds to time the job finished.
|
2238
|
+
# - 'start_time` - Corresponds to time the job finished.
|
2239
|
+
# * Supported fields for risk analysis jobs:
|
2240
|
+
# - `state` - RUNNING|CANCELED|FINISHED|FAILED
|
2241
|
+
# - 'end_time` - Corresponds to time the job finished.
|
2242
|
+
# - 'start_time` - Corresponds to time the job finished.
|
2243
|
+
# * The operator must be `=` or `!=`.
|
2244
|
+
#
|
2245
|
+
# Examples:
|
2246
|
+
#
|
2247
|
+
# * inspected_storage = cloud_storage AND state = done
|
2248
|
+
# * inspected_storage = cloud_storage OR inspected_storage = bigquery
|
2249
|
+
# * inspected_storage = cloud_storage AND (state = done OR state = canceled)
|
2250
|
+
# * end_time > \"2017-12-12T00:00:00+00:00\"
|
2251
|
+
#
|
2252
|
+
# The length of this field should be no more than 500 characters.
|
2253
|
+
# @param page_size [Integer]
|
2254
|
+
# The standard list page size.
|
2255
|
+
# @param page_token [String]
|
2256
|
+
# The standard list page token.
|
2257
|
+
# @param type [Google::Cloud::Dlp::V2::DlpJobType]
|
2258
|
+
# The type of job. Defaults to `DlpJobType.INSPECT`
|
2259
|
+
# @param order_by [String]
|
2260
|
+
# Comma separated list of fields to order by,
|
2261
|
+
# followed by `asc` or `desc` postfix. This list is case-insensitive,
|
2262
|
+
# default sorting order is ascending, redundant space characters are
|
2263
|
+
# insignificant.
|
2264
|
+
#
|
2265
|
+
# Example: `name asc, end_time asc, create_time desc`
|
2266
|
+
#
|
2267
|
+
# Supported fields are:
|
2268
|
+
#
|
2269
|
+
# - `create_time`: corresponds to time the job was created.
|
2270
|
+
# - `end_time`: corresponds to time the job ended.
|
2271
|
+
# - `name`: corresponds to job's name.
|
2272
|
+
# - `state`: corresponds to `state`
|
2273
|
+
# @param location_id [String]
|
2274
|
+
# The geographic location where jobs will be retrieved from.
|
2275
|
+
# Use `-` for all locations. Reserved for future extensions.
|
2276
|
+
#
|
2277
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2278
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::DlpJob>]
|
2279
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2280
|
+
#
|
2281
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::DlpJob>]
|
2282
|
+
#
|
2283
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2284
|
+
#
|
2285
|
+
def list_dlp_jobs request, options = nil
|
2286
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2287
|
+
|
2288
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListDlpJobsRequest
|
2289
|
+
|
2290
|
+
# Converts hash and nil to an options object
|
2291
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2292
|
+
|
2293
|
+
# Customize the options with defaults
|
2294
|
+
metadata = @config.rpcs.list_dlp_jobs.metadata.to_h
|
2295
|
+
|
2296
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2297
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2298
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2299
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2300
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2301
|
+
|
2302
|
+
header_params = {
|
2303
|
+
"parent" => request.parent
|
2304
|
+
}
|
2305
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2306
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2307
|
+
|
2308
|
+
options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout,
|
2309
|
+
metadata: metadata,
|
2310
|
+
retry_policy: @config.rpcs.list_dlp_jobs.retry_policy
|
2311
|
+
options.apply_defaults metadata: @config.metadata,
|
2312
|
+
retry_policy: @config.retry_policy
|
2313
|
+
|
2314
|
+
@dlp_service_stub.call_rpc :list_dlp_jobs, request, options: options do |response, operation|
|
2315
|
+
response = Gapic::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, request, response, operation, options
|
2316
|
+
yield response, operation if block_given?
|
2317
|
+
return response
|
2318
|
+
end
|
2319
|
+
rescue GRPC::BadStatus => e
|
2320
|
+
raise Google::Cloud::Error.from_error(e)
|
2321
|
+
end
|
2322
|
+
|
2323
|
+
##
|
2324
|
+
# Gets the latest state of a long-running DlpJob.
|
2325
|
+
# See https://cloud.google.com/dlp/docs/inspecting-storage and
|
2326
|
+
# https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
|
2327
|
+
#
|
2328
|
+
# @overload get_dlp_job(request, options = nil)
|
2329
|
+
# Pass arguments to `get_dlp_job` via a request object, either of type
|
2330
|
+
# {Google::Cloud::Dlp::V2::GetDlpJobRequest} or an equivalent Hash.
|
2331
|
+
#
|
2332
|
+
# @param request [Google::Cloud::Dlp::V2::GetDlpJobRequest, Hash]
|
2333
|
+
# A request object representing the call parameters. Required. To specify no
|
2334
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2335
|
+
# @param options [Gapic::CallOptions, Hash]
|
2336
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2337
|
+
#
|
2338
|
+
# @overload get_dlp_job(name: nil)
|
2339
|
+
# Pass arguments to `get_dlp_job` via keyword arguments. Note that at
|
2340
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2341
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2342
|
+
#
|
2343
|
+
# @param name [String]
|
2344
|
+
# Required. The name of the DlpJob resource.
|
2345
|
+
#
|
2346
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2347
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::DlpJob]
|
2348
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2349
|
+
#
|
2350
|
+
# @return [Google::Cloud::Dlp::V2::DlpJob]
|
2351
|
+
#
|
2352
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2353
|
+
#
|
2354
|
+
def get_dlp_job request, options = nil
|
2355
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2356
|
+
|
2357
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::GetDlpJobRequest
|
2358
|
+
|
2359
|
+
# Converts hash and nil to an options object
|
2360
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2361
|
+
|
2362
|
+
# Customize the options with defaults
|
2363
|
+
metadata = @config.rpcs.get_dlp_job.metadata.to_h
|
2364
|
+
|
2365
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2366
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2367
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2368
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2369
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2370
|
+
|
2371
|
+
header_params = {
|
2372
|
+
"name" => request.name
|
2373
|
+
}
|
2374
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2375
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2376
|
+
|
2377
|
+
options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout,
|
2378
|
+
metadata: metadata,
|
2379
|
+
retry_policy: @config.rpcs.get_dlp_job.retry_policy
|
2380
|
+
options.apply_defaults metadata: @config.metadata,
|
2381
|
+
retry_policy: @config.retry_policy
|
2382
|
+
|
2383
|
+
@dlp_service_stub.call_rpc :get_dlp_job, request, options: options do |response, operation|
|
2384
|
+
yield response, operation if block_given?
|
2385
|
+
return response
|
2386
|
+
end
|
2387
|
+
rescue GRPC::BadStatus => e
|
2388
|
+
raise Google::Cloud::Error.from_error(e)
|
2389
|
+
end
|
2390
|
+
|
2391
|
+
##
|
2392
|
+
# Deletes a long-running DlpJob. This method indicates that the client is
|
2393
|
+
# no longer interested in the DlpJob result. The job will be cancelled if
|
2394
|
+
# possible.
|
2395
|
+
# See https://cloud.google.com/dlp/docs/inspecting-storage and
|
2396
|
+
# https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
|
2397
|
+
#
|
2398
|
+
# @overload delete_dlp_job(request, options = nil)
|
2399
|
+
# Pass arguments to `delete_dlp_job` via a request object, either of type
|
2400
|
+
# {Google::Cloud::Dlp::V2::DeleteDlpJobRequest} or an equivalent Hash.
|
2401
|
+
#
|
2402
|
+
# @param request [Google::Cloud::Dlp::V2::DeleteDlpJobRequest, Hash]
|
2403
|
+
# A request object representing the call parameters. Required. To specify no
|
2404
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2405
|
+
# @param options [Gapic::CallOptions, Hash]
|
2406
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2407
|
+
#
|
2408
|
+
# @overload delete_dlp_job(name: nil)
|
2409
|
+
# Pass arguments to `delete_dlp_job` via keyword arguments. Note that at
|
2410
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2411
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2412
|
+
#
|
2413
|
+
# @param name [String]
|
2414
|
+
# Required. The name of the DlpJob resource to be deleted.
|
2415
|
+
#
|
2416
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2417
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
2418
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2419
|
+
#
|
2420
|
+
# @return [Google::Protobuf::Empty]
|
2421
|
+
#
|
2422
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2423
|
+
#
|
2424
|
+
def delete_dlp_job request, options = nil
|
2425
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2426
|
+
|
2427
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeleteDlpJobRequest
|
2428
|
+
|
2429
|
+
# Converts hash and nil to an options object
|
2430
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2431
|
+
|
2432
|
+
# Customize the options with defaults
|
2433
|
+
metadata = @config.rpcs.delete_dlp_job.metadata.to_h
|
2434
|
+
|
2435
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2436
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2437
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2438
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2439
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2440
|
+
|
2441
|
+
header_params = {
|
2442
|
+
"name" => request.name
|
2443
|
+
}
|
2444
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2445
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2446
|
+
|
2447
|
+
options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout,
|
2448
|
+
metadata: metadata,
|
2449
|
+
retry_policy: @config.rpcs.delete_dlp_job.retry_policy
|
2450
|
+
options.apply_defaults metadata: @config.metadata,
|
2451
|
+
retry_policy: @config.retry_policy
|
2452
|
+
|
2453
|
+
@dlp_service_stub.call_rpc :delete_dlp_job, request, options: options do |response, operation|
|
2454
|
+
yield response, operation if block_given?
|
2455
|
+
return response
|
2456
|
+
end
|
2457
|
+
rescue GRPC::BadStatus => e
|
2458
|
+
raise Google::Cloud::Error.from_error(e)
|
2459
|
+
end
|
2460
|
+
|
2461
|
+
##
|
2462
|
+
# Starts asynchronous cancellation on a long-running DlpJob. The server
|
2463
|
+
# makes a best effort to cancel the DlpJob, but success is not
|
2464
|
+
# guaranteed.
|
2465
|
+
# See https://cloud.google.com/dlp/docs/inspecting-storage and
|
2466
|
+
# https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
|
2467
|
+
#
|
2468
|
+
# @overload cancel_dlp_job(request, options = nil)
|
2469
|
+
# Pass arguments to `cancel_dlp_job` via a request object, either of type
|
2470
|
+
# {Google::Cloud::Dlp::V2::CancelDlpJobRequest} or an equivalent Hash.
|
2471
|
+
#
|
2472
|
+
# @param request [Google::Cloud::Dlp::V2::CancelDlpJobRequest, Hash]
|
2473
|
+
# A request object representing the call parameters. Required. To specify no
|
2474
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2475
|
+
# @param options [Gapic::CallOptions, Hash]
|
2476
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2477
|
+
#
|
2478
|
+
# @overload cancel_dlp_job(name: nil)
|
2479
|
+
# Pass arguments to `cancel_dlp_job` via keyword arguments. Note that at
|
2480
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2481
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2482
|
+
#
|
2483
|
+
# @param name [String]
|
2484
|
+
# Required. The name of the DlpJob resource to be cancelled.
|
2485
|
+
#
|
2486
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2487
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
2488
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2489
|
+
#
|
2490
|
+
# @return [Google::Protobuf::Empty]
|
2491
|
+
#
|
2492
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2493
|
+
#
|
2494
|
+
def cancel_dlp_job request, options = nil
|
2495
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2496
|
+
|
2497
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CancelDlpJobRequest
|
2498
|
+
|
2499
|
+
# Converts hash and nil to an options object
|
2500
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2501
|
+
|
2502
|
+
# Customize the options with defaults
|
2503
|
+
metadata = @config.rpcs.cancel_dlp_job.metadata.to_h
|
2504
|
+
|
2505
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2506
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2507
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2508
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2509
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2510
|
+
|
2511
|
+
header_params = {
|
2512
|
+
"name" => request.name
|
2513
|
+
}
|
2514
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2515
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2516
|
+
|
2517
|
+
options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout,
|
2518
|
+
metadata: metadata,
|
2519
|
+
retry_policy: @config.rpcs.cancel_dlp_job.retry_policy
|
2520
|
+
options.apply_defaults metadata: @config.metadata,
|
2521
|
+
retry_policy: @config.retry_policy
|
2522
|
+
|
2523
|
+
@dlp_service_stub.call_rpc :cancel_dlp_job, request, options: options do |response, operation|
|
2524
|
+
yield response, operation if block_given?
|
2525
|
+
return response
|
2526
|
+
end
|
2527
|
+
rescue GRPC::BadStatus => e
|
2528
|
+
raise Google::Cloud::Error.from_error(e)
|
2529
|
+
end
|
2530
|
+
|
2531
|
+
##
|
2532
|
+
# Creates a pre-built stored infoType to be used for inspection.
|
2533
|
+
# See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
|
2534
|
+
# learn more.
|
2535
|
+
#
|
2536
|
+
# @overload create_stored_info_type(request, options = nil)
|
2537
|
+
# Pass arguments to `create_stored_info_type` via a request object, either of type
|
2538
|
+
# {Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest} or an equivalent Hash.
|
2539
|
+
#
|
2540
|
+
# @param request [Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, Hash]
|
2541
|
+
# A request object representing the call parameters. Required. To specify no
|
2542
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2543
|
+
# @param options [Gapic::CallOptions, Hash]
|
2544
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2545
|
+
#
|
2546
|
+
# @overload create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil)
|
2547
|
+
# Pass arguments to `create_stored_info_type` via keyword arguments. Note that at
|
2548
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2549
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2550
|
+
#
|
2551
|
+
# @param parent [String]
|
2552
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
2553
|
+
# organizations/my-org-id.
|
2554
|
+
# @param config [Google::Cloud::Dlp::V2::StoredInfoTypeConfig, Hash]
|
2555
|
+
# Required. Configuration of the storedInfoType to create.
|
2556
|
+
# @param stored_info_type_id [String]
|
2557
|
+
# The storedInfoType ID can contain uppercase and lowercase letters,
|
2558
|
+
# numbers, and hyphens; that is, it must match the regular
|
2559
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2560
|
+
# characters. Can be empty to allow the system to generate one.
|
2561
|
+
# @param location_id [String]
|
2562
|
+
# The geographic location to store the stored infoType. Reserved for
|
2563
|
+
# future extensions.
|
2564
|
+
#
|
2565
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2566
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::StoredInfoType]
|
2567
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2568
|
+
#
|
2569
|
+
# @return [Google::Cloud::Dlp::V2::StoredInfoType]
|
2570
|
+
#
|
2571
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2572
|
+
#
|
2573
|
+
def create_stored_info_type request, options = nil
|
2574
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2575
|
+
|
2576
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest
|
2577
|
+
|
2578
|
+
# Converts hash and nil to an options object
|
2579
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2580
|
+
|
2581
|
+
# Customize the options with defaults
|
2582
|
+
metadata = @config.rpcs.create_stored_info_type.metadata.to_h
|
2583
|
+
|
2584
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2585
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2586
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2587
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2588
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2589
|
+
|
2590
|
+
header_params = {
|
2591
|
+
"parent" => request.parent
|
2592
|
+
}
|
2593
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2594
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2595
|
+
|
2596
|
+
options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout,
|
2597
|
+
metadata: metadata,
|
2598
|
+
retry_policy: @config.rpcs.create_stored_info_type.retry_policy
|
2599
|
+
options.apply_defaults metadata: @config.metadata,
|
2600
|
+
retry_policy: @config.retry_policy
|
2601
|
+
|
2602
|
+
@dlp_service_stub.call_rpc :create_stored_info_type, request, options: options do |response, operation|
|
2603
|
+
yield response, operation if block_given?
|
2604
|
+
return response
|
2605
|
+
end
|
2606
|
+
rescue GRPC::BadStatus => e
|
2607
|
+
raise Google::Cloud::Error.from_error(e)
|
2608
|
+
end
|
2609
|
+
|
2610
|
+
##
|
2611
|
+
# Updates the stored infoType by creating a new version. The existing version
|
2612
|
+
# will continue to be used until the new version is ready.
|
2613
|
+
# See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
|
2614
|
+
# learn more.
|
2615
|
+
#
|
2616
|
+
# @overload update_stored_info_type(request, options = nil)
|
2617
|
+
# Pass arguments to `update_stored_info_type` via a request object, either of type
|
2618
|
+
# {Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest} or an equivalent Hash.
|
2619
|
+
#
|
2620
|
+
# @param request [Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, Hash]
|
2621
|
+
# A request object representing the call parameters. Required. To specify no
|
2622
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2623
|
+
# @param options [Gapic::CallOptions, Hash]
|
2624
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2625
|
+
#
|
2626
|
+
# @overload update_stored_info_type(name: nil, config: nil, update_mask: nil)
|
2627
|
+
# Pass arguments to `update_stored_info_type` via keyword arguments. Note that at
|
2628
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2629
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2630
|
+
#
|
2631
|
+
# @param name [String]
|
2632
|
+
# Required. Resource name of organization and storedInfoType to be updated,
|
2633
|
+
# for example `organizations/433245324/storedInfoTypes/432452342` or
|
2634
|
+
# projects/project-id/storedInfoTypes/432452342.
|
2635
|
+
# @param config [Google::Cloud::Dlp::V2::StoredInfoTypeConfig, Hash]
|
2636
|
+
# Updated configuration for the storedInfoType. If not provided, a new
|
2637
|
+
# version of the storedInfoType will be created with the existing
|
2638
|
+
# configuration.
|
2639
|
+
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
2640
|
+
# Mask to control which fields get updated.
|
2641
|
+
#
|
2642
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2643
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::StoredInfoType]
|
2644
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2645
|
+
#
|
2646
|
+
# @return [Google::Cloud::Dlp::V2::StoredInfoType]
|
2647
|
+
#
|
2648
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2649
|
+
#
|
2650
|
+
def update_stored_info_type request, options = nil
|
2651
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2652
|
+
|
2653
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest
|
2654
|
+
|
2655
|
+
# Converts hash and nil to an options object
|
2656
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2657
|
+
|
2658
|
+
# Customize the options with defaults
|
2659
|
+
metadata = @config.rpcs.update_stored_info_type.metadata.to_h
|
2660
|
+
|
2661
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2662
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2663
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2664
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2665
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2666
|
+
|
2667
|
+
header_params = {
|
2668
|
+
"name" => request.name
|
2669
|
+
}
|
2670
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2671
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2672
|
+
|
2673
|
+
options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout,
|
2674
|
+
metadata: metadata,
|
2675
|
+
retry_policy: @config.rpcs.update_stored_info_type.retry_policy
|
2676
|
+
options.apply_defaults metadata: @config.metadata,
|
2677
|
+
retry_policy: @config.retry_policy
|
2678
|
+
|
2679
|
+
@dlp_service_stub.call_rpc :update_stored_info_type, request, options: options do |response, operation|
|
2680
|
+
yield response, operation if block_given?
|
2681
|
+
return response
|
2682
|
+
end
|
2683
|
+
rescue GRPC::BadStatus => e
|
2684
|
+
raise Google::Cloud::Error.from_error(e)
|
2685
|
+
end
|
2686
|
+
|
2687
|
+
##
|
2688
|
+
# Gets a stored infoType.
|
2689
|
+
# See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
|
2690
|
+
# learn more.
|
2691
|
+
#
|
2692
|
+
# @overload get_stored_info_type(request, options = nil)
|
2693
|
+
# Pass arguments to `get_stored_info_type` via a request object, either of type
|
2694
|
+
# {Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest} or an equivalent Hash.
|
2695
|
+
#
|
2696
|
+
# @param request [Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, Hash]
|
2697
|
+
# A request object representing the call parameters. Required. To specify no
|
2698
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2699
|
+
# @param options [Gapic::CallOptions, Hash]
|
2700
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2701
|
+
#
|
2702
|
+
# @overload get_stored_info_type(name: nil)
|
2703
|
+
# Pass arguments to `get_stored_info_type` via keyword arguments. Note that at
|
2704
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2705
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2706
|
+
#
|
2707
|
+
# @param name [String]
|
2708
|
+
# Required. Resource name of the organization and storedInfoType to be read,
|
2709
|
+
# for example `organizations/433245324/storedInfoTypes/432452342` or
|
2710
|
+
# projects/project-id/storedInfoTypes/432452342.
|
2711
|
+
#
|
2712
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2713
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::StoredInfoType]
|
2714
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2715
|
+
#
|
2716
|
+
# @return [Google::Cloud::Dlp::V2::StoredInfoType]
|
2717
|
+
#
|
2718
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2719
|
+
#
|
2720
|
+
def get_stored_info_type request, options = nil
|
2721
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2722
|
+
|
2723
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest
|
2724
|
+
|
2725
|
+
# Converts hash and nil to an options object
|
2726
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2727
|
+
|
2728
|
+
# Customize the options with defaults
|
2729
|
+
metadata = @config.rpcs.get_stored_info_type.metadata.to_h
|
2730
|
+
|
2731
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2732
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2733
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2734
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2735
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2736
|
+
|
2737
|
+
header_params = {
|
2738
|
+
"name" => request.name
|
2739
|
+
}
|
2740
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2741
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2742
|
+
|
2743
|
+
options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout,
|
2744
|
+
metadata: metadata,
|
2745
|
+
retry_policy: @config.rpcs.get_stored_info_type.retry_policy
|
2746
|
+
options.apply_defaults metadata: @config.metadata,
|
2747
|
+
retry_policy: @config.retry_policy
|
2748
|
+
|
2749
|
+
@dlp_service_stub.call_rpc :get_stored_info_type, request, options: options do |response, operation|
|
2750
|
+
yield response, operation if block_given?
|
2751
|
+
return response
|
2752
|
+
end
|
2753
|
+
rescue GRPC::BadStatus => e
|
2754
|
+
raise Google::Cloud::Error.from_error(e)
|
2755
|
+
end
|
2756
|
+
|
2757
|
+
##
|
2758
|
+
# Lists stored infoTypes.
|
2759
|
+
# See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
|
2760
|
+
# learn more.
|
2761
|
+
#
|
2762
|
+
# @overload list_stored_info_types(request, options = nil)
|
2763
|
+
# Pass arguments to `list_stored_info_types` via a request object, either of type
|
2764
|
+
# {Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest} or an equivalent Hash.
|
2765
|
+
#
|
2766
|
+
# @param request [Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, Hash]
|
2767
|
+
# A request object representing the call parameters. Required. To specify no
|
2768
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2769
|
+
# @param options [Gapic::CallOptions, Hash]
|
2770
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2771
|
+
#
|
2772
|
+
# @overload list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil)
|
2773
|
+
# Pass arguments to `list_stored_info_types` via keyword arguments. Note that at
|
2774
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2775
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2776
|
+
#
|
2777
|
+
# @param parent [String]
|
2778
|
+
# Required. The parent resource name, for example projects/my-project-id or
|
2779
|
+
# organizations/my-org-id.
|
2780
|
+
# @param page_token [String]
|
2781
|
+
# Page token to continue retrieval. Comes from previous call
|
2782
|
+
# to `ListStoredInfoTypes`.
|
2783
|
+
# @param page_size [Integer]
|
2784
|
+
# Size of the page, can be limited by server. If zero server returns
|
2785
|
+
# a page of max size 100.
|
2786
|
+
# @param order_by [String]
|
2787
|
+
# Comma separated list of fields to order by,
|
2788
|
+
# followed by `asc` or `desc` postfix. This list is case-insensitive,
|
2789
|
+
# default sorting order is ascending, redundant space characters are
|
2790
|
+
# insignificant.
|
2791
|
+
#
|
2792
|
+
# Example: `name asc, display_name, create_time desc`
|
2793
|
+
#
|
2794
|
+
# Supported fields are:
|
2795
|
+
#
|
2796
|
+
# - `create_time`: corresponds to time the most recent version of the
|
2797
|
+
# resource was created.
|
2798
|
+
# - `state`: corresponds to the state of the resource.
|
2799
|
+
# - `name`: corresponds to resource name.
|
2800
|
+
# - `display_name`: corresponds to info type's display name.
|
2801
|
+
# @param location_id [String]
|
2802
|
+
# The geographic location where stored infoTypes will be retrieved from.
|
2803
|
+
# Use `-` for all locations. Reserved for future extensions.
|
2804
|
+
#
|
2805
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2806
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::StoredInfoType>]
|
2807
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2808
|
+
#
|
2809
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Dlp::V2::StoredInfoType>]
|
2810
|
+
#
|
2811
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2812
|
+
#
|
2813
|
+
def list_stored_info_types request, options = nil
|
2814
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2815
|
+
|
2816
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest
|
2817
|
+
|
2818
|
+
# Converts hash and nil to an options object
|
2819
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2820
|
+
|
2821
|
+
# Customize the options with defaults
|
2822
|
+
metadata = @config.rpcs.list_stored_info_types.metadata.to_h
|
2823
|
+
|
2824
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2825
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2826
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2827
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2828
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2829
|
+
|
2830
|
+
header_params = {
|
2831
|
+
"parent" => request.parent
|
2832
|
+
}
|
2833
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2834
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2835
|
+
|
2836
|
+
options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout,
|
2837
|
+
metadata: metadata,
|
2838
|
+
retry_policy: @config.rpcs.list_stored_info_types.retry_policy
|
2839
|
+
options.apply_defaults metadata: @config.metadata,
|
2840
|
+
retry_policy: @config.retry_policy
|
2841
|
+
|
2842
|
+
@dlp_service_stub.call_rpc :list_stored_info_types, request, options: options do |response, operation|
|
2843
|
+
response = Gapic::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, request, response, operation, options
|
2844
|
+
yield response, operation if block_given?
|
2845
|
+
return response
|
2846
|
+
end
|
2847
|
+
rescue GRPC::BadStatus => e
|
2848
|
+
raise Google::Cloud::Error.from_error(e)
|
2849
|
+
end
|
2850
|
+
|
2851
|
+
##
|
2852
|
+
# Deletes a stored infoType.
|
2853
|
+
# See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
|
2854
|
+
# learn more.
|
2855
|
+
#
|
2856
|
+
# @overload delete_stored_info_type(request, options = nil)
|
2857
|
+
# Pass arguments to `delete_stored_info_type` via a request object, either of type
|
2858
|
+
# {Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest} or an equivalent Hash.
|
2859
|
+
#
|
2860
|
+
# @param request [Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, Hash]
|
2861
|
+
# A request object representing the call parameters. Required. To specify no
|
2862
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2863
|
+
# @param options [Gapic::CallOptions, Hash]
|
2864
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2865
|
+
#
|
2866
|
+
# @overload delete_stored_info_type(name: nil)
|
2867
|
+
# Pass arguments to `delete_stored_info_type` via keyword arguments. Note that at
|
2868
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2869
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2870
|
+
#
|
2871
|
+
# @param name [String]
|
2872
|
+
# Required. Resource name of the organization and storedInfoType to be
|
2873
|
+
# deleted, for example `organizations/433245324/storedInfoTypes/432452342` or
|
2874
|
+
# projects/project-id/storedInfoTypes/432452342.
|
2875
|
+
#
|
2876
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2877
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
2878
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2879
|
+
#
|
2880
|
+
# @return [Google::Protobuf::Empty]
|
2881
|
+
#
|
2882
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2883
|
+
#
|
2884
|
+
def delete_stored_info_type request, options = nil
|
2885
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2886
|
+
|
2887
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest
|
2888
|
+
|
2889
|
+
# Converts hash and nil to an options object
|
2890
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2891
|
+
|
2892
|
+
# Customize the options with defaults
|
2893
|
+
metadata = @config.rpcs.delete_stored_info_type.metadata.to_h
|
2894
|
+
|
2895
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2896
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2897
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2898
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2899
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2900
|
+
|
2901
|
+
header_params = {
|
2902
|
+
"name" => request.name
|
2903
|
+
}
|
2904
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2905
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2906
|
+
|
2907
|
+
options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout,
|
2908
|
+
metadata: metadata,
|
2909
|
+
retry_policy: @config.rpcs.delete_stored_info_type.retry_policy
|
2910
|
+
options.apply_defaults metadata: @config.metadata,
|
2911
|
+
retry_policy: @config.retry_policy
|
2912
|
+
|
2913
|
+
@dlp_service_stub.call_rpc :delete_stored_info_type, request, options: options do |response, operation|
|
2914
|
+
yield response, operation if block_given?
|
2915
|
+
return response
|
2916
|
+
end
|
2917
|
+
rescue GRPC::BadStatus => e
|
2918
|
+
raise Google::Cloud::Error.from_error(e)
|
2919
|
+
end
|
2920
|
+
|
2921
|
+
##
|
2922
|
+
# Inspect hybrid content and store findings to a job.
|
2923
|
+
# To review the findings inspect the job. Inspection will occur
|
2924
|
+
# asynchronously.
|
2925
|
+
# Early access feature is in a pre-release state and might change or have
|
2926
|
+
# limited support. For more information, see
|
2927
|
+
# https://cloud.google.com/products#product-launch-stages.
|
2928
|
+
#
|
2929
|
+
# @overload hybrid_inspect_dlp_job(request, options = nil)
|
2930
|
+
# Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type
|
2931
|
+
# {Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest} or an equivalent Hash.
|
2932
|
+
#
|
2933
|
+
# @param request [Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, Hash]
|
2934
|
+
# A request object representing the call parameters. Required. To specify no
|
2935
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2936
|
+
# @param options [Gapic::CallOptions, Hash]
|
2937
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2938
|
+
#
|
2939
|
+
# @overload hybrid_inspect_dlp_job(name: nil, hybrid_item: nil)
|
2940
|
+
# Pass arguments to `hybrid_inspect_dlp_job` via keyword arguments. Note that at
|
2941
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2942
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2943
|
+
#
|
2944
|
+
# @param name [String]
|
2945
|
+
# Required. Resource name of the job to execute a hybrid inspect on, for
|
2946
|
+
# example `projects/dlp-test-project/dlpJob/53234423`.
|
2947
|
+
# @param hybrid_item [Google::Cloud::Dlp::V2::HybridContentItem, Hash]
|
2948
|
+
# The item to inspect.
|
2949
|
+
#
|
2950
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2951
|
+
# @yieldparam response [Google::Cloud::Dlp::V2::HybridInspectResponse]
|
2952
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
2953
|
+
#
|
2954
|
+
# @return [Google::Cloud::Dlp::V2::HybridInspectResponse]
|
2955
|
+
#
|
2956
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
2957
|
+
#
|
2958
|
+
def hybrid_inspect_dlp_job request, options = nil
|
2959
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
2960
|
+
|
2961
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest
|
2962
|
+
|
2963
|
+
# Converts hash and nil to an options object
|
2964
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2965
|
+
|
2966
|
+
# Customize the options with defaults
|
2967
|
+
metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h
|
2968
|
+
|
2969
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2970
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
2971
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2972
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2973
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2974
|
+
|
2975
|
+
header_params = {
|
2976
|
+
"name" => request.name
|
2977
|
+
}
|
2978
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2979
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2980
|
+
|
2981
|
+
options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout,
|
2982
|
+
metadata: metadata,
|
2983
|
+
retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy
|
2984
|
+
options.apply_defaults metadata: @config.metadata,
|
2985
|
+
retry_policy: @config.retry_policy
|
2986
|
+
|
2987
|
+
@dlp_service_stub.call_rpc :hybrid_inspect_dlp_job, request, options: options do |response, operation|
|
2988
|
+
yield response, operation if block_given?
|
2989
|
+
return response
|
2990
|
+
end
|
2991
|
+
rescue GRPC::BadStatus => e
|
2992
|
+
raise Google::Cloud::Error.from_error(e)
|
2993
|
+
end
|
2994
|
+
|
2995
|
+
##
|
2996
|
+
# Finish a running hybrid DlpJob. Triggers the finalization steps and running
|
2997
|
+
# of any enabled actions that have not yet run.
|
2998
|
+
# Early access feature is in a pre-release state and might change or have
|
2999
|
+
# limited support. For more information, see
|
3000
|
+
# https://cloud.google.com/products#product-launch-stages.
|
3001
|
+
#
|
3002
|
+
# @overload finish_dlp_job(request, options = nil)
|
3003
|
+
# Pass arguments to `finish_dlp_job` via a request object, either of type
|
3004
|
+
# {Google::Cloud::Dlp::V2::FinishDlpJobRequest} or an equivalent Hash.
|
3005
|
+
#
|
3006
|
+
# @param request [Google::Cloud::Dlp::V2::FinishDlpJobRequest, Hash]
|
3007
|
+
# A request object representing the call parameters. Required. To specify no
|
3008
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3009
|
+
# @param options [Gapic::CallOptions, Hash]
|
3010
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3011
|
+
#
|
3012
|
+
# @overload finish_dlp_job(name: nil)
|
3013
|
+
# Pass arguments to `finish_dlp_job` via keyword arguments. Note that at
|
3014
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3015
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3016
|
+
#
|
3017
|
+
# @param name [String]
|
3018
|
+
# Required. The name of the DlpJob resource to be cancelled.
|
3019
|
+
#
|
3020
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3021
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
3022
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
3023
|
+
#
|
3024
|
+
# @return [Google::Protobuf::Empty]
|
3025
|
+
#
|
3026
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
3027
|
+
#
|
3028
|
+
def finish_dlp_job request, options = nil
|
3029
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
3030
|
+
|
3031
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dlp::V2::FinishDlpJobRequest
|
3032
|
+
|
3033
|
+
# Converts hash and nil to an options object
|
3034
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3035
|
+
|
3036
|
+
# Customize the options with defaults
|
3037
|
+
metadata = @config.rpcs.finish_dlp_job.metadata.to_h
|
3038
|
+
|
3039
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3040
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
3041
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3042
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3043
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3044
|
+
|
3045
|
+
header_params = {
|
3046
|
+
"name" => request.name
|
3047
|
+
}
|
3048
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3049
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3050
|
+
|
3051
|
+
options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout,
|
3052
|
+
metadata: metadata,
|
3053
|
+
retry_policy: @config.rpcs.finish_dlp_job.retry_policy
|
3054
|
+
options.apply_defaults metadata: @config.metadata,
|
3055
|
+
retry_policy: @config.retry_policy
|
3056
|
+
|
3057
|
+
@dlp_service_stub.call_rpc :finish_dlp_job, request, options: options do |response, operation|
|
3058
|
+
yield response, operation if block_given?
|
3059
|
+
return response
|
3060
|
+
end
|
3061
|
+
rescue GRPC::BadStatus => e
|
3062
|
+
raise Google::Cloud::Error.from_error(e)
|
3063
|
+
end
|
3064
|
+
|
3065
|
+
##
|
3066
|
+
# Configuration class for the DlpService API.
|
3067
|
+
#
|
3068
|
+
# This class represents the configuration for DlpService,
|
3069
|
+
# providing control over timeouts, retry behavior, logging, transport
|
3070
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
3071
|
+
# applied individually to specific RPCs. See
|
3072
|
+
# {Google::Cloud::Dlp::V2::DlpService::Client::Configuration::Rpcs}
|
3073
|
+
# for a list of RPCs that can be configured independently.
|
3074
|
+
#
|
3075
|
+
# Configuration can be applied globally to all clients, or to a single client
|
3076
|
+
# on construction.
|
3077
|
+
#
|
3078
|
+
# # Examples
|
3079
|
+
#
|
3080
|
+
# To modify the global config, setting the timeout for inspect_content
|
3081
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
3082
|
+
#
|
3083
|
+
# Google::Cloud::Dlp::V2::DlpService::Client.configure do |config|
|
3084
|
+
# config.timeout = 10_000
|
3085
|
+
# config.rpcs.inspect_content.timeout = 20_000
|
3086
|
+
# end
|
3087
|
+
#
|
3088
|
+
# To apply the above configuration only to a new client:
|
3089
|
+
#
|
3090
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new do |config|
|
3091
|
+
# config.timeout = 10_000
|
3092
|
+
# config.rpcs.inspect_content.timeout = 20_000
|
3093
|
+
# end
|
3094
|
+
#
|
3095
|
+
# @!attribute [rw] endpoint
|
3096
|
+
# The hostname or hostname:port of the service endpoint.
|
3097
|
+
# Defaults to `"dlp.googleapis.com"`.
|
3098
|
+
# @return [String]
|
3099
|
+
# @!attribute [rw] credentials
|
3100
|
+
# Credentials to send with calls. You may provide any of the following types:
|
3101
|
+
# * (`String`) The path to a service account key file in JSON format
|
3102
|
+
# * (`Hash`) A service account key as a Hash
|
3103
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3104
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
3105
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3106
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
3107
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3108
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3109
|
+
# * (`nil`) indicating no credentials
|
3110
|
+
# @return [Object]
|
3111
|
+
# @!attribute [rw] scope
|
3112
|
+
# The OAuth scopes
|
3113
|
+
# @return [Array<String>]
|
3114
|
+
# @!attribute [rw] lib_name
|
3115
|
+
# The library name as recorded in instrumentation and logging
|
3116
|
+
# @return [String]
|
3117
|
+
# @!attribute [rw] lib_version
|
3118
|
+
# The library version as recorded in instrumentation and logging
|
3119
|
+
# @return [String]
|
3120
|
+
# @!attribute [rw] channel_args
|
3121
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
3122
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
3123
|
+
# @return [Hash]
|
3124
|
+
# @!attribute [rw] interceptors
|
3125
|
+
# An array of interceptors that are run before calls are executed.
|
3126
|
+
# @return [Array<GRPC::ClientInterceptor>]
|
3127
|
+
# @!attribute [rw] timeout
|
3128
|
+
# The call timeout in milliseconds.
|
3129
|
+
# @return [Numeric]
|
3130
|
+
# @!attribute [rw] metadata
|
3131
|
+
# Additional gRPC headers to be sent with the call.
|
3132
|
+
# @return [Hash{Symbol=>String}]
|
3133
|
+
# @!attribute [rw] retry_policy
|
3134
|
+
# The retry policy. The value is a hash with the following keys:
|
3135
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3136
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3137
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3138
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3139
|
+
# trigger a retry.
|
3140
|
+
# @return [Hash]
|
3141
|
+
#
|
3142
|
+
class Configuration
|
3143
|
+
extend Gapic::Config
|
3144
|
+
|
3145
|
+
config_attr :endpoint, "dlp.googleapis.com", String
|
3146
|
+
config_attr :credentials, nil do |value|
|
3147
|
+
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3148
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
3149
|
+
allowed.any? { |klass| klass === value }
|
3150
|
+
end
|
3151
|
+
config_attr :scope, nil, String, Array, nil
|
3152
|
+
config_attr :lib_name, nil, String, nil
|
3153
|
+
config_attr :lib_version, nil, String, nil
|
3154
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
3155
|
+
config_attr :interceptors, nil, Array, nil
|
3156
|
+
config_attr :timeout, nil, Numeric, nil
|
3157
|
+
config_attr :metadata, nil, Hash, nil
|
3158
|
+
config_attr :retry_policy, nil, Hash, Proc, nil
|
3159
|
+
|
3160
|
+
# @private
|
3161
|
+
def initialize parent_config = nil
|
3162
|
+
@parent_config = parent_config unless parent_config.nil?
|
3163
|
+
|
3164
|
+
yield self if block_given?
|
3165
|
+
end
|
3166
|
+
|
3167
|
+
##
|
3168
|
+
# Configurations for individual RPCs
|
3169
|
+
# @return [Rpcs]
|
3170
|
+
#
|
3171
|
+
def rpcs
|
3172
|
+
@rpcs ||= begin
|
3173
|
+
parent_rpcs = nil
|
3174
|
+
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
|
3175
|
+
Rpcs.new parent_rpcs
|
3176
|
+
end
|
3177
|
+
end
|
3178
|
+
|
3179
|
+
##
|
3180
|
+
# Configuration RPC class for the DlpService API.
|
3181
|
+
#
|
3182
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3183
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3184
|
+
# the following configuration fields:
|
3185
|
+
#
|
3186
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
3187
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3188
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3189
|
+
# include the following keys:
|
3190
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3191
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3192
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3193
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3194
|
+
# trigger a retry.
|
3195
|
+
#
|
3196
|
+
class Rpcs
|
3197
|
+
##
|
3198
|
+
# RPC-specific configuration for `inspect_content`
|
3199
|
+
# @return [Gapic::Config::Method]
|
3200
|
+
#
|
3201
|
+
attr_reader :inspect_content
|
3202
|
+
##
|
3203
|
+
# RPC-specific configuration for `redact_image`
|
3204
|
+
# @return [Gapic::Config::Method]
|
3205
|
+
#
|
3206
|
+
attr_reader :redact_image
|
3207
|
+
##
|
3208
|
+
# RPC-specific configuration for `deidentify_content`
|
3209
|
+
# @return [Gapic::Config::Method]
|
3210
|
+
#
|
3211
|
+
attr_reader :deidentify_content
|
3212
|
+
##
|
3213
|
+
# RPC-specific configuration for `reidentify_content`
|
3214
|
+
# @return [Gapic::Config::Method]
|
3215
|
+
#
|
3216
|
+
attr_reader :reidentify_content
|
3217
|
+
##
|
3218
|
+
# RPC-specific configuration for `list_info_types`
|
3219
|
+
# @return [Gapic::Config::Method]
|
3220
|
+
#
|
3221
|
+
attr_reader :list_info_types
|
3222
|
+
##
|
3223
|
+
# RPC-specific configuration for `create_inspect_template`
|
3224
|
+
# @return [Gapic::Config::Method]
|
3225
|
+
#
|
3226
|
+
attr_reader :create_inspect_template
|
3227
|
+
##
|
3228
|
+
# RPC-specific configuration for `update_inspect_template`
|
3229
|
+
# @return [Gapic::Config::Method]
|
3230
|
+
#
|
3231
|
+
attr_reader :update_inspect_template
|
3232
|
+
##
|
3233
|
+
# RPC-specific configuration for `get_inspect_template`
|
3234
|
+
# @return [Gapic::Config::Method]
|
3235
|
+
#
|
3236
|
+
attr_reader :get_inspect_template
|
3237
|
+
##
|
3238
|
+
# RPC-specific configuration for `list_inspect_templates`
|
3239
|
+
# @return [Gapic::Config::Method]
|
3240
|
+
#
|
3241
|
+
attr_reader :list_inspect_templates
|
3242
|
+
##
|
3243
|
+
# RPC-specific configuration for `delete_inspect_template`
|
3244
|
+
# @return [Gapic::Config::Method]
|
3245
|
+
#
|
3246
|
+
attr_reader :delete_inspect_template
|
3247
|
+
##
|
3248
|
+
# RPC-specific configuration for `create_deidentify_template`
|
3249
|
+
# @return [Gapic::Config::Method]
|
3250
|
+
#
|
3251
|
+
attr_reader :create_deidentify_template
|
3252
|
+
##
|
3253
|
+
# RPC-specific configuration for `update_deidentify_template`
|
3254
|
+
# @return [Gapic::Config::Method]
|
3255
|
+
#
|
3256
|
+
attr_reader :update_deidentify_template
|
3257
|
+
##
|
3258
|
+
# RPC-specific configuration for `get_deidentify_template`
|
3259
|
+
# @return [Gapic::Config::Method]
|
3260
|
+
#
|
3261
|
+
attr_reader :get_deidentify_template
|
3262
|
+
##
|
3263
|
+
# RPC-specific configuration for `list_deidentify_templates`
|
3264
|
+
# @return [Gapic::Config::Method]
|
3265
|
+
#
|
3266
|
+
attr_reader :list_deidentify_templates
|
3267
|
+
##
|
3268
|
+
# RPC-specific configuration for `delete_deidentify_template`
|
3269
|
+
# @return [Gapic::Config::Method]
|
3270
|
+
#
|
3271
|
+
attr_reader :delete_deidentify_template
|
3272
|
+
##
|
3273
|
+
# RPC-specific configuration for `create_job_trigger`
|
3274
|
+
# @return [Gapic::Config::Method]
|
3275
|
+
#
|
3276
|
+
attr_reader :create_job_trigger
|
3277
|
+
##
|
3278
|
+
# RPC-specific configuration for `update_job_trigger`
|
3279
|
+
# @return [Gapic::Config::Method]
|
3280
|
+
#
|
3281
|
+
attr_reader :update_job_trigger
|
3282
|
+
##
|
3283
|
+
# RPC-specific configuration for `hybrid_inspect_job_trigger`
|
3284
|
+
# @return [Gapic::Config::Method]
|
3285
|
+
#
|
3286
|
+
attr_reader :hybrid_inspect_job_trigger
|
3287
|
+
##
|
3288
|
+
# RPC-specific configuration for `get_job_trigger`
|
3289
|
+
# @return [Gapic::Config::Method]
|
3290
|
+
#
|
3291
|
+
attr_reader :get_job_trigger
|
3292
|
+
##
|
3293
|
+
# RPC-specific configuration for `list_job_triggers`
|
3294
|
+
# @return [Gapic::Config::Method]
|
3295
|
+
#
|
3296
|
+
attr_reader :list_job_triggers
|
3297
|
+
##
|
3298
|
+
# RPC-specific configuration for `delete_job_trigger`
|
3299
|
+
# @return [Gapic::Config::Method]
|
3300
|
+
#
|
3301
|
+
attr_reader :delete_job_trigger
|
3302
|
+
##
|
3303
|
+
# RPC-specific configuration for `activate_job_trigger`
|
3304
|
+
# @return [Gapic::Config::Method]
|
3305
|
+
#
|
3306
|
+
attr_reader :activate_job_trigger
|
3307
|
+
##
|
3308
|
+
# RPC-specific configuration for `create_dlp_job`
|
3309
|
+
# @return [Gapic::Config::Method]
|
3310
|
+
#
|
3311
|
+
attr_reader :create_dlp_job
|
3312
|
+
##
|
3313
|
+
# RPC-specific configuration for `list_dlp_jobs`
|
3314
|
+
# @return [Gapic::Config::Method]
|
3315
|
+
#
|
3316
|
+
attr_reader :list_dlp_jobs
|
3317
|
+
##
|
3318
|
+
# RPC-specific configuration for `get_dlp_job`
|
3319
|
+
# @return [Gapic::Config::Method]
|
3320
|
+
#
|
3321
|
+
attr_reader :get_dlp_job
|
3322
|
+
##
|
3323
|
+
# RPC-specific configuration for `delete_dlp_job`
|
3324
|
+
# @return [Gapic::Config::Method]
|
3325
|
+
#
|
3326
|
+
attr_reader :delete_dlp_job
|
3327
|
+
##
|
3328
|
+
# RPC-specific configuration for `cancel_dlp_job`
|
3329
|
+
# @return [Gapic::Config::Method]
|
3330
|
+
#
|
3331
|
+
attr_reader :cancel_dlp_job
|
3332
|
+
##
|
3333
|
+
# RPC-specific configuration for `create_stored_info_type`
|
3334
|
+
# @return [Gapic::Config::Method]
|
3335
|
+
#
|
3336
|
+
attr_reader :create_stored_info_type
|
3337
|
+
##
|
3338
|
+
# RPC-specific configuration for `update_stored_info_type`
|
3339
|
+
# @return [Gapic::Config::Method]
|
3340
|
+
#
|
3341
|
+
attr_reader :update_stored_info_type
|
3342
|
+
##
|
3343
|
+
# RPC-specific configuration for `get_stored_info_type`
|
3344
|
+
# @return [Gapic::Config::Method]
|
3345
|
+
#
|
3346
|
+
attr_reader :get_stored_info_type
|
3347
|
+
##
|
3348
|
+
# RPC-specific configuration for `list_stored_info_types`
|
3349
|
+
# @return [Gapic::Config::Method]
|
3350
|
+
#
|
3351
|
+
attr_reader :list_stored_info_types
|
3352
|
+
##
|
3353
|
+
# RPC-specific configuration for `delete_stored_info_type`
|
3354
|
+
# @return [Gapic::Config::Method]
|
3355
|
+
#
|
3356
|
+
attr_reader :delete_stored_info_type
|
3357
|
+
##
|
3358
|
+
# RPC-specific configuration for `hybrid_inspect_dlp_job`
|
3359
|
+
# @return [Gapic::Config::Method]
|
3360
|
+
#
|
3361
|
+
attr_reader :hybrid_inspect_dlp_job
|
3362
|
+
##
|
3363
|
+
# RPC-specific configuration for `finish_dlp_job`
|
3364
|
+
# @return [Gapic::Config::Method]
|
3365
|
+
#
|
3366
|
+
attr_reader :finish_dlp_job
|
3367
|
+
|
3368
|
+
# @private
|
3369
|
+
def initialize parent_rpcs = nil
|
3370
|
+
inspect_content_config = parent_rpcs&.inspect_content if parent_rpcs&.respond_to? :inspect_content
|
3371
|
+
@inspect_content = Gapic::Config::Method.new inspect_content_config
|
3372
|
+
redact_image_config = parent_rpcs&.redact_image if parent_rpcs&.respond_to? :redact_image
|
3373
|
+
@redact_image = Gapic::Config::Method.new redact_image_config
|
3374
|
+
deidentify_content_config = parent_rpcs&.deidentify_content if parent_rpcs&.respond_to? :deidentify_content
|
3375
|
+
@deidentify_content = Gapic::Config::Method.new deidentify_content_config
|
3376
|
+
reidentify_content_config = parent_rpcs&.reidentify_content if parent_rpcs&.respond_to? :reidentify_content
|
3377
|
+
@reidentify_content = Gapic::Config::Method.new reidentify_content_config
|
3378
|
+
list_info_types_config = parent_rpcs&.list_info_types if parent_rpcs&.respond_to? :list_info_types
|
3379
|
+
@list_info_types = Gapic::Config::Method.new list_info_types_config
|
3380
|
+
create_inspect_template_config = parent_rpcs&.create_inspect_template if parent_rpcs&.respond_to? :create_inspect_template
|
3381
|
+
@create_inspect_template = Gapic::Config::Method.new create_inspect_template_config
|
3382
|
+
update_inspect_template_config = parent_rpcs&.update_inspect_template if parent_rpcs&.respond_to? :update_inspect_template
|
3383
|
+
@update_inspect_template = Gapic::Config::Method.new update_inspect_template_config
|
3384
|
+
get_inspect_template_config = parent_rpcs&.get_inspect_template if parent_rpcs&.respond_to? :get_inspect_template
|
3385
|
+
@get_inspect_template = Gapic::Config::Method.new get_inspect_template_config
|
3386
|
+
list_inspect_templates_config = parent_rpcs&.list_inspect_templates if parent_rpcs&.respond_to? :list_inspect_templates
|
3387
|
+
@list_inspect_templates = Gapic::Config::Method.new list_inspect_templates_config
|
3388
|
+
delete_inspect_template_config = parent_rpcs&.delete_inspect_template if parent_rpcs&.respond_to? :delete_inspect_template
|
3389
|
+
@delete_inspect_template = Gapic::Config::Method.new delete_inspect_template_config
|
3390
|
+
create_deidentify_template_config = parent_rpcs&.create_deidentify_template if parent_rpcs&.respond_to? :create_deidentify_template
|
3391
|
+
@create_deidentify_template = Gapic::Config::Method.new create_deidentify_template_config
|
3392
|
+
update_deidentify_template_config = parent_rpcs&.update_deidentify_template if parent_rpcs&.respond_to? :update_deidentify_template
|
3393
|
+
@update_deidentify_template = Gapic::Config::Method.new update_deidentify_template_config
|
3394
|
+
get_deidentify_template_config = parent_rpcs&.get_deidentify_template if parent_rpcs&.respond_to? :get_deidentify_template
|
3395
|
+
@get_deidentify_template = Gapic::Config::Method.new get_deidentify_template_config
|
3396
|
+
list_deidentify_templates_config = parent_rpcs&.list_deidentify_templates if parent_rpcs&.respond_to? :list_deidentify_templates
|
3397
|
+
@list_deidentify_templates = Gapic::Config::Method.new list_deidentify_templates_config
|
3398
|
+
delete_deidentify_template_config = parent_rpcs&.delete_deidentify_template if parent_rpcs&.respond_to? :delete_deidentify_template
|
3399
|
+
@delete_deidentify_template = Gapic::Config::Method.new delete_deidentify_template_config
|
3400
|
+
create_job_trigger_config = parent_rpcs&.create_job_trigger if parent_rpcs&.respond_to? :create_job_trigger
|
3401
|
+
@create_job_trigger = Gapic::Config::Method.new create_job_trigger_config
|
3402
|
+
update_job_trigger_config = parent_rpcs&.update_job_trigger if parent_rpcs&.respond_to? :update_job_trigger
|
3403
|
+
@update_job_trigger = Gapic::Config::Method.new update_job_trigger_config
|
3404
|
+
hybrid_inspect_job_trigger_config = parent_rpcs&.hybrid_inspect_job_trigger if parent_rpcs&.respond_to? :hybrid_inspect_job_trigger
|
3405
|
+
@hybrid_inspect_job_trigger = Gapic::Config::Method.new hybrid_inspect_job_trigger_config
|
3406
|
+
get_job_trigger_config = parent_rpcs&.get_job_trigger if parent_rpcs&.respond_to? :get_job_trigger
|
3407
|
+
@get_job_trigger = Gapic::Config::Method.new get_job_trigger_config
|
3408
|
+
list_job_triggers_config = parent_rpcs&.list_job_triggers if parent_rpcs&.respond_to? :list_job_triggers
|
3409
|
+
@list_job_triggers = Gapic::Config::Method.new list_job_triggers_config
|
3410
|
+
delete_job_trigger_config = parent_rpcs&.delete_job_trigger if parent_rpcs&.respond_to? :delete_job_trigger
|
3411
|
+
@delete_job_trigger = Gapic::Config::Method.new delete_job_trigger_config
|
3412
|
+
activate_job_trigger_config = parent_rpcs&.activate_job_trigger if parent_rpcs&.respond_to? :activate_job_trigger
|
3413
|
+
@activate_job_trigger = Gapic::Config::Method.new activate_job_trigger_config
|
3414
|
+
create_dlp_job_config = parent_rpcs&.create_dlp_job if parent_rpcs&.respond_to? :create_dlp_job
|
3415
|
+
@create_dlp_job = Gapic::Config::Method.new create_dlp_job_config
|
3416
|
+
list_dlp_jobs_config = parent_rpcs&.list_dlp_jobs if parent_rpcs&.respond_to? :list_dlp_jobs
|
3417
|
+
@list_dlp_jobs = Gapic::Config::Method.new list_dlp_jobs_config
|
3418
|
+
get_dlp_job_config = parent_rpcs&.get_dlp_job if parent_rpcs&.respond_to? :get_dlp_job
|
3419
|
+
@get_dlp_job = Gapic::Config::Method.new get_dlp_job_config
|
3420
|
+
delete_dlp_job_config = parent_rpcs&.delete_dlp_job if parent_rpcs&.respond_to? :delete_dlp_job
|
3421
|
+
@delete_dlp_job = Gapic::Config::Method.new delete_dlp_job_config
|
3422
|
+
cancel_dlp_job_config = parent_rpcs&.cancel_dlp_job if parent_rpcs&.respond_to? :cancel_dlp_job
|
3423
|
+
@cancel_dlp_job = Gapic::Config::Method.new cancel_dlp_job_config
|
3424
|
+
create_stored_info_type_config = parent_rpcs&.create_stored_info_type if parent_rpcs&.respond_to? :create_stored_info_type
|
3425
|
+
@create_stored_info_type = Gapic::Config::Method.new create_stored_info_type_config
|
3426
|
+
update_stored_info_type_config = parent_rpcs&.update_stored_info_type if parent_rpcs&.respond_to? :update_stored_info_type
|
3427
|
+
@update_stored_info_type = Gapic::Config::Method.new update_stored_info_type_config
|
3428
|
+
get_stored_info_type_config = parent_rpcs&.get_stored_info_type if parent_rpcs&.respond_to? :get_stored_info_type
|
3429
|
+
@get_stored_info_type = Gapic::Config::Method.new get_stored_info_type_config
|
3430
|
+
list_stored_info_types_config = parent_rpcs&.list_stored_info_types if parent_rpcs&.respond_to? :list_stored_info_types
|
3431
|
+
@list_stored_info_types = Gapic::Config::Method.new list_stored_info_types_config
|
3432
|
+
delete_stored_info_type_config = parent_rpcs&.delete_stored_info_type if parent_rpcs&.respond_to? :delete_stored_info_type
|
3433
|
+
@delete_stored_info_type = Gapic::Config::Method.new delete_stored_info_type_config
|
3434
|
+
hybrid_inspect_dlp_job_config = parent_rpcs&.hybrid_inspect_dlp_job if parent_rpcs&.respond_to? :hybrid_inspect_dlp_job
|
3435
|
+
@hybrid_inspect_dlp_job = Gapic::Config::Method.new hybrid_inspect_dlp_job_config
|
3436
|
+
finish_dlp_job_config = parent_rpcs&.finish_dlp_job if parent_rpcs&.respond_to? :finish_dlp_job
|
3437
|
+
@finish_dlp_job = Gapic::Config::Method.new finish_dlp_job_config
|
3438
|
+
|
3439
|
+
yield self if block_given?
|
3440
|
+
end
|
3441
|
+
end
|
3442
|
+
end
|
3443
|
+
end
|
3444
|
+
end
|
3445
|
+
end
|
3446
|
+
end
|
3447
|
+
end
|
3448
|
+
end
|