google-cloud-dataform-v1 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/dataform/v1/bindings_override.rb +0 -57
- data/lib/google/cloud/dataform/v1/dataform/client.rb +2061 -48
- data/lib/google/cloud/dataform/v1/dataform/operations.rb +843 -0
- data/lib/google/cloud/dataform/v1/dataform/paths.rb +38 -0
- data/lib/google/cloud/dataform/v1/dataform/rest/client.rb +1944 -65
- data/lib/google/cloud/dataform/v1/dataform/rest/operations.rb +927 -0
- data/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb +1719 -481
- data/lib/google/cloud/dataform/v1/dataform/rest.rb +1 -0
- data/lib/google/cloud/dataform/v1/dataform.rb +1 -0
- data/lib/google/cloud/dataform/v1/dataform_pb.rb +42 -1
- data/lib/google/cloud/dataform/v1/dataform_services_pb.rb +54 -0
- data/lib/google/cloud/dataform/v1/version.rb +1 -1
- data/lib/google/longrunning/bindings_override.rb +71 -0
- data/lib/google/longrunning/operations/client.rb +954 -0
- data/lib/google/longrunning/operations/credentials.rb +40 -0
- data/lib/google/longrunning/operations/operations.rb +839 -0
- data/lib/google/longrunning/operations/rest/client.rb +777 -0
- data/lib/google/longrunning/operations/rest/operations.rb +923 -0
- data/lib/google/longrunning/operations/rest/service_stub.rb +322 -0
- data/lib/google/longrunning/operations/rest.rb +57 -0
- data/lib/google/longrunning/operations.rb +59 -0
- data/lib/google/longrunning/rest.rb +34 -0
- data/lib/google/longrunning.rb +41 -0
- data/lib/google-cloud-dataform-v1.rb +1 -0
- data/proto_docs/google/api/client.rb +149 -29
- data/proto_docs/google/cloud/dataform/v1/dataform.rb +759 -3
- data/proto_docs/google/longrunning/operations.rb +191 -0
- metadata +17 -3
|
@@ -149,6 +149,13 @@ module Google
|
|
|
149
149
|
@quota_project_id = @config.quota_project
|
|
150
150
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
151
151
|
|
|
152
|
+
@operations_client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Operations.new do |config|
|
|
153
|
+
config.credentials = credentials
|
|
154
|
+
config.quota_project = @quota_project_id
|
|
155
|
+
config.endpoint = @config.endpoint
|
|
156
|
+
config.universe_domain = @config.universe_domain
|
|
157
|
+
end
|
|
158
|
+
|
|
152
159
|
@dataform_stub = ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.new(
|
|
153
160
|
endpoint: @config.endpoint,
|
|
154
161
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
@@ -157,59 +164,1428 @@ module Google
|
|
|
157
164
|
logger: @config.logger
|
|
158
165
|
)
|
|
159
166
|
|
|
160
|
-
@dataform_stub.logger(stub: true)&.info do |entry|
|
|
161
|
-
entry.set_system_name
|
|
162
|
-
entry.set_service
|
|
163
|
-
entry.message = "Created client for #{entry.service}"
|
|
164
|
-
entry.set_credentials_fields credentials
|
|
165
|
-
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
166
|
-
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
167
|
-
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
168
|
-
end
|
|
167
|
+
@dataform_stub.logger(stub: true)&.info do |entry|
|
|
168
|
+
entry.set_system_name
|
|
169
|
+
entry.set_service
|
|
170
|
+
entry.message = "Created client for #{entry.service}"
|
|
171
|
+
entry.set_credentials_fields credentials
|
|
172
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
173
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
174
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
|
178
|
+
config.credentials = credentials
|
|
179
|
+
config.quota_project = @quota_project_id
|
|
180
|
+
config.endpoint = @dataform_stub.endpoint
|
|
181
|
+
config.universe_domain = @dataform_stub.universe_domain
|
|
182
|
+
config.bindings_override = @config.bindings_override
|
|
183
|
+
config.logger = @dataform_stub.logger if config.respond_to? :logger=
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
|
187
|
+
config.credentials = credentials
|
|
188
|
+
config.quota_project = @quota_project_id
|
|
189
|
+
config.endpoint = @dataform_stub.endpoint
|
|
190
|
+
config.universe_domain = @dataform_stub.universe_domain
|
|
191
|
+
config.logger = @dataform_stub.logger if config.respond_to? :logger=
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
##
|
|
196
|
+
# Get the associated client for long-running operations.
|
|
197
|
+
#
|
|
198
|
+
# @return [::Google::Cloud::Dataform::V1::Dataform::Rest::Operations]
|
|
199
|
+
#
|
|
200
|
+
attr_reader :operations_client
|
|
201
|
+
|
|
202
|
+
##
|
|
203
|
+
# Get the associated client for mix-in of the Locations.
|
|
204
|
+
#
|
|
205
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
|
206
|
+
#
|
|
207
|
+
attr_reader :location_client
|
|
208
|
+
|
|
209
|
+
##
|
|
210
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
211
|
+
#
|
|
212
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
|
213
|
+
#
|
|
214
|
+
attr_reader :iam_policy_client
|
|
215
|
+
|
|
216
|
+
##
|
|
217
|
+
# The logger used for request/response debug logging.
|
|
218
|
+
#
|
|
219
|
+
# @return [Logger]
|
|
220
|
+
#
|
|
221
|
+
def logger
|
|
222
|
+
@dataform_stub.logger
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Service calls
|
|
226
|
+
|
|
227
|
+
##
|
|
228
|
+
# Fetches a single TeamFolder.
|
|
229
|
+
#
|
|
230
|
+
# @overload get_team_folder(request, options = nil)
|
|
231
|
+
# Pass arguments to `get_team_folder` via a request object, either of type
|
|
232
|
+
# {::Google::Cloud::Dataform::V1::GetTeamFolderRequest} or an equivalent Hash.
|
|
233
|
+
#
|
|
234
|
+
# @param request [::Google::Cloud::Dataform::V1::GetTeamFolderRequest, ::Hash]
|
|
235
|
+
# A request object representing the call parameters. Required. To specify no
|
|
236
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
237
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
238
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
239
|
+
#
|
|
240
|
+
# @overload get_team_folder(name: nil)
|
|
241
|
+
# Pass arguments to `get_team_folder` via keyword arguments. Note that at
|
|
242
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
243
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
244
|
+
#
|
|
245
|
+
# @param name [::String]
|
|
246
|
+
# Required. The TeamFolder's name.
|
|
247
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
248
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
249
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
250
|
+
#
|
|
251
|
+
# @return [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
252
|
+
#
|
|
253
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
254
|
+
#
|
|
255
|
+
# @example Basic example
|
|
256
|
+
# require "google/cloud/dataform/v1"
|
|
257
|
+
#
|
|
258
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
259
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
260
|
+
#
|
|
261
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
262
|
+
# request = Google::Cloud::Dataform::V1::GetTeamFolderRequest.new
|
|
263
|
+
#
|
|
264
|
+
# # Call the get_team_folder method.
|
|
265
|
+
# result = client.get_team_folder request
|
|
266
|
+
#
|
|
267
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
|
|
268
|
+
# p result
|
|
269
|
+
#
|
|
270
|
+
def get_team_folder request, options = nil
|
|
271
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
272
|
+
|
|
273
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetTeamFolderRequest
|
|
274
|
+
|
|
275
|
+
# Converts hash and nil to an options object
|
|
276
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
277
|
+
|
|
278
|
+
# Customize the options with defaults
|
|
279
|
+
call_metadata = @config.rpcs.get_team_folder.metadata.to_h
|
|
280
|
+
|
|
281
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
282
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
283
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
284
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
285
|
+
transports_version_send: [:rest]
|
|
286
|
+
|
|
287
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
288
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
289
|
+
|
|
290
|
+
options.apply_defaults timeout: @config.rpcs.get_team_folder.timeout,
|
|
291
|
+
metadata: call_metadata,
|
|
292
|
+
retry_policy: @config.rpcs.get_team_folder.retry_policy
|
|
293
|
+
|
|
294
|
+
options.apply_defaults timeout: @config.timeout,
|
|
295
|
+
metadata: @config.metadata,
|
|
296
|
+
retry_policy: @config.retry_policy
|
|
297
|
+
|
|
298
|
+
@dataform_stub.get_team_folder request, options do |result, operation|
|
|
299
|
+
yield result, operation if block_given?
|
|
300
|
+
end
|
|
301
|
+
rescue ::Gapic::Rest::Error => e
|
|
302
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
##
|
|
306
|
+
# Creates a new TeamFolder in a given project and location.
|
|
307
|
+
#
|
|
308
|
+
# @overload create_team_folder(request, options = nil)
|
|
309
|
+
# Pass arguments to `create_team_folder` via a request object, either of type
|
|
310
|
+
# {::Google::Cloud::Dataform::V1::CreateTeamFolderRequest} or an equivalent Hash.
|
|
311
|
+
#
|
|
312
|
+
# @param request [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest, ::Hash]
|
|
313
|
+
# A request object representing the call parameters. Required. To specify no
|
|
314
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
315
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
316
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
317
|
+
#
|
|
318
|
+
# @overload create_team_folder(parent: nil, team_folder: nil)
|
|
319
|
+
# Pass arguments to `create_team_folder` via keyword arguments. Note that at
|
|
320
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
321
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
322
|
+
#
|
|
323
|
+
# @param parent [::String]
|
|
324
|
+
# Required. The location in which to create the TeamFolder. Must be in the
|
|
325
|
+
# format `projects/*/locations/*`.
|
|
326
|
+
# @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash]
|
|
327
|
+
# Required. The TeamFolder to create.
|
|
328
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
329
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
330
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
331
|
+
#
|
|
332
|
+
# @return [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
333
|
+
#
|
|
334
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
335
|
+
#
|
|
336
|
+
# @example Basic example
|
|
337
|
+
# require "google/cloud/dataform/v1"
|
|
338
|
+
#
|
|
339
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
340
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
341
|
+
#
|
|
342
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
343
|
+
# request = Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new
|
|
344
|
+
#
|
|
345
|
+
# # Call the create_team_folder method.
|
|
346
|
+
# result = client.create_team_folder request
|
|
347
|
+
#
|
|
348
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
|
|
349
|
+
# p result
|
|
350
|
+
#
|
|
351
|
+
def create_team_folder request, options = nil
|
|
352
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
353
|
+
|
|
354
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest
|
|
355
|
+
|
|
356
|
+
# Converts hash and nil to an options object
|
|
357
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
358
|
+
|
|
359
|
+
# Customize the options with defaults
|
|
360
|
+
call_metadata = @config.rpcs.create_team_folder.metadata.to_h
|
|
361
|
+
|
|
362
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
363
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
364
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
365
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
366
|
+
transports_version_send: [:rest]
|
|
367
|
+
|
|
368
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
369
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
370
|
+
|
|
371
|
+
options.apply_defaults timeout: @config.rpcs.create_team_folder.timeout,
|
|
372
|
+
metadata: call_metadata,
|
|
373
|
+
retry_policy: @config.rpcs.create_team_folder.retry_policy
|
|
374
|
+
|
|
375
|
+
options.apply_defaults timeout: @config.timeout,
|
|
376
|
+
metadata: @config.metadata,
|
|
377
|
+
retry_policy: @config.retry_policy
|
|
378
|
+
|
|
379
|
+
@dataform_stub.create_team_folder request, options do |result, operation|
|
|
380
|
+
yield result, operation if block_given?
|
|
381
|
+
end
|
|
382
|
+
rescue ::Gapic::Rest::Error => e
|
|
383
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
##
|
|
387
|
+
# Updates a single TeamFolder.
|
|
388
|
+
#
|
|
389
|
+
# @overload update_team_folder(request, options = nil)
|
|
390
|
+
# Pass arguments to `update_team_folder` via a request object, either of type
|
|
391
|
+
# {::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest} or an equivalent Hash.
|
|
392
|
+
#
|
|
393
|
+
# @param request [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest, ::Hash]
|
|
394
|
+
# A request object representing the call parameters. Required. To specify no
|
|
395
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
396
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
397
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
398
|
+
#
|
|
399
|
+
# @overload update_team_folder(update_mask: nil, team_folder: nil)
|
|
400
|
+
# Pass arguments to `update_team_folder` via keyword arguments. Note that at
|
|
401
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
402
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
403
|
+
#
|
|
404
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
405
|
+
# Optional. Specifies the fields to be updated in the Folder. If left unset,
|
|
406
|
+
# all fields will be updated.
|
|
407
|
+
# @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash]
|
|
408
|
+
# Required. The updated TeamFolder.
|
|
409
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
410
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
411
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
412
|
+
#
|
|
413
|
+
# @return [::Google::Cloud::Dataform::V1::TeamFolder]
|
|
414
|
+
#
|
|
415
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
416
|
+
#
|
|
417
|
+
# @example Basic example
|
|
418
|
+
# require "google/cloud/dataform/v1"
|
|
419
|
+
#
|
|
420
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
421
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
422
|
+
#
|
|
423
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
424
|
+
# request = Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new
|
|
425
|
+
#
|
|
426
|
+
# # Call the update_team_folder method.
|
|
427
|
+
# result = client.update_team_folder request
|
|
428
|
+
#
|
|
429
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
|
|
430
|
+
# p result
|
|
431
|
+
#
|
|
432
|
+
def update_team_folder request, options = nil
|
|
433
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
434
|
+
|
|
435
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest
|
|
436
|
+
|
|
437
|
+
# Converts hash and nil to an options object
|
|
438
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
439
|
+
|
|
440
|
+
# Customize the options with defaults
|
|
441
|
+
call_metadata = @config.rpcs.update_team_folder.metadata.to_h
|
|
442
|
+
|
|
443
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
444
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
445
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
446
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
447
|
+
transports_version_send: [:rest]
|
|
448
|
+
|
|
449
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
450
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
451
|
+
|
|
452
|
+
options.apply_defaults timeout: @config.rpcs.update_team_folder.timeout,
|
|
453
|
+
metadata: call_metadata,
|
|
454
|
+
retry_policy: @config.rpcs.update_team_folder.retry_policy
|
|
455
|
+
|
|
456
|
+
options.apply_defaults timeout: @config.timeout,
|
|
457
|
+
metadata: @config.metadata,
|
|
458
|
+
retry_policy: @config.retry_policy
|
|
459
|
+
|
|
460
|
+
@dataform_stub.update_team_folder request, options do |result, operation|
|
|
461
|
+
yield result, operation if block_given?
|
|
462
|
+
end
|
|
463
|
+
rescue ::Gapic::Rest::Error => e
|
|
464
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
##
|
|
468
|
+
# Deletes a single TeamFolder.
|
|
469
|
+
#
|
|
470
|
+
# @overload delete_team_folder(request, options = nil)
|
|
471
|
+
# Pass arguments to `delete_team_folder` via a request object, either of type
|
|
472
|
+
# {::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest} or an equivalent Hash.
|
|
473
|
+
#
|
|
474
|
+
# @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest, ::Hash]
|
|
475
|
+
# A request object representing the call parameters. Required. To specify no
|
|
476
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
477
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
478
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
479
|
+
#
|
|
480
|
+
# @overload delete_team_folder(name: nil)
|
|
481
|
+
# Pass arguments to `delete_team_folder` via keyword arguments. Note that at
|
|
482
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
483
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
484
|
+
#
|
|
485
|
+
# @param name [::String]
|
|
486
|
+
# Required. The TeamFolder's name.
|
|
487
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
488
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
489
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
490
|
+
#
|
|
491
|
+
# @return [::Google::Protobuf::Empty]
|
|
492
|
+
#
|
|
493
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
494
|
+
#
|
|
495
|
+
# @example Basic example
|
|
496
|
+
# require "google/cloud/dataform/v1"
|
|
497
|
+
#
|
|
498
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
499
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
500
|
+
#
|
|
501
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
502
|
+
# request = Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new
|
|
503
|
+
#
|
|
504
|
+
# # Call the delete_team_folder method.
|
|
505
|
+
# result = client.delete_team_folder request
|
|
506
|
+
#
|
|
507
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
508
|
+
# p result
|
|
509
|
+
#
|
|
510
|
+
def delete_team_folder request, options = nil
|
|
511
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
512
|
+
|
|
513
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest
|
|
514
|
+
|
|
515
|
+
# Converts hash and nil to an options object
|
|
516
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
517
|
+
|
|
518
|
+
# Customize the options with defaults
|
|
519
|
+
call_metadata = @config.rpcs.delete_team_folder.metadata.to_h
|
|
520
|
+
|
|
521
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
522
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
523
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
524
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
525
|
+
transports_version_send: [:rest]
|
|
526
|
+
|
|
527
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
528
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
529
|
+
|
|
530
|
+
options.apply_defaults timeout: @config.rpcs.delete_team_folder.timeout,
|
|
531
|
+
metadata: call_metadata,
|
|
532
|
+
retry_policy: @config.rpcs.delete_team_folder.retry_policy
|
|
533
|
+
|
|
534
|
+
options.apply_defaults timeout: @config.timeout,
|
|
535
|
+
metadata: @config.metadata,
|
|
536
|
+
retry_policy: @config.retry_policy
|
|
537
|
+
|
|
538
|
+
@dataform_stub.delete_team_folder request, options do |result, operation|
|
|
539
|
+
yield result, operation if block_given?
|
|
540
|
+
end
|
|
541
|
+
rescue ::Gapic::Rest::Error => e
|
|
542
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
##
|
|
546
|
+
# Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces,
|
|
547
|
+
# ReleaseConfigs, and WorkflowConfigs).
|
|
548
|
+
#
|
|
549
|
+
# @overload delete_team_folder_tree(request, options = nil)
|
|
550
|
+
# Pass arguments to `delete_team_folder_tree` via a request object, either of type
|
|
551
|
+
# {::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest} or an equivalent Hash.
|
|
552
|
+
#
|
|
553
|
+
# @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest, ::Hash]
|
|
554
|
+
# A request object representing the call parameters. Required. To specify no
|
|
555
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
556
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
557
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
558
|
+
#
|
|
559
|
+
# @overload delete_team_folder_tree(name: nil, force: nil)
|
|
560
|
+
# Pass arguments to `delete_team_folder_tree` via keyword arguments. Note that at
|
|
561
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
562
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
563
|
+
#
|
|
564
|
+
# @param name [::String]
|
|
565
|
+
# Required. The TeamFolder's name.
|
|
566
|
+
# Format: projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder}
|
|
567
|
+
# @param force [::Boolean]
|
|
568
|
+
# Optional. If `false` (default): The operation will fail if any
|
|
569
|
+
# Repository within the folder hierarchy has associated Release Configs or
|
|
570
|
+
# Workflow Configs.
|
|
571
|
+
#
|
|
572
|
+
# If `true`: The operation will attempt to delete everything, including any
|
|
573
|
+
# Release Configs and Workflow Configs linked to Repositories within the
|
|
574
|
+
# folder hierarchy. This permanently removes schedules and resources.
|
|
575
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
576
|
+
# @yieldparam result [::Gapic::Operation]
|
|
577
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
578
|
+
#
|
|
579
|
+
# @return [::Gapic::Operation]
|
|
580
|
+
#
|
|
581
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
582
|
+
#
|
|
583
|
+
# @example Basic example
|
|
584
|
+
# require "google/cloud/dataform/v1"
|
|
585
|
+
#
|
|
586
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
587
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
588
|
+
#
|
|
589
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
590
|
+
# request = Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new
|
|
591
|
+
#
|
|
592
|
+
# # Call the delete_team_folder_tree method.
|
|
593
|
+
# result = client.delete_team_folder_tree request
|
|
594
|
+
#
|
|
595
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
596
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
597
|
+
# # Here is how to wait for a response.
|
|
598
|
+
# result.wait_until_done! timeout: 60
|
|
599
|
+
# if result.response?
|
|
600
|
+
# p result.response
|
|
601
|
+
# else
|
|
602
|
+
# puts "No response received."
|
|
603
|
+
# end
|
|
604
|
+
#
|
|
605
|
+
def delete_team_folder_tree request, options = nil
|
|
606
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
607
|
+
|
|
608
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest
|
|
609
|
+
|
|
610
|
+
# Converts hash and nil to an options object
|
|
611
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
612
|
+
|
|
613
|
+
# Customize the options with defaults
|
|
614
|
+
call_metadata = @config.rpcs.delete_team_folder_tree.metadata.to_h
|
|
615
|
+
|
|
616
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
617
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
618
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
619
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
620
|
+
transports_version_send: [:rest]
|
|
621
|
+
|
|
622
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
623
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
624
|
+
|
|
625
|
+
options.apply_defaults timeout: @config.rpcs.delete_team_folder_tree.timeout,
|
|
626
|
+
metadata: call_metadata,
|
|
627
|
+
retry_policy: @config.rpcs.delete_team_folder_tree.retry_policy
|
|
628
|
+
|
|
629
|
+
options.apply_defaults timeout: @config.timeout,
|
|
630
|
+
metadata: @config.metadata,
|
|
631
|
+
retry_policy: @config.retry_policy
|
|
632
|
+
|
|
633
|
+
@dataform_stub.delete_team_folder_tree request, options do |result, operation|
|
|
634
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
635
|
+
yield result, operation if block_given?
|
|
636
|
+
throw :response, result
|
|
637
|
+
end
|
|
638
|
+
rescue ::Gapic::Rest::Error => e
|
|
639
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
##
|
|
643
|
+
# Returns the contents of a given TeamFolder.
|
|
644
|
+
#
|
|
645
|
+
# @overload query_team_folder_contents(request, options = nil)
|
|
646
|
+
# Pass arguments to `query_team_folder_contents` via a request object, either of type
|
|
647
|
+
# {::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest} or an equivalent Hash.
|
|
648
|
+
#
|
|
649
|
+
# @param request [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest, ::Hash]
|
|
650
|
+
# A request object representing the call parameters. Required. To specify no
|
|
651
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
652
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
653
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
654
|
+
#
|
|
655
|
+
# @overload query_team_folder_contents(team_folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
|
656
|
+
# Pass arguments to `query_team_folder_contents` via keyword arguments. Note that at
|
|
657
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
658
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
659
|
+
#
|
|
660
|
+
# @param team_folder [::String]
|
|
661
|
+
# Required. Name of the team_folder whose contents to list.
|
|
662
|
+
# Format: `projects/*/locations/*/teamFolders/*`.
|
|
663
|
+
# @param page_size [::Integer]
|
|
664
|
+
# Optional. Maximum number of paths to return. The server may return fewer
|
|
665
|
+
# items than requested. If unspecified, the server will pick an appropriate
|
|
666
|
+
# default.
|
|
667
|
+
# @param page_token [::String]
|
|
668
|
+
# Optional. Page token received from a previous `QueryTeamFolderContents`
|
|
669
|
+
# call. Provide this to retrieve the subsequent page.
|
|
670
|
+
#
|
|
671
|
+
# When paginating, all other parameters provided to
|
|
672
|
+
# `QueryTeamFolderContents`, with the exception of `page_size`, must match
|
|
673
|
+
# the call that provided the page token.
|
|
674
|
+
# @param order_by [::String]
|
|
675
|
+
# Optional. Field to additionally sort results by.
|
|
676
|
+
# Will order Folders before Repositories, and then by `order_by` in ascending
|
|
677
|
+
# order. Supported keywords: `display_name` (default), `create_time`,
|
|
678
|
+
# last_modified_time.
|
|
679
|
+
# Examples:
|
|
680
|
+
# - `orderBy="display_name"`
|
|
681
|
+
# - `orderBy="display_name desc"`
|
|
682
|
+
# @param filter [::String]
|
|
683
|
+
# Optional. Optional filtering for the returned list. Filtering is currently
|
|
684
|
+
# only supported on the `display_name` field.
|
|
685
|
+
#
|
|
686
|
+
# Example:
|
|
687
|
+
# - `filter="display_name="MyFolder""`
|
|
688
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
689
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
|
|
690
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
691
|
+
#
|
|
692
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
|
|
693
|
+
#
|
|
694
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
695
|
+
#
|
|
696
|
+
# @example Basic example
|
|
697
|
+
# require "google/cloud/dataform/v1"
|
|
698
|
+
#
|
|
699
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
700
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
701
|
+
#
|
|
702
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
703
|
+
# request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new
|
|
704
|
+
#
|
|
705
|
+
# # Call the query_team_folder_contents method.
|
|
706
|
+
# result = client.query_team_folder_contents request
|
|
707
|
+
#
|
|
708
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
709
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
710
|
+
# result.each do |item|
|
|
711
|
+
# # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry.
|
|
712
|
+
# p item
|
|
713
|
+
# end
|
|
714
|
+
#
|
|
715
|
+
def query_team_folder_contents request, options = nil
|
|
716
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
717
|
+
|
|
718
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest
|
|
719
|
+
|
|
720
|
+
# Converts hash and nil to an options object
|
|
721
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
722
|
+
|
|
723
|
+
# Customize the options with defaults
|
|
724
|
+
call_metadata = @config.rpcs.query_team_folder_contents.metadata.to_h
|
|
725
|
+
|
|
726
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
727
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
728
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
729
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
730
|
+
transports_version_send: [:rest]
|
|
731
|
+
|
|
732
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
733
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
734
|
+
|
|
735
|
+
options.apply_defaults timeout: @config.rpcs.query_team_folder_contents.timeout,
|
|
736
|
+
metadata: call_metadata,
|
|
737
|
+
retry_policy: @config.rpcs.query_team_folder_contents.retry_policy
|
|
738
|
+
|
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
|
740
|
+
metadata: @config.metadata,
|
|
741
|
+
retry_policy: @config.retry_policy
|
|
742
|
+
|
|
743
|
+
@dataform_stub.query_team_folder_contents request, options do |result, operation|
|
|
744
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_team_folder_contents, "entries", request, result, options
|
|
745
|
+
yield result, operation if block_given?
|
|
746
|
+
throw :response, result
|
|
747
|
+
end
|
|
748
|
+
rescue ::Gapic::Rest::Error => e
|
|
749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
750
|
+
end
|
|
751
|
+
|
|
752
|
+
##
|
|
753
|
+
# Returns all TeamFolders in a given location that the caller has access to
|
|
754
|
+
# and match the provided filter.
|
|
755
|
+
#
|
|
756
|
+
# @overload search_team_folders(request, options = nil)
|
|
757
|
+
# Pass arguments to `search_team_folders` via a request object, either of type
|
|
758
|
+
# {::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest} or an equivalent Hash.
|
|
759
|
+
#
|
|
760
|
+
# @param request [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, ::Hash]
|
|
761
|
+
# A request object representing the call parameters. Required. To specify no
|
|
762
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
763
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
764
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
765
|
+
#
|
|
766
|
+
# @overload search_team_folders(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
|
767
|
+
# Pass arguments to `search_team_folders` via keyword arguments. Note that at
|
|
768
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
769
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
770
|
+
#
|
|
771
|
+
# @param location [::String]
|
|
772
|
+
# Required. Location in which to query TeamFolders.
|
|
773
|
+
# Format: `projects/*/locations/*`.
|
|
774
|
+
# @param page_size [::Integer]
|
|
775
|
+
# Optional. Maximum number of TeamFolders to return. The server may return
|
|
776
|
+
# fewer items than requested. If unspecified, the server will pick an
|
|
777
|
+
# appropriate default.
|
|
778
|
+
# @param page_token [::String]
|
|
779
|
+
# Optional. Page token received from a previous `SearchTeamFolders` call.
|
|
780
|
+
# Provide this to retrieve the subsequent page.
|
|
781
|
+
#
|
|
782
|
+
# When paginating, all other parameters provided to
|
|
783
|
+
# `SearchTeamFolders`, with the exception of `page_size`, must
|
|
784
|
+
# match the call that provided the page token.
|
|
785
|
+
# @param order_by [::String]
|
|
786
|
+
# Optional. Field to additionally sort results by.
|
|
787
|
+
# Supported keywords: `display_name` (default), `create_time`,
|
|
788
|
+
# `last_modified_time`. Examples:
|
|
789
|
+
# - `orderBy="display_name"`
|
|
790
|
+
# - `orderBy="display_name desc"`
|
|
791
|
+
# @param filter [::String]
|
|
792
|
+
# Optional. Optional filtering for the returned list. Filtering is currently
|
|
793
|
+
# only supported on the `display_name` field.
|
|
794
|
+
#
|
|
795
|
+
# Example:
|
|
796
|
+
# - `filter="display_name="MyFolder""`
|
|
797
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
798
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
|
|
799
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
800
|
+
#
|
|
801
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
|
|
802
|
+
#
|
|
803
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
804
|
+
#
|
|
805
|
+
# @example Basic example
|
|
806
|
+
# require "google/cloud/dataform/v1"
|
|
807
|
+
#
|
|
808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
809
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
810
|
+
#
|
|
811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
812
|
+
# request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new
|
|
813
|
+
#
|
|
814
|
+
# # Call the search_team_folders method.
|
|
815
|
+
# result = client.search_team_folders request
|
|
816
|
+
#
|
|
817
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
818
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
819
|
+
# result.each do |item|
|
|
820
|
+
# # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult.
|
|
821
|
+
# p item
|
|
822
|
+
# end
|
|
823
|
+
#
|
|
824
|
+
def search_team_folders request, options = nil
|
|
825
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
826
|
+
|
|
827
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest
|
|
828
|
+
|
|
829
|
+
# Converts hash and nil to an options object
|
|
830
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
831
|
+
|
|
832
|
+
# Customize the options with defaults
|
|
833
|
+
call_metadata = @config.rpcs.search_team_folders.metadata.to_h
|
|
834
|
+
|
|
835
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
836
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
837
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
838
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
839
|
+
transports_version_send: [:rest]
|
|
840
|
+
|
|
841
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
842
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
843
|
+
|
|
844
|
+
options.apply_defaults timeout: @config.rpcs.search_team_folders.timeout,
|
|
845
|
+
metadata: call_metadata,
|
|
846
|
+
retry_policy: @config.rpcs.search_team_folders.retry_policy
|
|
847
|
+
|
|
848
|
+
options.apply_defaults timeout: @config.timeout,
|
|
849
|
+
metadata: @config.metadata,
|
|
850
|
+
retry_policy: @config.retry_policy
|
|
851
|
+
|
|
852
|
+
@dataform_stub.search_team_folders request, options do |result, operation|
|
|
853
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :search_team_folders, "results", request, result, options
|
|
854
|
+
yield result, operation if block_given?
|
|
855
|
+
throw :response, result
|
|
856
|
+
end
|
|
857
|
+
rescue ::Gapic::Rest::Error => e
|
|
858
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
##
|
|
862
|
+
# Fetches a single Folder.
|
|
863
|
+
#
|
|
864
|
+
# @overload get_folder(request, options = nil)
|
|
865
|
+
# Pass arguments to `get_folder` via a request object, either of type
|
|
866
|
+
# {::Google::Cloud::Dataform::V1::GetFolderRequest} or an equivalent Hash.
|
|
867
|
+
#
|
|
868
|
+
# @param request [::Google::Cloud::Dataform::V1::GetFolderRequest, ::Hash]
|
|
869
|
+
# A request object representing the call parameters. Required. To specify no
|
|
870
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
871
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
872
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
873
|
+
#
|
|
874
|
+
# @overload get_folder(name: nil)
|
|
875
|
+
# Pass arguments to `get_folder` via keyword arguments. Note that at
|
|
876
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
877
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
878
|
+
#
|
|
879
|
+
# @param name [::String]
|
|
880
|
+
# Required. The Folder's name.
|
|
881
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
882
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
|
|
883
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
884
|
+
#
|
|
885
|
+
# @return [::Google::Cloud::Dataform::V1::Folder]
|
|
886
|
+
#
|
|
887
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
888
|
+
#
|
|
889
|
+
# @example Basic example
|
|
890
|
+
# require "google/cloud/dataform/v1"
|
|
891
|
+
#
|
|
892
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
893
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
894
|
+
#
|
|
895
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
896
|
+
# request = Google::Cloud::Dataform::V1::GetFolderRequest.new
|
|
897
|
+
#
|
|
898
|
+
# # Call the get_folder method.
|
|
899
|
+
# result = client.get_folder request
|
|
900
|
+
#
|
|
901
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::Folder.
|
|
902
|
+
# p result
|
|
903
|
+
#
|
|
904
|
+
def get_folder request, options = nil
|
|
905
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
906
|
+
|
|
907
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetFolderRequest
|
|
908
|
+
|
|
909
|
+
# Converts hash and nil to an options object
|
|
910
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
911
|
+
|
|
912
|
+
# Customize the options with defaults
|
|
913
|
+
call_metadata = @config.rpcs.get_folder.metadata.to_h
|
|
914
|
+
|
|
915
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
916
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
917
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
918
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
919
|
+
transports_version_send: [:rest]
|
|
920
|
+
|
|
921
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
922
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
923
|
+
|
|
924
|
+
options.apply_defaults timeout: @config.rpcs.get_folder.timeout,
|
|
925
|
+
metadata: call_metadata,
|
|
926
|
+
retry_policy: @config.rpcs.get_folder.retry_policy
|
|
927
|
+
|
|
928
|
+
options.apply_defaults timeout: @config.timeout,
|
|
929
|
+
metadata: @config.metadata,
|
|
930
|
+
retry_policy: @config.retry_policy
|
|
931
|
+
|
|
932
|
+
@dataform_stub.get_folder request, options do |result, operation|
|
|
933
|
+
yield result, operation if block_given?
|
|
934
|
+
end
|
|
935
|
+
rescue ::Gapic::Rest::Error => e
|
|
936
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
##
|
|
940
|
+
# Creates a new Folder in a given project and location.
|
|
941
|
+
#
|
|
942
|
+
# @overload create_folder(request, options = nil)
|
|
943
|
+
# Pass arguments to `create_folder` via a request object, either of type
|
|
944
|
+
# {::Google::Cloud::Dataform::V1::CreateFolderRequest} or an equivalent Hash.
|
|
945
|
+
#
|
|
946
|
+
# @param request [::Google::Cloud::Dataform::V1::CreateFolderRequest, ::Hash]
|
|
947
|
+
# A request object representing the call parameters. Required. To specify no
|
|
948
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
949
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
950
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
951
|
+
#
|
|
952
|
+
# @overload create_folder(parent: nil, folder: nil)
|
|
953
|
+
# Pass arguments to `create_folder` via keyword arguments. Note that at
|
|
954
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
955
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
956
|
+
#
|
|
957
|
+
# @param parent [::String]
|
|
958
|
+
# Required. The location in which to create the Folder. Must be in the format
|
|
959
|
+
# `projects/*/locations/*`.
|
|
960
|
+
# @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
|
|
961
|
+
# Required. The Folder to create.
|
|
962
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
963
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
|
|
964
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
965
|
+
#
|
|
966
|
+
# @return [::Google::Cloud::Dataform::V1::Folder]
|
|
967
|
+
#
|
|
968
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
969
|
+
#
|
|
970
|
+
# @example Basic example
|
|
971
|
+
# require "google/cloud/dataform/v1"
|
|
972
|
+
#
|
|
973
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
974
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
975
|
+
#
|
|
976
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
977
|
+
# request = Google::Cloud::Dataform::V1::CreateFolderRequest.new
|
|
978
|
+
#
|
|
979
|
+
# # Call the create_folder method.
|
|
980
|
+
# result = client.create_folder request
|
|
981
|
+
#
|
|
982
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::Folder.
|
|
983
|
+
# p result
|
|
984
|
+
#
|
|
985
|
+
def create_folder request, options = nil
|
|
986
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
987
|
+
|
|
988
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateFolderRequest
|
|
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
|
+
call_metadata = @config.rpcs.create_folder.metadata.to_h
|
|
995
|
+
|
|
996
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
997
|
+
call_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::Dataform::V1::VERSION,
|
|
1000
|
+
transports_version_send: [:rest]
|
|
1001
|
+
|
|
1002
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1003
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1004
|
+
|
|
1005
|
+
options.apply_defaults timeout: @config.rpcs.create_folder.timeout,
|
|
1006
|
+
metadata: call_metadata,
|
|
1007
|
+
retry_policy: @config.rpcs.create_folder.retry_policy
|
|
1008
|
+
|
|
1009
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1010
|
+
metadata: @config.metadata,
|
|
1011
|
+
retry_policy: @config.retry_policy
|
|
1012
|
+
|
|
1013
|
+
@dataform_stub.create_folder request, options do |result, operation|
|
|
1014
|
+
yield result, operation if block_given?
|
|
1015
|
+
end
|
|
1016
|
+
rescue ::Gapic::Rest::Error => e
|
|
1017
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
##
|
|
1021
|
+
# Updates a single Folder.
|
|
1022
|
+
#
|
|
1023
|
+
# @overload update_folder(request, options = nil)
|
|
1024
|
+
# Pass arguments to `update_folder` via a request object, either of type
|
|
1025
|
+
# {::Google::Cloud::Dataform::V1::UpdateFolderRequest} or an equivalent Hash.
|
|
1026
|
+
#
|
|
1027
|
+
# @param request [::Google::Cloud::Dataform::V1::UpdateFolderRequest, ::Hash]
|
|
1028
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1029
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1030
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1031
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1032
|
+
#
|
|
1033
|
+
# @overload update_folder(update_mask: nil, folder: nil)
|
|
1034
|
+
# Pass arguments to `update_folder` via keyword arguments. Note that at
|
|
1035
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1036
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1037
|
+
#
|
|
1038
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1039
|
+
# Optional. Specifies the fields to be updated in the Folder. If left unset,
|
|
1040
|
+
# all fields that can be updated, will be updated. A few fields cannot be
|
|
1041
|
+
# updated and will be ignored if specified in the update_mask (e.g.
|
|
1042
|
+
# parent_name, team_folder_name).
|
|
1043
|
+
# @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
|
|
1044
|
+
# Required. The updated Folder.
|
|
1045
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1046
|
+
# @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
|
|
1047
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1048
|
+
#
|
|
1049
|
+
# @return [::Google::Cloud::Dataform::V1::Folder]
|
|
1050
|
+
#
|
|
1051
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1052
|
+
#
|
|
1053
|
+
# @example Basic example
|
|
1054
|
+
# require "google/cloud/dataform/v1"
|
|
1055
|
+
#
|
|
1056
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1057
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1058
|
+
#
|
|
1059
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1060
|
+
# request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new
|
|
1061
|
+
#
|
|
1062
|
+
# # Call the update_folder method.
|
|
1063
|
+
# result = client.update_folder request
|
|
1064
|
+
#
|
|
1065
|
+
# # The returned object is of type Google::Cloud::Dataform::V1::Folder.
|
|
1066
|
+
# p result
|
|
1067
|
+
#
|
|
1068
|
+
def update_folder request, options = nil
|
|
1069
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1070
|
+
|
|
1071
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateFolderRequest
|
|
1072
|
+
|
|
1073
|
+
# Converts hash and nil to an options object
|
|
1074
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1075
|
+
|
|
1076
|
+
# Customize the options with defaults
|
|
1077
|
+
call_metadata = @config.rpcs.update_folder.metadata.to_h
|
|
1078
|
+
|
|
1079
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1080
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1081
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1082
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
1083
|
+
transports_version_send: [:rest]
|
|
1084
|
+
|
|
1085
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1086
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1087
|
+
|
|
1088
|
+
options.apply_defaults timeout: @config.rpcs.update_folder.timeout,
|
|
1089
|
+
metadata: call_metadata,
|
|
1090
|
+
retry_policy: @config.rpcs.update_folder.retry_policy
|
|
1091
|
+
|
|
1092
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1093
|
+
metadata: @config.metadata,
|
|
1094
|
+
retry_policy: @config.retry_policy
|
|
1095
|
+
|
|
1096
|
+
@dataform_stub.update_folder request, options do |result, operation|
|
|
1097
|
+
yield result, operation if block_given?
|
|
1098
|
+
end
|
|
1099
|
+
rescue ::Gapic::Rest::Error => e
|
|
1100
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1101
|
+
end
|
|
1102
|
+
|
|
1103
|
+
##
|
|
1104
|
+
# Deletes a single Folder.
|
|
1105
|
+
#
|
|
1106
|
+
# @overload delete_folder(request, options = nil)
|
|
1107
|
+
# Pass arguments to `delete_folder` via a request object, either of type
|
|
1108
|
+
# {::Google::Cloud::Dataform::V1::DeleteFolderRequest} or an equivalent Hash.
|
|
1109
|
+
#
|
|
1110
|
+
# @param request [::Google::Cloud::Dataform::V1::DeleteFolderRequest, ::Hash]
|
|
1111
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1112
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1113
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1114
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1115
|
+
#
|
|
1116
|
+
# @overload delete_folder(name: nil)
|
|
1117
|
+
# Pass arguments to `delete_folder` via keyword arguments. Note that at
|
|
1118
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1119
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1120
|
+
#
|
|
1121
|
+
# @param name [::String]
|
|
1122
|
+
# Required. The Folder's name.
|
|
1123
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1124
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
1125
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1126
|
+
#
|
|
1127
|
+
# @return [::Google::Protobuf::Empty]
|
|
1128
|
+
#
|
|
1129
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1130
|
+
#
|
|
1131
|
+
# @example Basic example
|
|
1132
|
+
# require "google/cloud/dataform/v1"
|
|
1133
|
+
#
|
|
1134
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1135
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1136
|
+
#
|
|
1137
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1138
|
+
# request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new
|
|
1139
|
+
#
|
|
1140
|
+
# # Call the delete_folder method.
|
|
1141
|
+
# result = client.delete_folder request
|
|
1142
|
+
#
|
|
1143
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
1144
|
+
# p result
|
|
1145
|
+
#
|
|
1146
|
+
def delete_folder request, options = nil
|
|
1147
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1148
|
+
|
|
1149
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderRequest
|
|
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
|
+
call_metadata = @config.rpcs.delete_folder.metadata.to_h
|
|
1156
|
+
|
|
1157
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1158
|
+
call_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::Dataform::V1::VERSION,
|
|
1161
|
+
transports_version_send: [:rest]
|
|
1162
|
+
|
|
1163
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1164
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1165
|
+
|
|
1166
|
+
options.apply_defaults timeout: @config.rpcs.delete_folder.timeout,
|
|
1167
|
+
metadata: call_metadata,
|
|
1168
|
+
retry_policy: @config.rpcs.delete_folder.retry_policy
|
|
1169
|
+
|
|
1170
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1171
|
+
metadata: @config.metadata,
|
|
1172
|
+
retry_policy: @config.retry_policy
|
|
1173
|
+
|
|
1174
|
+
@dataform_stub.delete_folder request, options do |result, operation|
|
|
1175
|
+
yield result, operation if block_given?
|
|
1176
|
+
end
|
|
1177
|
+
rescue ::Gapic::Rest::Error => e
|
|
1178
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1179
|
+
end
|
|
1180
|
+
|
|
1181
|
+
##
|
|
1182
|
+
# Deletes a Folder with its contents (Folders, Repositories, Workspaces,
|
|
1183
|
+
# ReleaseConfigs, and WorkflowConfigs).
|
|
1184
|
+
#
|
|
1185
|
+
# @overload delete_folder_tree(request, options = nil)
|
|
1186
|
+
# Pass arguments to `delete_folder_tree` via a request object, either of type
|
|
1187
|
+
# {::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest} or an equivalent Hash.
|
|
1188
|
+
#
|
|
1189
|
+
# @param request [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, ::Hash]
|
|
1190
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1191
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1192
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1193
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1194
|
+
#
|
|
1195
|
+
# @overload delete_folder_tree(name: nil, force: nil)
|
|
1196
|
+
# Pass arguments to `delete_folder_tree` via keyword arguments. Note that at
|
|
1197
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1198
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1199
|
+
#
|
|
1200
|
+
# @param name [::String]
|
|
1201
|
+
# Required. The Folder's name.
|
|
1202
|
+
# Format: projects/\\{project}/locations/\\{location}/folders/\\{folder}
|
|
1203
|
+
# @param force [::Boolean]
|
|
1204
|
+
# Optional. If `false` (default): The operation will fail if any
|
|
1205
|
+
# Repository within the folder hierarchy has associated Release Configs or
|
|
1206
|
+
# Workflow Configs.
|
|
1207
|
+
#
|
|
1208
|
+
# If `true`: The operation will attempt to delete everything, including any
|
|
1209
|
+
# Release Configs and Workflow Configs linked to Repositories within the
|
|
1210
|
+
# folder hierarchy. This permanently removes schedules and resources.
|
|
1211
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1212
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1213
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1214
|
+
#
|
|
1215
|
+
# @return [::Gapic::Operation]
|
|
1216
|
+
#
|
|
1217
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1218
|
+
#
|
|
1219
|
+
# @example Basic example
|
|
1220
|
+
# require "google/cloud/dataform/v1"
|
|
1221
|
+
#
|
|
1222
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1223
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1224
|
+
#
|
|
1225
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1226
|
+
# request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new
|
|
1227
|
+
#
|
|
1228
|
+
# # Call the delete_folder_tree method.
|
|
1229
|
+
# result = client.delete_folder_tree request
|
|
1230
|
+
#
|
|
1231
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1232
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1233
|
+
# # Here is how to wait for a response.
|
|
1234
|
+
# result.wait_until_done! timeout: 60
|
|
1235
|
+
# if result.response?
|
|
1236
|
+
# p result.response
|
|
1237
|
+
# else
|
|
1238
|
+
# puts "No response received."
|
|
1239
|
+
# end
|
|
1240
|
+
#
|
|
1241
|
+
def delete_folder_tree request, options = nil
|
|
1242
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1243
|
+
|
|
1244
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest
|
|
1245
|
+
|
|
1246
|
+
# Converts hash and nil to an options object
|
|
1247
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1248
|
+
|
|
1249
|
+
# Customize the options with defaults
|
|
1250
|
+
call_metadata = @config.rpcs.delete_folder_tree.metadata.to_h
|
|
1251
|
+
|
|
1252
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1253
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1254
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1255
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
1256
|
+
transports_version_send: [:rest]
|
|
1257
|
+
|
|
1258
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1259
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1260
|
+
|
|
1261
|
+
options.apply_defaults timeout: @config.rpcs.delete_folder_tree.timeout,
|
|
1262
|
+
metadata: call_metadata,
|
|
1263
|
+
retry_policy: @config.rpcs.delete_folder_tree.retry_policy
|
|
1264
|
+
|
|
1265
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1266
|
+
metadata: @config.metadata,
|
|
1267
|
+
retry_policy: @config.retry_policy
|
|
1268
|
+
|
|
1269
|
+
@dataform_stub.delete_folder_tree request, options do |result, operation|
|
|
1270
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1271
|
+
yield result, operation if block_given?
|
|
1272
|
+
throw :response, result
|
|
1273
|
+
end
|
|
1274
|
+
rescue ::Gapic::Rest::Error => e
|
|
1275
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1276
|
+
end
|
|
1277
|
+
|
|
1278
|
+
##
|
|
1279
|
+
# Returns the contents of a given Folder.
|
|
1280
|
+
#
|
|
1281
|
+
# @overload query_folder_contents(request, options = nil)
|
|
1282
|
+
# Pass arguments to `query_folder_contents` via a request object, either of type
|
|
1283
|
+
# {::Google::Cloud::Dataform::V1::QueryFolderContentsRequest} or an equivalent Hash.
|
|
1284
|
+
#
|
|
1285
|
+
# @param request [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, ::Hash]
|
|
1286
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1287
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1288
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1289
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1290
|
+
#
|
|
1291
|
+
# @overload query_folder_contents(folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
|
1292
|
+
# Pass arguments to `query_folder_contents` via keyword arguments. Note that at
|
|
1293
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1294
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1295
|
+
#
|
|
1296
|
+
# @param folder [::String]
|
|
1297
|
+
# Required. Name of the folder whose contents to list.
|
|
1298
|
+
# Format: projects/*/locations/*/folders/*
|
|
1299
|
+
# @param page_size [::Integer]
|
|
1300
|
+
# Optional. Maximum number of paths to return. The server may return fewer
|
|
1301
|
+
# items than requested. If unspecified, the server will pick an appropriate
|
|
1302
|
+
# default.
|
|
1303
|
+
# @param page_token [::String]
|
|
1304
|
+
# Optional. Page token received from a previous `QueryFolderContents` call.
|
|
1305
|
+
# Provide this to retrieve the subsequent page.
|
|
1306
|
+
#
|
|
1307
|
+
# When paginating, all other parameters provided to
|
|
1308
|
+
# `QueryFolderContents`, with the exception of `page_size`, must match the
|
|
1309
|
+
# call that provided the page token.
|
|
1310
|
+
# @param order_by [::String]
|
|
1311
|
+
# Optional. Field to additionally sort results by.
|
|
1312
|
+
# Will order Folders before Repositories, and then by `order_by` in ascending
|
|
1313
|
+
# order. Supported keywords: display_name (default), create_time,
|
|
1314
|
+
# last_modified_time.
|
|
1315
|
+
# Examples:
|
|
1316
|
+
# - `orderBy="display_name"`
|
|
1317
|
+
# - `orderBy="display_name desc"`
|
|
1318
|
+
# @param filter [::String]
|
|
1319
|
+
# Optional. Optional filtering for the returned list. Filtering is currently
|
|
1320
|
+
# only supported on the `display_name` field.
|
|
1321
|
+
#
|
|
1322
|
+
# Example:
|
|
1323
|
+
# - `filter="display_name="MyFolder""`
|
|
1324
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1325
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
|
|
1326
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1327
|
+
#
|
|
1328
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
|
|
1329
|
+
#
|
|
1330
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1331
|
+
#
|
|
1332
|
+
# @example Basic example
|
|
1333
|
+
# require "google/cloud/dataform/v1"
|
|
1334
|
+
#
|
|
1335
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1336
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1337
|
+
#
|
|
1338
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1339
|
+
# request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new
|
|
1340
|
+
#
|
|
1341
|
+
# # Call the query_folder_contents method.
|
|
1342
|
+
# result = client.query_folder_contents request
|
|
1343
|
+
#
|
|
1344
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1345
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1346
|
+
# result.each do |item|
|
|
1347
|
+
# # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry.
|
|
1348
|
+
# p item
|
|
1349
|
+
# end
|
|
1350
|
+
#
|
|
1351
|
+
def query_folder_contents request, options = nil
|
|
1352
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1353
|
+
|
|
1354
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest
|
|
169
1355
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
config.quota_project = @quota_project_id
|
|
173
|
-
config.endpoint = @dataform_stub.endpoint
|
|
174
|
-
config.universe_domain = @dataform_stub.universe_domain
|
|
175
|
-
config.bindings_override = @config.bindings_override
|
|
176
|
-
config.logger = @dataform_stub.logger if config.respond_to? :logger=
|
|
177
|
-
end
|
|
1356
|
+
# Converts hash and nil to an options object
|
|
1357
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
178
1358
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
config.
|
|
185
|
-
|
|
1359
|
+
# Customize the options with defaults
|
|
1360
|
+
call_metadata = @config.rpcs.query_folder_contents.metadata.to_h
|
|
1361
|
+
|
|
1362
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1363
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1364
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1365
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
1366
|
+
transports_version_send: [:rest]
|
|
1367
|
+
|
|
1368
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1369
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1370
|
+
|
|
1371
|
+
options.apply_defaults timeout: @config.rpcs.query_folder_contents.timeout,
|
|
1372
|
+
metadata: call_metadata,
|
|
1373
|
+
retry_policy: @config.rpcs.query_folder_contents.retry_policy
|
|
1374
|
+
|
|
1375
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1376
|
+
metadata: @config.metadata,
|
|
1377
|
+
retry_policy: @config.retry_policy
|
|
1378
|
+
|
|
1379
|
+
@dataform_stub.query_folder_contents request, options do |result, operation|
|
|
1380
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_folder_contents, "entries", request, result, options
|
|
1381
|
+
yield result, operation if block_given?
|
|
1382
|
+
throw :response, result
|
|
186
1383
|
end
|
|
1384
|
+
rescue ::Gapic::Rest::Error => e
|
|
1385
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
187
1386
|
end
|
|
188
1387
|
|
|
189
1388
|
##
|
|
190
|
-
#
|
|
1389
|
+
# Returns the contents of a caller's root folder in a given location.
|
|
1390
|
+
# The root folder contains all resources that are created by the user and not
|
|
1391
|
+
# contained in any other folder.
|
|
191
1392
|
#
|
|
192
|
-
# @
|
|
1393
|
+
# @overload query_user_root_contents(request, options = nil)
|
|
1394
|
+
# Pass arguments to `query_user_root_contents` via a request object, either of type
|
|
1395
|
+
# {::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest} or an equivalent Hash.
|
|
193
1396
|
#
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
#
|
|
1397
|
+
# @param request [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, ::Hash]
|
|
1398
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1399
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1400
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1401
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
198
1402
|
#
|
|
199
|
-
# @
|
|
1403
|
+
# @overload query_user_root_contents(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
|
1404
|
+
# Pass arguments to `query_user_root_contents` via keyword arguments. Note that at
|
|
1405
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1406
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
200
1407
|
#
|
|
201
|
-
|
|
1408
|
+
# @param location [::String]
|
|
1409
|
+
# Required. Location of the user root folder whose contents to list.
|
|
1410
|
+
# Format: projects/*/locations/*
|
|
1411
|
+
# @param page_size [::Integer]
|
|
1412
|
+
# Optional. Maximum number of paths to return. The server may return fewer
|
|
1413
|
+
# items than requested. If unspecified, the server will pick an appropriate
|
|
1414
|
+
# default.
|
|
1415
|
+
# @param page_token [::String]
|
|
1416
|
+
# Optional. Page token received from a previous `QueryUserRootContents` call.
|
|
1417
|
+
# Provide this to retrieve the subsequent page.
|
|
1418
|
+
#
|
|
1419
|
+
# When paginating, all other parameters provided to
|
|
1420
|
+
# `QueryUserRootFolderContents`, with the exception of `page_size`, must
|
|
1421
|
+
# match the call that provided the page token.
|
|
1422
|
+
# @param order_by [::String]
|
|
1423
|
+
# Optional. Field to additionally sort results by.
|
|
1424
|
+
# Will order Folders before Repositories, and then by `order_by` in ascending
|
|
1425
|
+
# order. Supported keywords: display_name (default), created_at,
|
|
1426
|
+
# last_modified_at. Examples:
|
|
1427
|
+
# - `orderBy="display_name"`
|
|
1428
|
+
# - `orderBy="display_name desc"`
|
|
1429
|
+
# @param filter [::String]
|
|
1430
|
+
# Optional. Optional filtering for the returned list. Filtering is currently
|
|
1431
|
+
# only supported on the `display_name` field.
|
|
1432
|
+
#
|
|
1433
|
+
# Example:
|
|
1434
|
+
# - `filter="display_name="MyFolder""`
|
|
1435
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1436
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
|
|
1437
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1438
|
+
#
|
|
1439
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
|
|
1440
|
+
#
|
|
1441
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1442
|
+
#
|
|
1443
|
+
# @example Basic example
|
|
1444
|
+
# require "google/cloud/dataform/v1"
|
|
1445
|
+
#
|
|
1446
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1447
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1448
|
+
#
|
|
1449
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1450
|
+
# request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new
|
|
1451
|
+
#
|
|
1452
|
+
# # Call the query_user_root_contents method.
|
|
1453
|
+
# result = client.query_user_root_contents request
|
|
1454
|
+
#
|
|
1455
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1456
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1457
|
+
# result.each do |item|
|
|
1458
|
+
# # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry.
|
|
1459
|
+
# p item
|
|
1460
|
+
# end
|
|
1461
|
+
#
|
|
1462
|
+
def query_user_root_contents request, options = nil
|
|
1463
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1464
|
+
|
|
1465
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest
|
|
1466
|
+
|
|
1467
|
+
# Converts hash and nil to an options object
|
|
1468
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1469
|
+
|
|
1470
|
+
# Customize the options with defaults
|
|
1471
|
+
call_metadata = @config.rpcs.query_user_root_contents.metadata.to_h
|
|
1472
|
+
|
|
1473
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1474
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1475
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1476
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
1477
|
+
transports_version_send: [:rest]
|
|
1478
|
+
|
|
1479
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1480
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1481
|
+
|
|
1482
|
+
options.apply_defaults timeout: @config.rpcs.query_user_root_contents.timeout,
|
|
1483
|
+
metadata: call_metadata,
|
|
1484
|
+
retry_policy: @config.rpcs.query_user_root_contents.retry_policy
|
|
1485
|
+
|
|
1486
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1487
|
+
metadata: @config.metadata,
|
|
1488
|
+
retry_policy: @config.retry_policy
|
|
1489
|
+
|
|
1490
|
+
@dataform_stub.query_user_root_contents request, options do |result, operation|
|
|
1491
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_user_root_contents, "entries", request, result, options
|
|
1492
|
+
yield result, operation if block_given?
|
|
1493
|
+
throw :response, result
|
|
1494
|
+
end
|
|
1495
|
+
rescue ::Gapic::Rest::Error => e
|
|
1496
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1497
|
+
end
|
|
202
1498
|
|
|
203
1499
|
##
|
|
204
|
-
#
|
|
1500
|
+
# Moves a Folder to a new Folder, TeamFolder, or the root location.
|
|
205
1501
|
#
|
|
206
|
-
# @
|
|
1502
|
+
# @overload move_folder(request, options = nil)
|
|
1503
|
+
# Pass arguments to `move_folder` via a request object, either of type
|
|
1504
|
+
# {::Google::Cloud::Dataform::V1::MoveFolderRequest} or an equivalent Hash.
|
|
207
1505
|
#
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1506
|
+
# @param request [::Google::Cloud::Dataform::V1::MoveFolderRequest, ::Hash]
|
|
1507
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1508
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1509
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1510
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1511
|
+
#
|
|
1512
|
+
# @overload move_folder(name: nil, destination_containing_folder: nil)
|
|
1513
|
+
# Pass arguments to `move_folder` via keyword arguments. Note that at
|
|
1514
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1515
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1516
|
+
#
|
|
1517
|
+
# @param name [::String]
|
|
1518
|
+
# Required. The full resource name of the Folder to move.
|
|
1519
|
+
# @param destination_containing_folder [::String]
|
|
1520
|
+
# Optional. The name of the Folder, TeamFolder, or root location to move the
|
|
1521
|
+
# Folder to. Can be in the format of: "" to move into the root User folder,
|
|
1522
|
+
# `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
|
|
1523
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1524
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1525
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1526
|
+
#
|
|
1527
|
+
# @return [::Gapic::Operation]
|
|
1528
|
+
#
|
|
1529
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1530
|
+
#
|
|
1531
|
+
# @example Basic example
|
|
1532
|
+
# require "google/cloud/dataform/v1"
|
|
1533
|
+
#
|
|
1534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1535
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1536
|
+
#
|
|
1537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1538
|
+
# request = Google::Cloud::Dataform::V1::MoveFolderRequest.new
|
|
1539
|
+
#
|
|
1540
|
+
# # Call the move_folder method.
|
|
1541
|
+
# result = client.move_folder request
|
|
1542
|
+
#
|
|
1543
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1544
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1545
|
+
# # Here is how to wait for a response.
|
|
1546
|
+
# result.wait_until_done! timeout: 60
|
|
1547
|
+
# if result.response?
|
|
1548
|
+
# p result.response
|
|
1549
|
+
# else
|
|
1550
|
+
# puts "No response received."
|
|
1551
|
+
# end
|
|
1552
|
+
#
|
|
1553
|
+
def move_folder request, options = nil
|
|
1554
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
211
1555
|
|
|
212
|
-
|
|
1556
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveFolderRequest
|
|
1557
|
+
|
|
1558
|
+
# Converts hash and nil to an options object
|
|
1559
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1560
|
+
|
|
1561
|
+
# Customize the options with defaults
|
|
1562
|
+
call_metadata = @config.rpcs.move_folder.metadata.to_h
|
|
1563
|
+
|
|
1564
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1565
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1566
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1567
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
1568
|
+
transports_version_send: [:rest]
|
|
1569
|
+
|
|
1570
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1571
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1572
|
+
|
|
1573
|
+
options.apply_defaults timeout: @config.rpcs.move_folder.timeout,
|
|
1574
|
+
metadata: call_metadata,
|
|
1575
|
+
retry_policy: @config.rpcs.move_folder.retry_policy
|
|
1576
|
+
|
|
1577
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1578
|
+
metadata: @config.metadata,
|
|
1579
|
+
retry_policy: @config.retry_policy
|
|
1580
|
+
|
|
1581
|
+
@dataform_stub.move_folder request, options do |result, operation|
|
|
1582
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1583
|
+
yield result, operation if block_given?
|
|
1584
|
+
throw :response, result
|
|
1585
|
+
end
|
|
1586
|
+
rescue ::Gapic::Rest::Error => e
|
|
1587
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1588
|
+
end
|
|
213
1589
|
|
|
214
1590
|
##
|
|
215
1591
|
# Lists Repositories in a given project and location.
|
|
@@ -571,28 +1947,115 @@ module Google
|
|
|
571
1947
|
# Pass arguments to `delete_repository` via a request object, either of type
|
|
572
1948
|
# {::Google::Cloud::Dataform::V1::DeleteRepositoryRequest} or an equivalent Hash.
|
|
573
1949
|
#
|
|
574
|
-
# @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash]
|
|
1950
|
+
# @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash]
|
|
1951
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1952
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1953
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1954
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1955
|
+
#
|
|
1956
|
+
# @overload delete_repository(name: nil, force: nil)
|
|
1957
|
+
# Pass arguments to `delete_repository` via keyword arguments. Note that at
|
|
1958
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1959
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1960
|
+
#
|
|
1961
|
+
# @param name [::String]
|
|
1962
|
+
# Required. The repository's name.
|
|
1963
|
+
# @param force [::Boolean]
|
|
1964
|
+
# Optional. If set to true, child resources of this repository (compilation
|
|
1965
|
+
# results and workflow invocations) will also be deleted. Otherwise, the
|
|
1966
|
+
# request will only succeed if the repository has no child resources.
|
|
1967
|
+
#
|
|
1968
|
+
# **Note:** *This flag doesn't support deletion of workspaces, release
|
|
1969
|
+
# configs or workflow configs. If any of such resources exists in the
|
|
1970
|
+
# repository, the request will fail.*.
|
|
1971
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1972
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
1973
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1974
|
+
#
|
|
1975
|
+
# @return [::Google::Protobuf::Empty]
|
|
1976
|
+
#
|
|
1977
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1978
|
+
#
|
|
1979
|
+
# @example Basic example
|
|
1980
|
+
# require "google/cloud/dataform/v1"
|
|
1981
|
+
#
|
|
1982
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1983
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
1984
|
+
#
|
|
1985
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1986
|
+
# request = Google::Cloud::Dataform::V1::DeleteRepositoryRequest.new
|
|
1987
|
+
#
|
|
1988
|
+
# # Call the delete_repository method.
|
|
1989
|
+
# result = client.delete_repository request
|
|
1990
|
+
#
|
|
1991
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
1992
|
+
# p result
|
|
1993
|
+
#
|
|
1994
|
+
def delete_repository request, options = nil
|
|
1995
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1996
|
+
|
|
1997
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest
|
|
1998
|
+
|
|
1999
|
+
# Converts hash and nil to an options object
|
|
2000
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2001
|
+
|
|
2002
|
+
# Customize the options with defaults
|
|
2003
|
+
call_metadata = @config.rpcs.delete_repository.metadata.to_h
|
|
2004
|
+
|
|
2005
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2006
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2007
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2008
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
2009
|
+
transports_version_send: [:rest]
|
|
2010
|
+
|
|
2011
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2012
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2013
|
+
|
|
2014
|
+
options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
|
|
2015
|
+
metadata: call_metadata,
|
|
2016
|
+
retry_policy: @config.rpcs.delete_repository.retry_policy
|
|
2017
|
+
|
|
2018
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2019
|
+
metadata: @config.metadata,
|
|
2020
|
+
retry_policy: @config.retry_policy
|
|
2021
|
+
|
|
2022
|
+
@dataform_stub.delete_repository request, options do |result, operation|
|
|
2023
|
+
yield result, operation if block_given?
|
|
2024
|
+
end
|
|
2025
|
+
rescue ::Gapic::Rest::Error => e
|
|
2026
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2027
|
+
end
|
|
2028
|
+
|
|
2029
|
+
##
|
|
2030
|
+
# Moves a Repository to a new location.
|
|
2031
|
+
#
|
|
2032
|
+
# @overload move_repository(request, options = nil)
|
|
2033
|
+
# Pass arguments to `move_repository` via a request object, either of type
|
|
2034
|
+
# {::Google::Cloud::Dataform::V1::MoveRepositoryRequest} or an equivalent Hash.
|
|
2035
|
+
#
|
|
2036
|
+
# @param request [::Google::Cloud::Dataform::V1::MoveRepositoryRequest, ::Hash]
|
|
575
2037
|
# A request object representing the call parameters. Required. To specify no
|
|
576
2038
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
577
2039
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
578
2040
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
579
2041
|
#
|
|
580
|
-
# @overload
|
|
581
|
-
# Pass arguments to `
|
|
2042
|
+
# @overload move_repository(name: nil, destination_containing_folder: nil)
|
|
2043
|
+
# Pass arguments to `move_repository` via keyword arguments. Note that at
|
|
582
2044
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
583
2045
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
584
2046
|
#
|
|
585
2047
|
# @param name [::String]
|
|
586
|
-
# Required. The repository
|
|
587
|
-
# @param
|
|
588
|
-
# Optional.
|
|
589
|
-
#
|
|
590
|
-
#
|
|
2048
|
+
# Required. The full resource name of the repository to move.
|
|
2049
|
+
# @param destination_containing_folder [::String]
|
|
2050
|
+
# Optional. The name of the Folder, TeamFolder, or root location to move the
|
|
2051
|
+
# repository to. Can be in the format of: "" to move into the root User
|
|
2052
|
+
# folder, `projects/*/locations/*/folders/*`,
|
|
2053
|
+
# `projects/*/locations/*/teamFolders/*`
|
|
591
2054
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
592
|
-
# @yieldparam result [::
|
|
2055
|
+
# @yieldparam result [::Gapic::Operation]
|
|
593
2056
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
594
2057
|
#
|
|
595
|
-
# @return [::
|
|
2058
|
+
# @return [::Gapic::Operation]
|
|
596
2059
|
#
|
|
597
2060
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
598
2061
|
#
|
|
@@ -603,24 +2066,31 @@ module Google
|
|
|
603
2066
|
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
604
2067
|
#
|
|
605
2068
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
606
|
-
# request = Google::Cloud::Dataform::V1::
|
|
607
|
-
#
|
|
608
|
-
# # Call the
|
|
609
|
-
# result = client.
|
|
610
|
-
#
|
|
611
|
-
# # The returned object is of type
|
|
612
|
-
#
|
|
2069
|
+
# request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new
|
|
2070
|
+
#
|
|
2071
|
+
# # Call the move_repository method.
|
|
2072
|
+
# result = client.move_repository request
|
|
2073
|
+
#
|
|
2074
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
2075
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
2076
|
+
# # Here is how to wait for a response.
|
|
2077
|
+
# result.wait_until_done! timeout: 60
|
|
2078
|
+
# if result.response?
|
|
2079
|
+
# p result.response
|
|
2080
|
+
# else
|
|
2081
|
+
# puts "No response received."
|
|
2082
|
+
# end
|
|
613
2083
|
#
|
|
614
|
-
def
|
|
2084
|
+
def move_repository request, options = nil
|
|
615
2085
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
616
2086
|
|
|
617
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::
|
|
2087
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveRepositoryRequest
|
|
618
2088
|
|
|
619
2089
|
# Converts hash and nil to an options object
|
|
620
2090
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
621
2091
|
|
|
622
2092
|
# Customize the options with defaults
|
|
623
|
-
call_metadata = @config.rpcs.
|
|
2093
|
+
call_metadata = @config.rpcs.move_repository.metadata.to_h
|
|
624
2094
|
|
|
625
2095
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
626
2096
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -631,16 +2101,18 @@ module Google
|
|
|
631
2101
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
632
2102
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
633
2103
|
|
|
634
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2104
|
+
options.apply_defaults timeout: @config.rpcs.move_repository.timeout,
|
|
635
2105
|
metadata: call_metadata,
|
|
636
|
-
retry_policy: @config.rpcs.
|
|
2106
|
+
retry_policy: @config.rpcs.move_repository.retry_policy
|
|
637
2107
|
|
|
638
2108
|
options.apply_defaults timeout: @config.timeout,
|
|
639
2109
|
metadata: @config.metadata,
|
|
640
2110
|
retry_policy: @config.retry_policy
|
|
641
2111
|
|
|
642
|
-
@dataform_stub.
|
|
2112
|
+
@dataform_stub.move_repository request, options do |result, operation|
|
|
2113
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
643
2114
|
yield result, operation if block_given?
|
|
2115
|
+
throw :response, result
|
|
644
2116
|
end
|
|
645
2117
|
rescue ::Gapic::Rest::Error => e
|
|
646
2118
|
raise ::Google::Cloud::Error.from_error(e)
|
|
@@ -2181,7 +3653,7 @@ module Google
|
|
|
2181
3653
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2182
3654
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
2183
3655
|
#
|
|
2184
|
-
# @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil)
|
|
3656
|
+
# @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil, view: nil)
|
|
2185
3657
|
# Pass arguments to `query_directory_contents` via keyword arguments. Note that at
|
|
2186
3658
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2187
3659
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -2202,6 +3674,11 @@ module Google
|
|
|
2202
3674
|
# When paginating, all other parameters provided to
|
|
2203
3675
|
# `QueryDirectoryContents`, with the exception of `page_size`, must match the
|
|
2204
3676
|
# call that provided the page token.
|
|
3677
|
+
# @param view [::Google::Cloud::Dataform::V1::DirectoryContentsView]
|
|
3678
|
+
# Optional. Specifies the metadata to return for each directory entry.
|
|
3679
|
+
# If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
|
|
3680
|
+
# Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
|
|
3681
|
+
# CMEK-protected workspaces.
|
|
2205
3682
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
2206
3683
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::DirectoryEntry>]
|
|
2207
3684
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -4823,6 +6300,273 @@ module Google
|
|
|
4823
6300
|
raise ::Google::Cloud::Error.from_error(e)
|
|
4824
6301
|
end
|
|
4825
6302
|
|
|
6303
|
+
##
|
|
6304
|
+
# Gets the access control policy for a resource.
|
|
6305
|
+
# Returns an empty policy if the resource exists and does not have a policy
|
|
6306
|
+
# set.
|
|
6307
|
+
#
|
|
6308
|
+
# @overload get_iam_policy(request, options = nil)
|
|
6309
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
|
6310
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
|
6311
|
+
#
|
|
6312
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
|
6313
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6314
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6315
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6316
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6317
|
+
#
|
|
6318
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
|
6319
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
|
6320
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6321
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6322
|
+
#
|
|
6323
|
+
# @param resource [::String]
|
|
6324
|
+
# REQUIRED: The resource for which the policy is being requested.
|
|
6325
|
+
# See the operation documentation for the appropriate value for this field.
|
|
6326
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
|
6327
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
|
6328
|
+
# `GetIamPolicy`.
|
|
6329
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6330
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
|
6331
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6332
|
+
#
|
|
6333
|
+
# @return [::Google::Iam::V1::Policy]
|
|
6334
|
+
#
|
|
6335
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6336
|
+
#
|
|
6337
|
+
# @example Basic example
|
|
6338
|
+
# require "google/cloud/dataform/v1"
|
|
6339
|
+
#
|
|
6340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6341
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
6342
|
+
#
|
|
6343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6344
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
|
6345
|
+
#
|
|
6346
|
+
# # Call the get_iam_policy method.
|
|
6347
|
+
# result = client.get_iam_policy request
|
|
6348
|
+
#
|
|
6349
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
|
6350
|
+
# p result
|
|
6351
|
+
#
|
|
6352
|
+
def get_iam_policy request, options = nil
|
|
6353
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6354
|
+
|
|
6355
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
|
6356
|
+
|
|
6357
|
+
# Converts hash and nil to an options object
|
|
6358
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6359
|
+
|
|
6360
|
+
# Customize the options with defaults
|
|
6361
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
|
6362
|
+
|
|
6363
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6364
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6365
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6366
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
6367
|
+
transports_version_send: [:rest]
|
|
6368
|
+
|
|
6369
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6370
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6371
|
+
|
|
6372
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
|
6373
|
+
metadata: call_metadata,
|
|
6374
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
|
6375
|
+
|
|
6376
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6377
|
+
metadata: @config.metadata,
|
|
6378
|
+
retry_policy: @config.retry_policy
|
|
6379
|
+
|
|
6380
|
+
@dataform_stub.get_iam_policy request, options do |result, operation|
|
|
6381
|
+
yield result, operation if block_given?
|
|
6382
|
+
end
|
|
6383
|
+
rescue ::Gapic::Rest::Error => e
|
|
6384
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6385
|
+
end
|
|
6386
|
+
|
|
6387
|
+
##
|
|
6388
|
+
# Sets the access control policy on the specified resource. Replaces any
|
|
6389
|
+
# existing policy.
|
|
6390
|
+
#
|
|
6391
|
+
# Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
|
|
6392
|
+
#
|
|
6393
|
+
# @overload set_iam_policy(request, options = nil)
|
|
6394
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
|
6395
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
|
6396
|
+
#
|
|
6397
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
|
6398
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6399
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6400
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6401
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6402
|
+
#
|
|
6403
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
|
6404
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
|
6405
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6406
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6407
|
+
#
|
|
6408
|
+
# @param resource [::String]
|
|
6409
|
+
# REQUIRED: The resource for which the policy is being specified.
|
|
6410
|
+
# See the operation documentation for the appropriate value for this field.
|
|
6411
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
|
6412
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
|
6413
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
|
6414
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
|
6415
|
+
# might reject them.
|
|
6416
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
6417
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
|
6418
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
|
6419
|
+
# following default mask is used:
|
|
6420
|
+
#
|
|
6421
|
+
# `paths: "bindings, etag"`
|
|
6422
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6423
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
|
6424
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6425
|
+
#
|
|
6426
|
+
# @return [::Google::Iam::V1::Policy]
|
|
6427
|
+
#
|
|
6428
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6429
|
+
#
|
|
6430
|
+
# @example Basic example
|
|
6431
|
+
# require "google/cloud/dataform/v1"
|
|
6432
|
+
#
|
|
6433
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6434
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
6435
|
+
#
|
|
6436
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6437
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
|
6438
|
+
#
|
|
6439
|
+
# # Call the set_iam_policy method.
|
|
6440
|
+
# result = client.set_iam_policy request
|
|
6441
|
+
#
|
|
6442
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
|
6443
|
+
# p result
|
|
6444
|
+
#
|
|
6445
|
+
def set_iam_policy request, options = nil
|
|
6446
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6447
|
+
|
|
6448
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
|
6449
|
+
|
|
6450
|
+
# Converts hash and nil to an options object
|
|
6451
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6452
|
+
|
|
6453
|
+
# Customize the options with defaults
|
|
6454
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
|
6455
|
+
|
|
6456
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6457
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6458
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6459
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
6460
|
+
transports_version_send: [:rest]
|
|
6461
|
+
|
|
6462
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6463
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6464
|
+
|
|
6465
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
|
6466
|
+
metadata: call_metadata,
|
|
6467
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
|
6468
|
+
|
|
6469
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6470
|
+
metadata: @config.metadata,
|
|
6471
|
+
retry_policy: @config.retry_policy
|
|
6472
|
+
|
|
6473
|
+
@dataform_stub.set_iam_policy request, options do |result, operation|
|
|
6474
|
+
yield result, operation if block_given?
|
|
6475
|
+
end
|
|
6476
|
+
rescue ::Gapic::Rest::Error => e
|
|
6477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6478
|
+
end
|
|
6479
|
+
|
|
6480
|
+
##
|
|
6481
|
+
# Returns permissions that a caller has on the specified resource.
|
|
6482
|
+
# If the resource does not exist, this will return an empty set of
|
|
6483
|
+
# permissions, not a `NOT_FOUND` error.
|
|
6484
|
+
#
|
|
6485
|
+
# Note: This operation is designed to be used for building permission-aware
|
|
6486
|
+
# UIs and command-line tools, not for authorization checking. This operation
|
|
6487
|
+
# may "fail open" without warning.
|
|
6488
|
+
#
|
|
6489
|
+
# @overload test_iam_permissions(request, options = nil)
|
|
6490
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
|
6491
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
|
6492
|
+
#
|
|
6493
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
|
6494
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6495
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6496
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6497
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6498
|
+
#
|
|
6499
|
+
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
|
6500
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
|
6501
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6502
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6503
|
+
#
|
|
6504
|
+
# @param resource [::String]
|
|
6505
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
|
6506
|
+
# See the operation documentation for the appropriate value for this field.
|
|
6507
|
+
# @param permissions [::Array<::String>]
|
|
6508
|
+
# The set of permissions to check for the `resource`. Permissions with
|
|
6509
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
6510
|
+
# information see
|
|
6511
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
|
6512
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6513
|
+
# @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
|
|
6514
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6515
|
+
#
|
|
6516
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
|
6517
|
+
#
|
|
6518
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6519
|
+
#
|
|
6520
|
+
# @example Basic example
|
|
6521
|
+
# require "google/cloud/dataform/v1"
|
|
6522
|
+
#
|
|
6523
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6524
|
+
# client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
|
|
6525
|
+
#
|
|
6526
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6527
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
|
6528
|
+
#
|
|
6529
|
+
# # Call the test_iam_permissions method.
|
|
6530
|
+
# result = client.test_iam_permissions request
|
|
6531
|
+
#
|
|
6532
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
|
6533
|
+
# p result
|
|
6534
|
+
#
|
|
6535
|
+
def test_iam_permissions request, options = nil
|
|
6536
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6537
|
+
|
|
6538
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
|
6539
|
+
|
|
6540
|
+
# Converts hash and nil to an options object
|
|
6541
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6542
|
+
|
|
6543
|
+
# Customize the options with defaults
|
|
6544
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
|
6545
|
+
|
|
6546
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6547
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6548
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6549
|
+
gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
|
|
6550
|
+
transports_version_send: [:rest]
|
|
6551
|
+
|
|
6552
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6553
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6554
|
+
|
|
6555
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
|
6556
|
+
metadata: call_metadata,
|
|
6557
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
|
6558
|
+
|
|
6559
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6560
|
+
metadata: @config.metadata,
|
|
6561
|
+
retry_policy: @config.retry_policy
|
|
6562
|
+
|
|
6563
|
+
@dataform_stub.test_iam_permissions request, options do |result, operation|
|
|
6564
|
+
yield result, operation if block_given?
|
|
6565
|
+
end
|
|
6566
|
+
rescue ::Gapic::Rest::Error => e
|
|
6567
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6568
|
+
end
|
|
6569
|
+
|
|
4826
6570
|
##
|
|
4827
6571
|
# Configuration class for the Dataform REST API.
|
|
4828
6572
|
#
|
|
@@ -4839,17 +6583,17 @@ module Google
|
|
|
4839
6583
|
# @example
|
|
4840
6584
|
#
|
|
4841
6585
|
# # Modify the global config, setting the timeout for
|
|
4842
|
-
# #
|
|
6586
|
+
# # get_team_folder to 20 seconds,
|
|
4843
6587
|
# # and all remaining timeouts to 10 seconds.
|
|
4844
6588
|
# ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.configure do |config|
|
|
4845
6589
|
# config.timeout = 10.0
|
|
4846
|
-
# config.rpcs.
|
|
6590
|
+
# config.rpcs.get_team_folder.timeout = 20.0
|
|
4847
6591
|
# end
|
|
4848
6592
|
#
|
|
4849
6593
|
# # Apply the above configuration only to a new client.
|
|
4850
6594
|
# client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config|
|
|
4851
6595
|
# config.timeout = 10.0
|
|
4852
|
-
# config.rpcs.
|
|
6596
|
+
# config.rpcs.get_team_folder.timeout = 20.0
|
|
4853
6597
|
# end
|
|
4854
6598
|
#
|
|
4855
6599
|
# @!attribute [rw] endpoint
|
|
@@ -4893,6 +6637,7 @@ module Google
|
|
|
4893
6637
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
4894
6638
|
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
4895
6639
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
6640
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
4896
6641
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
4897
6642
|
# trigger a retry.
|
|
4898
6643
|
# @return [::Hash]
|
|
@@ -4972,10 +6717,86 @@ module Google
|
|
|
4972
6717
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
4973
6718
|
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
4974
6719
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
6720
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
4975
6721
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
4976
6722
|
# trigger a retry.
|
|
4977
6723
|
#
|
|
4978
6724
|
class Rpcs
|
|
6725
|
+
##
|
|
6726
|
+
# RPC-specific configuration for `get_team_folder`
|
|
6727
|
+
# @return [::Gapic::Config::Method]
|
|
6728
|
+
#
|
|
6729
|
+
attr_reader :get_team_folder
|
|
6730
|
+
##
|
|
6731
|
+
# RPC-specific configuration for `create_team_folder`
|
|
6732
|
+
# @return [::Gapic::Config::Method]
|
|
6733
|
+
#
|
|
6734
|
+
attr_reader :create_team_folder
|
|
6735
|
+
##
|
|
6736
|
+
# RPC-specific configuration for `update_team_folder`
|
|
6737
|
+
# @return [::Gapic::Config::Method]
|
|
6738
|
+
#
|
|
6739
|
+
attr_reader :update_team_folder
|
|
6740
|
+
##
|
|
6741
|
+
# RPC-specific configuration for `delete_team_folder`
|
|
6742
|
+
# @return [::Gapic::Config::Method]
|
|
6743
|
+
#
|
|
6744
|
+
attr_reader :delete_team_folder
|
|
6745
|
+
##
|
|
6746
|
+
# RPC-specific configuration for `delete_team_folder_tree`
|
|
6747
|
+
# @return [::Gapic::Config::Method]
|
|
6748
|
+
#
|
|
6749
|
+
attr_reader :delete_team_folder_tree
|
|
6750
|
+
##
|
|
6751
|
+
# RPC-specific configuration for `query_team_folder_contents`
|
|
6752
|
+
# @return [::Gapic::Config::Method]
|
|
6753
|
+
#
|
|
6754
|
+
attr_reader :query_team_folder_contents
|
|
6755
|
+
##
|
|
6756
|
+
# RPC-specific configuration for `search_team_folders`
|
|
6757
|
+
# @return [::Gapic::Config::Method]
|
|
6758
|
+
#
|
|
6759
|
+
attr_reader :search_team_folders
|
|
6760
|
+
##
|
|
6761
|
+
# RPC-specific configuration for `get_folder`
|
|
6762
|
+
# @return [::Gapic::Config::Method]
|
|
6763
|
+
#
|
|
6764
|
+
attr_reader :get_folder
|
|
6765
|
+
##
|
|
6766
|
+
# RPC-specific configuration for `create_folder`
|
|
6767
|
+
# @return [::Gapic::Config::Method]
|
|
6768
|
+
#
|
|
6769
|
+
attr_reader :create_folder
|
|
6770
|
+
##
|
|
6771
|
+
# RPC-specific configuration for `update_folder`
|
|
6772
|
+
# @return [::Gapic::Config::Method]
|
|
6773
|
+
#
|
|
6774
|
+
attr_reader :update_folder
|
|
6775
|
+
##
|
|
6776
|
+
# RPC-specific configuration for `delete_folder`
|
|
6777
|
+
# @return [::Gapic::Config::Method]
|
|
6778
|
+
#
|
|
6779
|
+
attr_reader :delete_folder
|
|
6780
|
+
##
|
|
6781
|
+
# RPC-specific configuration for `delete_folder_tree`
|
|
6782
|
+
# @return [::Gapic::Config::Method]
|
|
6783
|
+
#
|
|
6784
|
+
attr_reader :delete_folder_tree
|
|
6785
|
+
##
|
|
6786
|
+
# RPC-specific configuration for `query_folder_contents`
|
|
6787
|
+
# @return [::Gapic::Config::Method]
|
|
6788
|
+
#
|
|
6789
|
+
attr_reader :query_folder_contents
|
|
6790
|
+
##
|
|
6791
|
+
# RPC-specific configuration for `query_user_root_contents`
|
|
6792
|
+
# @return [::Gapic::Config::Method]
|
|
6793
|
+
#
|
|
6794
|
+
attr_reader :query_user_root_contents
|
|
6795
|
+
##
|
|
6796
|
+
# RPC-specific configuration for `move_folder`
|
|
6797
|
+
# @return [::Gapic::Config::Method]
|
|
6798
|
+
#
|
|
6799
|
+
attr_reader :move_folder
|
|
4979
6800
|
##
|
|
4980
6801
|
# RPC-specific configuration for `list_repositories`
|
|
4981
6802
|
# @return [::Gapic::Config::Method]
|
|
@@ -5002,6 +6823,11 @@ module Google
|
|
|
5002
6823
|
#
|
|
5003
6824
|
attr_reader :delete_repository
|
|
5004
6825
|
##
|
|
6826
|
+
# RPC-specific configuration for `move_repository`
|
|
6827
|
+
# @return [::Gapic::Config::Method]
|
|
6828
|
+
#
|
|
6829
|
+
attr_reader :move_repository
|
|
6830
|
+
##
|
|
5005
6831
|
# RPC-specific configuration for `commit_repository_changes`
|
|
5006
6832
|
# @return [::Gapic::Config::Method]
|
|
5007
6833
|
#
|
|
@@ -5246,9 +7072,54 @@ module Google
|
|
|
5246
7072
|
# @return [::Gapic::Config::Method]
|
|
5247
7073
|
#
|
|
5248
7074
|
attr_reader :update_config
|
|
7075
|
+
##
|
|
7076
|
+
# RPC-specific configuration for `get_iam_policy`
|
|
7077
|
+
# @return [::Gapic::Config::Method]
|
|
7078
|
+
#
|
|
7079
|
+
attr_reader :get_iam_policy
|
|
7080
|
+
##
|
|
7081
|
+
# RPC-specific configuration for `set_iam_policy`
|
|
7082
|
+
# @return [::Gapic::Config::Method]
|
|
7083
|
+
#
|
|
7084
|
+
attr_reader :set_iam_policy
|
|
7085
|
+
##
|
|
7086
|
+
# RPC-specific configuration for `test_iam_permissions`
|
|
7087
|
+
# @return [::Gapic::Config::Method]
|
|
7088
|
+
#
|
|
7089
|
+
attr_reader :test_iam_permissions
|
|
5249
7090
|
|
|
5250
7091
|
# @private
|
|
5251
7092
|
def initialize parent_rpcs = nil
|
|
7093
|
+
get_team_folder_config = parent_rpcs.get_team_folder if parent_rpcs.respond_to? :get_team_folder
|
|
7094
|
+
@get_team_folder = ::Gapic::Config::Method.new get_team_folder_config
|
|
7095
|
+
create_team_folder_config = parent_rpcs.create_team_folder if parent_rpcs.respond_to? :create_team_folder
|
|
7096
|
+
@create_team_folder = ::Gapic::Config::Method.new create_team_folder_config
|
|
7097
|
+
update_team_folder_config = parent_rpcs.update_team_folder if parent_rpcs.respond_to? :update_team_folder
|
|
7098
|
+
@update_team_folder = ::Gapic::Config::Method.new update_team_folder_config
|
|
7099
|
+
delete_team_folder_config = parent_rpcs.delete_team_folder if parent_rpcs.respond_to? :delete_team_folder
|
|
7100
|
+
@delete_team_folder = ::Gapic::Config::Method.new delete_team_folder_config
|
|
7101
|
+
delete_team_folder_tree_config = parent_rpcs.delete_team_folder_tree if parent_rpcs.respond_to? :delete_team_folder_tree
|
|
7102
|
+
@delete_team_folder_tree = ::Gapic::Config::Method.new delete_team_folder_tree_config
|
|
7103
|
+
query_team_folder_contents_config = parent_rpcs.query_team_folder_contents if parent_rpcs.respond_to? :query_team_folder_contents
|
|
7104
|
+
@query_team_folder_contents = ::Gapic::Config::Method.new query_team_folder_contents_config
|
|
7105
|
+
search_team_folders_config = parent_rpcs.search_team_folders if parent_rpcs.respond_to? :search_team_folders
|
|
7106
|
+
@search_team_folders = ::Gapic::Config::Method.new search_team_folders_config
|
|
7107
|
+
get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder
|
|
7108
|
+
@get_folder = ::Gapic::Config::Method.new get_folder_config
|
|
7109
|
+
create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder
|
|
7110
|
+
@create_folder = ::Gapic::Config::Method.new create_folder_config
|
|
7111
|
+
update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder
|
|
7112
|
+
@update_folder = ::Gapic::Config::Method.new update_folder_config
|
|
7113
|
+
delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder
|
|
7114
|
+
@delete_folder = ::Gapic::Config::Method.new delete_folder_config
|
|
7115
|
+
delete_folder_tree_config = parent_rpcs.delete_folder_tree if parent_rpcs.respond_to? :delete_folder_tree
|
|
7116
|
+
@delete_folder_tree = ::Gapic::Config::Method.new delete_folder_tree_config
|
|
7117
|
+
query_folder_contents_config = parent_rpcs.query_folder_contents if parent_rpcs.respond_to? :query_folder_contents
|
|
7118
|
+
@query_folder_contents = ::Gapic::Config::Method.new query_folder_contents_config
|
|
7119
|
+
query_user_root_contents_config = parent_rpcs.query_user_root_contents if parent_rpcs.respond_to? :query_user_root_contents
|
|
7120
|
+
@query_user_root_contents = ::Gapic::Config::Method.new query_user_root_contents_config
|
|
7121
|
+
move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder
|
|
7122
|
+
@move_folder = ::Gapic::Config::Method.new move_folder_config
|
|
5252
7123
|
list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
|
|
5253
7124
|
@list_repositories = ::Gapic::Config::Method.new list_repositories_config
|
|
5254
7125
|
get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
|
|
@@ -5259,6 +7130,8 @@ module Google
|
|
|
5259
7130
|
@update_repository = ::Gapic::Config::Method.new update_repository_config
|
|
5260
7131
|
delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository
|
|
5261
7132
|
@delete_repository = ::Gapic::Config::Method.new delete_repository_config
|
|
7133
|
+
move_repository_config = parent_rpcs.move_repository if parent_rpcs.respond_to? :move_repository
|
|
7134
|
+
@move_repository = ::Gapic::Config::Method.new move_repository_config
|
|
5262
7135
|
commit_repository_changes_config = parent_rpcs.commit_repository_changes if parent_rpcs.respond_to? :commit_repository_changes
|
|
5263
7136
|
@commit_repository_changes = ::Gapic::Config::Method.new commit_repository_changes_config
|
|
5264
7137
|
read_repository_file_config = parent_rpcs.read_repository_file if parent_rpcs.respond_to? :read_repository_file
|
|
@@ -5357,6 +7230,12 @@ module Google
|
|
|
5357
7230
|
@get_config = ::Gapic::Config::Method.new get_config_config
|
|
5358
7231
|
update_config_config = parent_rpcs.update_config if parent_rpcs.respond_to? :update_config
|
|
5359
7232
|
@update_config = ::Gapic::Config::Method.new update_config_config
|
|
7233
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
|
7234
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
|
7235
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
|
7236
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
|
7237
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
|
7238
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
|
5360
7239
|
|
|
5361
7240
|
yield self if block_given?
|
|
5362
7241
|
end
|