google-cloud-dataform-v1 0.3.0 → 0.5.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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +5 -5
  4. data/lib/google/cloud/dataform/v1/bindings_override.rb +0 -57
  5. data/lib/google/cloud/dataform/v1/dataform/client.rb +2069 -48
  6. data/lib/google/cloud/dataform/v1/dataform/operations.rb +843 -0
  7. data/lib/google/cloud/dataform/v1/dataform/paths.rb +59 -0
  8. data/lib/google/cloud/dataform/v1/dataform/rest/client.rb +1952 -65
  9. data/lib/google/cloud/dataform/v1/dataform/rest/operations.rb +927 -0
  10. data/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb +1719 -481
  11. data/lib/google/cloud/dataform/v1/dataform/rest.rb +1 -0
  12. data/lib/google/cloud/dataform/v1/dataform.rb +1 -0
  13. data/lib/google/cloud/dataform/v1/dataform_pb.rb +42 -1
  14. data/lib/google/cloud/dataform/v1/dataform_services_pb.rb +54 -0
  15. data/lib/google/cloud/dataform/v1/version.rb +1 -1
  16. data/lib/google/longrunning/bindings_override.rb +71 -0
  17. data/lib/google/longrunning/operations/client.rb +954 -0
  18. data/lib/google/longrunning/operations/credentials.rb +40 -0
  19. data/lib/google/longrunning/operations/operations.rb +839 -0
  20. data/lib/google/longrunning/operations/rest/client.rb +777 -0
  21. data/lib/google/longrunning/operations/rest/operations.rb +923 -0
  22. data/lib/google/longrunning/operations/rest/service_stub.rb +322 -0
  23. data/lib/google/longrunning/operations/rest.rb +57 -0
  24. data/lib/google/longrunning/operations.rb +59 -0
  25. data/lib/google/longrunning/rest.rb +34 -0
  26. data/lib/google/longrunning.rb +41 -0
  27. data/lib/google-cloud-dataform-v1.rb +1 -0
  28. data/proto_docs/google/api/client.rb +149 -29
  29. data/proto_docs/google/cloud/dataform/v1/dataform.rb +787 -9
  30. data/proto_docs/google/longrunning/operations.rb +191 -0
  31. 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,1436 @@ 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. Resource name of the TeamFolder to list contents for.
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
+ #
681
+ # * `orderBy="display_name"`
682
+ # * `orderBy="display_name desc"`
683
+ # @param filter [::String]
684
+ # Optional. Optional filtering for the returned list. Filtering is currently
685
+ # only supported on the `display_name` field.
686
+ #
687
+ # Example:
688
+ #
689
+ # * `filter="display_name="MyFolder""`
690
+ # @yield [result, operation] Access the result along with the TransportOperation object
691
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
692
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
693
+ #
694
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
695
+ #
696
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
697
+ #
698
+ # @example Basic example
699
+ # require "google/cloud/dataform/v1"
700
+ #
701
+ # # Create a client object. The client can be reused for multiple calls.
702
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
703
+ #
704
+ # # Create a request. To set request fields, pass in keyword arguments.
705
+ # request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new
706
+ #
707
+ # # Call the query_team_folder_contents method.
708
+ # result = client.query_team_folder_contents request
709
+ #
710
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
711
+ # # over elements, and API calls will be issued to fetch pages as needed.
712
+ # result.each do |item|
713
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry.
714
+ # p item
715
+ # end
716
+ #
717
+ def query_team_folder_contents request, options = nil
718
+ raise ::ArgumentError, "request must be provided" if request.nil?
719
+
720
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest
721
+
722
+ # Converts hash and nil to an options object
723
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
724
+
725
+ # Customize the options with defaults
726
+ call_metadata = @config.rpcs.query_team_folder_contents.metadata.to_h
727
+
728
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
729
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
730
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
731
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
732
+ transports_version_send: [:rest]
733
+
734
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
735
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
736
+
737
+ options.apply_defaults timeout: @config.rpcs.query_team_folder_contents.timeout,
738
+ metadata: call_metadata,
739
+ retry_policy: @config.rpcs.query_team_folder_contents.retry_policy
740
+
741
+ options.apply_defaults timeout: @config.timeout,
742
+ metadata: @config.metadata,
743
+ retry_policy: @config.retry_policy
744
+
745
+ @dataform_stub.query_team_folder_contents request, options do |result, operation|
746
+ result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_team_folder_contents, "entries", request, result, options
747
+ yield result, operation if block_given?
748
+ throw :response, result
749
+ end
750
+ rescue ::Gapic::Rest::Error => e
751
+ raise ::Google::Cloud::Error.from_error(e)
752
+ end
753
+
754
+ ##
755
+ # Returns all TeamFolders in a given location that the caller has access to
756
+ # and match the provided filter.
757
+ #
758
+ # @overload search_team_folders(request, options = nil)
759
+ # Pass arguments to `search_team_folders` via a request object, either of type
760
+ # {::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest} or an equivalent Hash.
761
+ #
762
+ # @param request [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, ::Hash]
763
+ # A request object representing the call parameters. Required. To specify no
764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
765
+ # @param options [::Gapic::CallOptions, ::Hash]
766
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
767
+ #
768
+ # @overload search_team_folders(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
769
+ # Pass arguments to `search_team_folders` via keyword arguments. Note that at
770
+ # least one keyword argument is required. To specify no parameters, or to keep all
771
+ # the default parameter values, pass an empty Hash as a request object (see above).
772
+ #
773
+ # @param location [::String]
774
+ # Required. Location in which to query TeamFolders.
775
+ # Format: `projects/*/locations/*`.
776
+ # @param page_size [::Integer]
777
+ # Optional. Maximum number of `TeamFolders` to return. The server may return
778
+ # fewer items than requested. If unspecified, the server will pick a default
779
+ # of `page_size` = 50.
780
+ # @param page_token [::String]
781
+ # Optional. Page token received from a previous `SearchTeamFolders` call.
782
+ # Provide this to retrieve the subsequent page.
783
+ #
784
+ # When paginating, all other parameters provided to
785
+ # `SearchTeamFolders`, with the exception of `page_size`, must
786
+ # match the call that provided the page token.
787
+ # @param order_by [::String]
788
+ # Optional. Field to additionally sort results by.
789
+ # Supported keywords: `display_name` (default), `create_time`,
790
+ # `last_modified_time`. Examples:
791
+ #
792
+ # * `orderBy="display_name"`
793
+ # * `orderBy="display_name desc"`
794
+ # @param filter [::String]
795
+ # Optional. Optional filtering for the returned list. Filtering is currently
796
+ # only supported on the `display_name` field.
797
+ #
798
+ # Example:
799
+ #
800
+ # * `filter="display_name="MyFolder""`
801
+ # @yield [result, operation] Access the result along with the TransportOperation object
802
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
803
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
804
+ #
805
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
806
+ #
807
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
808
+ #
809
+ # @example Basic example
810
+ # require "google/cloud/dataform/v1"
811
+ #
812
+ # # Create a client object. The client can be reused for multiple calls.
813
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
814
+ #
815
+ # # Create a request. To set request fields, pass in keyword arguments.
816
+ # request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new
817
+ #
818
+ # # Call the search_team_folders method.
819
+ # result = client.search_team_folders request
820
+ #
821
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
822
+ # # over elements, and API calls will be issued to fetch pages as needed.
823
+ # result.each do |item|
824
+ # # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult.
825
+ # p item
826
+ # end
827
+ #
828
+ def search_team_folders request, options = nil
829
+ raise ::ArgumentError, "request must be provided" if request.nil?
830
+
831
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest
832
+
833
+ # Converts hash and nil to an options object
834
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
835
+
836
+ # Customize the options with defaults
837
+ call_metadata = @config.rpcs.search_team_folders.metadata.to_h
838
+
839
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
840
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
841
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
842
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
843
+ transports_version_send: [:rest]
844
+
845
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
846
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
847
+
848
+ options.apply_defaults timeout: @config.rpcs.search_team_folders.timeout,
849
+ metadata: call_metadata,
850
+ retry_policy: @config.rpcs.search_team_folders.retry_policy
851
+
852
+ options.apply_defaults timeout: @config.timeout,
853
+ metadata: @config.metadata,
854
+ retry_policy: @config.retry_policy
855
+
856
+ @dataform_stub.search_team_folders request, options do |result, operation|
857
+ result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :search_team_folders, "results", request, result, options
858
+ yield result, operation if block_given?
859
+ throw :response, result
860
+ end
861
+ rescue ::Gapic::Rest::Error => e
862
+ raise ::Google::Cloud::Error.from_error(e)
863
+ end
864
+
865
+ ##
866
+ # Fetches a single Folder.
867
+ #
868
+ # @overload get_folder(request, options = nil)
869
+ # Pass arguments to `get_folder` via a request object, either of type
870
+ # {::Google::Cloud::Dataform::V1::GetFolderRequest} or an equivalent Hash.
871
+ #
872
+ # @param request [::Google::Cloud::Dataform::V1::GetFolderRequest, ::Hash]
873
+ # A request object representing the call parameters. Required. To specify no
874
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
875
+ # @param options [::Gapic::CallOptions, ::Hash]
876
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
877
+ #
878
+ # @overload get_folder(name: nil)
879
+ # Pass arguments to `get_folder` via keyword arguments. Note that at
880
+ # least one keyword argument is required. To specify no parameters, or to keep all
881
+ # the default parameter values, pass an empty Hash as a request object (see above).
882
+ #
883
+ # @param name [::String]
884
+ # Required. The Folder's name.
885
+ # @yield [result, operation] Access the result along with the TransportOperation object
886
+ # @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
887
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
888
+ #
889
+ # @return [::Google::Cloud::Dataform::V1::Folder]
890
+ #
891
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
892
+ #
893
+ # @example Basic example
894
+ # require "google/cloud/dataform/v1"
895
+ #
896
+ # # Create a client object. The client can be reused for multiple calls.
897
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
898
+ #
899
+ # # Create a request. To set request fields, pass in keyword arguments.
900
+ # request = Google::Cloud::Dataform::V1::GetFolderRequest.new
901
+ #
902
+ # # Call the get_folder method.
903
+ # result = client.get_folder request
904
+ #
905
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
906
+ # p result
907
+ #
908
+ def get_folder request, options = nil
909
+ raise ::ArgumentError, "request must be provided" if request.nil?
910
+
911
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetFolderRequest
912
+
913
+ # Converts hash and nil to an options object
914
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
915
+
916
+ # Customize the options with defaults
917
+ call_metadata = @config.rpcs.get_folder.metadata.to_h
918
+
919
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
920
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
921
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
922
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
923
+ transports_version_send: [:rest]
924
+
925
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
926
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
927
+
928
+ options.apply_defaults timeout: @config.rpcs.get_folder.timeout,
929
+ metadata: call_metadata,
930
+ retry_policy: @config.rpcs.get_folder.retry_policy
931
+
932
+ options.apply_defaults timeout: @config.timeout,
933
+ metadata: @config.metadata,
934
+ retry_policy: @config.retry_policy
935
+
936
+ @dataform_stub.get_folder request, options do |result, operation|
937
+ yield result, operation if block_given?
938
+ end
939
+ rescue ::Gapic::Rest::Error => e
940
+ raise ::Google::Cloud::Error.from_error(e)
941
+ end
942
+
943
+ ##
944
+ # Creates a new Folder in a given project and location.
945
+ #
946
+ # @overload create_folder(request, options = nil)
947
+ # Pass arguments to `create_folder` via a request object, either of type
948
+ # {::Google::Cloud::Dataform::V1::CreateFolderRequest} or an equivalent Hash.
949
+ #
950
+ # @param request [::Google::Cloud::Dataform::V1::CreateFolderRequest, ::Hash]
951
+ # A request object representing the call parameters. Required. To specify no
952
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
953
+ # @param options [::Gapic::CallOptions, ::Hash]
954
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
955
+ #
956
+ # @overload create_folder(parent: nil, folder: nil)
957
+ # Pass arguments to `create_folder` via keyword arguments. Note that at
958
+ # least one keyword argument is required. To specify no parameters, or to keep all
959
+ # the default parameter values, pass an empty Hash as a request object (see above).
960
+ #
961
+ # @param parent [::String]
962
+ # Required. The location in which to create the Folder. Must be in the format
963
+ # `projects/*/locations/*`.
964
+ # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
965
+ # Required. The Folder to create.
966
+ # @yield [result, operation] Access the result along with the TransportOperation object
967
+ # @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
968
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
969
+ #
970
+ # @return [::Google::Cloud::Dataform::V1::Folder]
971
+ #
972
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
973
+ #
974
+ # @example Basic example
975
+ # require "google/cloud/dataform/v1"
976
+ #
977
+ # # Create a client object. The client can be reused for multiple calls.
978
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
979
+ #
980
+ # # Create a request. To set request fields, pass in keyword arguments.
981
+ # request = Google::Cloud::Dataform::V1::CreateFolderRequest.new
982
+ #
983
+ # # Call the create_folder method.
984
+ # result = client.create_folder request
985
+ #
986
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
987
+ # p result
988
+ #
989
+ def create_folder request, options = nil
990
+ raise ::ArgumentError, "request must be provided" if request.nil?
991
+
992
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateFolderRequest
993
+
994
+ # Converts hash and nil to an options object
995
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
996
+
997
+ # Customize the options with defaults
998
+ call_metadata = @config.rpcs.create_folder.metadata.to_h
999
+
1000
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1001
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1002
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1003
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1004
+ transports_version_send: [:rest]
1005
+
1006
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1007
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1008
+
1009
+ options.apply_defaults timeout: @config.rpcs.create_folder.timeout,
1010
+ metadata: call_metadata,
1011
+ retry_policy: @config.rpcs.create_folder.retry_policy
1012
+
1013
+ options.apply_defaults timeout: @config.timeout,
1014
+ metadata: @config.metadata,
1015
+ retry_policy: @config.retry_policy
1016
+
1017
+ @dataform_stub.create_folder request, options do |result, operation|
1018
+ yield result, operation if block_given?
1019
+ end
1020
+ rescue ::Gapic::Rest::Error => e
1021
+ raise ::Google::Cloud::Error.from_error(e)
1022
+ end
1023
+
1024
+ ##
1025
+ # Updates a single Folder.
1026
+ #
1027
+ # @overload update_folder(request, options = nil)
1028
+ # Pass arguments to `update_folder` via a request object, either of type
1029
+ # {::Google::Cloud::Dataform::V1::UpdateFolderRequest} or an equivalent Hash.
1030
+ #
1031
+ # @param request [::Google::Cloud::Dataform::V1::UpdateFolderRequest, ::Hash]
1032
+ # A request object representing the call parameters. Required. To specify no
1033
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1034
+ # @param options [::Gapic::CallOptions, ::Hash]
1035
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1036
+ #
1037
+ # @overload update_folder(update_mask: nil, folder: nil)
1038
+ # Pass arguments to `update_folder` via keyword arguments. Note that at
1039
+ # least one keyword argument is required. To specify no parameters, or to keep all
1040
+ # the default parameter values, pass an empty Hash as a request object (see above).
1041
+ #
1042
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1043
+ # Optional. Specifies the fields to be updated in the Folder. If left unset,
1044
+ # all fields that can be updated, will be updated. A few fields cannot be
1045
+ # updated and will be ignored if specified in the update_mask (e.g.
1046
+ # parent_name, team_folder_name).
1047
+ # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
1048
+ # Required. The updated Folder.
1049
+ # @yield [result, operation] Access the result along with the TransportOperation object
1050
+ # @yieldparam result [::Google::Cloud::Dataform::V1::Folder]
1051
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1052
+ #
1053
+ # @return [::Google::Cloud::Dataform::V1::Folder]
1054
+ #
1055
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1056
+ #
1057
+ # @example Basic example
1058
+ # require "google/cloud/dataform/v1"
1059
+ #
1060
+ # # Create a client object. The client can be reused for multiple calls.
1061
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1062
+ #
1063
+ # # Create a request. To set request fields, pass in keyword arguments.
1064
+ # request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new
1065
+ #
1066
+ # # Call the update_folder method.
1067
+ # result = client.update_folder request
1068
+ #
1069
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
1070
+ # p result
1071
+ #
1072
+ def update_folder request, options = nil
1073
+ raise ::ArgumentError, "request must be provided" if request.nil?
1074
+
1075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateFolderRequest
1076
+
1077
+ # Converts hash and nil to an options object
1078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
+
1080
+ # Customize the options with defaults
1081
+ call_metadata = @config.rpcs.update_folder.metadata.to_h
1082
+
1083
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1084
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1086
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1087
+ transports_version_send: [:rest]
1088
+
1089
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1090
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1091
+
1092
+ options.apply_defaults timeout: @config.rpcs.update_folder.timeout,
1093
+ metadata: call_metadata,
1094
+ retry_policy: @config.rpcs.update_folder.retry_policy
1095
+
1096
+ options.apply_defaults timeout: @config.timeout,
1097
+ metadata: @config.metadata,
1098
+ retry_policy: @config.retry_policy
1099
+
1100
+ @dataform_stub.update_folder request, options do |result, operation|
1101
+ yield result, operation if block_given?
1102
+ end
1103
+ rescue ::Gapic::Rest::Error => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Deletes a single Folder.
1109
+ #
1110
+ # @overload delete_folder(request, options = nil)
1111
+ # Pass arguments to `delete_folder` via a request object, either of type
1112
+ # {::Google::Cloud::Dataform::V1::DeleteFolderRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::Dataform::V1::DeleteFolderRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1119
+ #
1120
+ # @overload delete_folder(name: nil)
1121
+ # Pass arguments to `delete_folder` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param name [::String]
1126
+ # Required. The Folder's name.
1127
+ # @yield [result, operation] Access the result along with the TransportOperation object
1128
+ # @yieldparam result [::Google::Protobuf::Empty]
1129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1130
+ #
1131
+ # @return [::Google::Protobuf::Empty]
1132
+ #
1133
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1134
+ #
1135
+ # @example Basic example
1136
+ # require "google/cloud/dataform/v1"
1137
+ #
1138
+ # # Create a client object. The client can be reused for multiple calls.
1139
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1140
+ #
1141
+ # # Create a request. To set request fields, pass in keyword arguments.
1142
+ # request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new
1143
+ #
1144
+ # # Call the delete_folder method.
1145
+ # result = client.delete_folder request
1146
+ #
1147
+ # # The returned object is of type Google::Protobuf::Empty.
1148
+ # p result
1149
+ #
1150
+ def delete_folder request, options = nil
1151
+ raise ::ArgumentError, "request must be provided" if request.nil?
1152
+
1153
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderRequest
1154
+
1155
+ # Converts hash and nil to an options object
1156
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1157
+
1158
+ # Customize the options with defaults
1159
+ call_metadata = @config.rpcs.delete_folder.metadata.to_h
1160
+
1161
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1162
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1163
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1164
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1165
+ transports_version_send: [:rest]
1166
+
1167
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1168
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1169
+
1170
+ options.apply_defaults timeout: @config.rpcs.delete_folder.timeout,
1171
+ metadata: call_metadata,
1172
+ retry_policy: @config.rpcs.delete_folder.retry_policy
1173
+
1174
+ options.apply_defaults timeout: @config.timeout,
1175
+ metadata: @config.metadata,
1176
+ retry_policy: @config.retry_policy
1177
+
1178
+ @dataform_stub.delete_folder request, options do |result, operation|
1179
+ yield result, operation if block_given?
1180
+ end
1181
+ rescue ::Gapic::Rest::Error => e
1182
+ raise ::Google::Cloud::Error.from_error(e)
1183
+ end
1184
+
1185
+ ##
1186
+ # Deletes a Folder with its contents (Folders, Repositories, Workspaces,
1187
+ # ReleaseConfigs, and WorkflowConfigs).
1188
+ #
1189
+ # @overload delete_folder_tree(request, options = nil)
1190
+ # Pass arguments to `delete_folder_tree` via a request object, either of type
1191
+ # {::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest} or an equivalent Hash.
1192
+ #
1193
+ # @param request [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, ::Hash]
1194
+ # A request object representing the call parameters. Required. To specify no
1195
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1196
+ # @param options [::Gapic::CallOptions, ::Hash]
1197
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1198
+ #
1199
+ # @overload delete_folder_tree(name: nil, force: nil)
1200
+ # Pass arguments to `delete_folder_tree` via keyword arguments. Note that at
1201
+ # least one keyword argument is required. To specify no parameters, or to keep all
1202
+ # the default parameter values, pass an empty Hash as a request object (see above).
1203
+ #
1204
+ # @param name [::String]
1205
+ # Required. The Folder's name.
1206
+ # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder}
1207
+ # @param force [::Boolean]
1208
+ # Optional. If `false` (default): The operation will fail if any
1209
+ # Repository within the folder hierarchy has associated Release Configs or
1210
+ # Workflow Configs.
1211
+ #
1212
+ # If `true`: The operation will attempt to delete everything, including any
1213
+ # Release Configs and Workflow Configs linked to Repositories within the
1214
+ # folder hierarchy. This permanently removes schedules and resources.
1215
+ # @yield [result, operation] Access the result along with the TransportOperation object
1216
+ # @yieldparam result [::Gapic::Operation]
1217
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1218
+ #
1219
+ # @return [::Gapic::Operation]
1220
+ #
1221
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1222
+ #
1223
+ # @example Basic example
1224
+ # require "google/cloud/dataform/v1"
1225
+ #
1226
+ # # Create a client object. The client can be reused for multiple calls.
1227
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1228
+ #
1229
+ # # Create a request. To set request fields, pass in keyword arguments.
1230
+ # request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new
1231
+ #
1232
+ # # Call the delete_folder_tree method.
1233
+ # result = client.delete_folder_tree request
1234
+ #
1235
+ # # The returned object is of type Gapic::Operation. You can use it to
1236
+ # # check the status of an operation, cancel it, or wait for results.
1237
+ # # Here is how to wait for a response.
1238
+ # result.wait_until_done! timeout: 60
1239
+ # if result.response?
1240
+ # p result.response
1241
+ # else
1242
+ # puts "No response received."
1243
+ # end
1244
+ #
1245
+ def delete_folder_tree request, options = nil
1246
+ raise ::ArgumentError, "request must be provided" if request.nil?
1247
+
1248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest
1249
+
1250
+ # Converts hash and nil to an options object
1251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1252
+
1253
+ # Customize the options with defaults
1254
+ call_metadata = @config.rpcs.delete_folder_tree.metadata.to_h
1255
+
1256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1257
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1259
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1260
+ transports_version_send: [:rest]
1261
+
1262
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1263
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1264
+
1265
+ options.apply_defaults timeout: @config.rpcs.delete_folder_tree.timeout,
1266
+ metadata: call_metadata,
1267
+ retry_policy: @config.rpcs.delete_folder_tree.retry_policy
1268
+
1269
+ options.apply_defaults timeout: @config.timeout,
1270
+ metadata: @config.metadata,
1271
+ retry_policy: @config.retry_policy
1272
+
1273
+ @dataform_stub.delete_folder_tree request, options do |result, operation|
1274
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1275
+ yield result, operation if block_given?
1276
+ throw :response, result
1277
+ end
1278
+ rescue ::Gapic::Rest::Error => e
1279
+ raise ::Google::Cloud::Error.from_error(e)
1280
+ end
1281
+
1282
+ ##
1283
+ # Returns the contents of a given Folder.
1284
+ #
1285
+ # @overload query_folder_contents(request, options = nil)
1286
+ # Pass arguments to `query_folder_contents` via a request object, either of type
1287
+ # {::Google::Cloud::Dataform::V1::QueryFolderContentsRequest} or an equivalent Hash.
1288
+ #
1289
+ # @param request [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, ::Hash]
1290
+ # A request object representing the call parameters. Required. To specify no
1291
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1292
+ # @param options [::Gapic::CallOptions, ::Hash]
1293
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1294
+ #
1295
+ # @overload query_folder_contents(folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1296
+ # Pass arguments to `query_folder_contents` via keyword arguments. Note that at
1297
+ # least one keyword argument is required. To specify no parameters, or to keep all
1298
+ # the default parameter values, pass an empty Hash as a request object (see above).
1299
+ #
1300
+ # @param folder [::String]
1301
+ # Required. Resource name of the Folder to list contents for.
1302
+ # Format: projects/*/locations/*/folders/*
1303
+ # @param page_size [::Integer]
1304
+ # Optional. Maximum number of paths to return. The server may return fewer
1305
+ # items than requested. If unspecified, the server will pick an appropriate
1306
+ # default.
1307
+ # @param page_token [::String]
1308
+ # Optional. Page token received from a previous `QueryFolderContents` call.
1309
+ # Provide this to retrieve the subsequent page.
1310
+ #
1311
+ # When paginating, all other parameters provided to
1312
+ # `QueryFolderContents`, with the exception of `page_size`, must match the
1313
+ # call that provided the page token.
1314
+ # @param order_by [::String]
1315
+ # Optional. Field to additionally sort results by.
1316
+ # Will order Folders before Repositories, and then by `order_by` in ascending
1317
+ # order. Supported keywords: display_name (default), create_time,
1318
+ # last_modified_time.
1319
+ # Examples:
1320
+ #
1321
+ # * `orderBy="display_name"`
1322
+ # * `orderBy="display_name desc"`
1323
+ # @param filter [::String]
1324
+ # Optional. Optional filtering for the returned list. Filtering is currently
1325
+ # only supported on the `display_name` field.
1326
+ #
1327
+ # Example:
1328
+ #
1329
+ # * `filter="display_name="MyFolder""`
1330
+ # @yield [result, operation] Access the result along with the TransportOperation object
1331
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
1332
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1333
+ #
1334
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
1335
+ #
1336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1337
+ #
1338
+ # @example Basic example
1339
+ # require "google/cloud/dataform/v1"
1340
+ #
1341
+ # # Create a client object. The client can be reused for multiple calls.
1342
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1343
+ #
1344
+ # # Create a request. To set request fields, pass in keyword arguments.
1345
+ # request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new
1346
+ #
1347
+ # # Call the query_folder_contents method.
1348
+ # result = client.query_folder_contents request
1349
+ #
1350
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1351
+ # # over elements, and API calls will be issued to fetch pages as needed.
1352
+ # result.each do |item|
1353
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry.
1354
+ # p item
1355
+ # end
1356
+ #
1357
+ def query_folder_contents request, options = nil
1358
+ raise ::ArgumentError, "request must be provided" if request.nil?
1359
+
1360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest
1361
+
1362
+ # Converts hash and nil to an options object
1363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
169
1364
 
170
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
171
- config.credentials = credentials
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
1365
+ # Customize the options with defaults
1366
+ call_metadata = @config.rpcs.query_folder_contents.metadata.to_h
178
1367
 
179
- @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
180
- config.credentials = credentials
181
- config.quota_project = @quota_project_id
182
- config.endpoint = @dataform_stub.endpoint
183
- config.universe_domain = @dataform_stub.universe_domain
184
- config.bindings_override = @config.bindings_override
185
- config.logger = @dataform_stub.logger if config.respond_to? :logger=
1368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1369
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1370
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1371
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1372
+ transports_version_send: [:rest]
1373
+
1374
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1375
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1376
+
1377
+ options.apply_defaults timeout: @config.rpcs.query_folder_contents.timeout,
1378
+ metadata: call_metadata,
1379
+ retry_policy: @config.rpcs.query_folder_contents.retry_policy
1380
+
1381
+ options.apply_defaults timeout: @config.timeout,
1382
+ metadata: @config.metadata,
1383
+ retry_policy: @config.retry_policy
1384
+
1385
+ @dataform_stub.query_folder_contents request, options do |result, operation|
1386
+ result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_folder_contents, "entries", request, result, options
1387
+ yield result, operation if block_given?
1388
+ throw :response, result
186
1389
  end
1390
+ rescue ::Gapic::Rest::Error => e
1391
+ raise ::Google::Cloud::Error.from_error(e)
187
1392
  end
188
1393
 
189
1394
  ##
190
- # Get the associated client for mix-in of the Locations.
1395
+ # Returns the contents of a caller's root folder in a given location.
1396
+ # The root folder contains all resources that are created by the user and not
1397
+ # contained in any other folder.
191
1398
  #
192
- # @return [Google::Cloud::Location::Locations::Rest::Client]
1399
+ # @overload query_user_root_contents(request, options = nil)
1400
+ # Pass arguments to `query_user_root_contents` via a request object, either of type
1401
+ # {::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest} or an equivalent Hash.
193
1402
  #
194
- attr_reader :location_client
195
-
196
- ##
197
- # Get the associated client for mix-in of the IAMPolicy.
1403
+ # @param request [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, ::Hash]
1404
+ # A request object representing the call parameters. Required. To specify no
1405
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1406
+ # @param options [::Gapic::CallOptions, ::Hash]
1407
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
198
1408
  #
199
- # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
1409
+ # @overload query_user_root_contents(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1410
+ # Pass arguments to `query_user_root_contents` via keyword arguments. Note that at
1411
+ # least one keyword argument is required. To specify no parameters, or to keep all
1412
+ # the default parameter values, pass an empty Hash as a request object (see above).
200
1413
  #
201
- attr_reader :iam_policy_client
1414
+ # @param location [::String]
1415
+ # Required. Location of the user root folder to list contents for.
1416
+ # Format: projects/*/locations/*
1417
+ # @param page_size [::Integer]
1418
+ # Optional. Maximum number of paths to return. The server may return fewer
1419
+ # items than requested. If unspecified, the server will pick an appropriate
1420
+ # default.
1421
+ # @param page_token [::String]
1422
+ # Optional. Page token received from a previous `QueryUserRootContents` call.
1423
+ # Provide this to retrieve the subsequent page.
1424
+ #
1425
+ # When paginating, all other parameters provided to
1426
+ # `QueryUserRootFolderContents`, with the exception of `page_size`, must
1427
+ # match the call that provided the page token.
1428
+ # @param order_by [::String]
1429
+ # Optional. Field to additionally sort results by.
1430
+ # Will order Folders before Repositories, and then by `order_by` in ascending
1431
+ # order. Supported keywords: display_name (default), created_at,
1432
+ # last_modified_at. Examples:
1433
+ #
1434
+ # * `orderBy="display_name"`
1435
+ # * `orderBy="display_name desc"`
1436
+ # @param filter [::String]
1437
+ # Optional. Optional filtering for the returned list. Filtering is currently
1438
+ # only supported on the `display_name` field.
1439
+ #
1440
+ # Example:
1441
+ #
1442
+ # * `filter="display_name="MyFolder""`
1443
+ # @yield [result, operation] Access the result along with the TransportOperation object
1444
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
1445
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1446
+ #
1447
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
1448
+ #
1449
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1450
+ #
1451
+ # @example Basic example
1452
+ # require "google/cloud/dataform/v1"
1453
+ #
1454
+ # # Create a client object. The client can be reused for multiple calls.
1455
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1456
+ #
1457
+ # # Create a request. To set request fields, pass in keyword arguments.
1458
+ # request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new
1459
+ #
1460
+ # # Call the query_user_root_contents method.
1461
+ # result = client.query_user_root_contents request
1462
+ #
1463
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1464
+ # # over elements, and API calls will be issued to fetch pages as needed.
1465
+ # result.each do |item|
1466
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry.
1467
+ # p item
1468
+ # end
1469
+ #
1470
+ def query_user_root_contents request, options = nil
1471
+ raise ::ArgumentError, "request must be provided" if request.nil?
1472
+
1473
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest
1474
+
1475
+ # Converts hash and nil to an options object
1476
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1477
+
1478
+ # Customize the options with defaults
1479
+ call_metadata = @config.rpcs.query_user_root_contents.metadata.to_h
1480
+
1481
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1482
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1483
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1484
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1485
+ transports_version_send: [:rest]
1486
+
1487
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1488
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1489
+
1490
+ options.apply_defaults timeout: @config.rpcs.query_user_root_contents.timeout,
1491
+ metadata: call_metadata,
1492
+ retry_policy: @config.rpcs.query_user_root_contents.retry_policy
1493
+
1494
+ options.apply_defaults timeout: @config.timeout,
1495
+ metadata: @config.metadata,
1496
+ retry_policy: @config.retry_policy
1497
+
1498
+ @dataform_stub.query_user_root_contents request, options do |result, operation|
1499
+ result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_user_root_contents, "entries", request, result, options
1500
+ yield result, operation if block_given?
1501
+ throw :response, result
1502
+ end
1503
+ rescue ::Gapic::Rest::Error => e
1504
+ raise ::Google::Cloud::Error.from_error(e)
1505
+ end
202
1506
 
203
1507
  ##
204
- # The logger used for request/response debug logging.
1508
+ # Moves a Folder to a new Folder, TeamFolder, or the root location.
205
1509
  #
206
- # @return [Logger]
1510
+ # @overload move_folder(request, options = nil)
1511
+ # Pass arguments to `move_folder` via a request object, either of type
1512
+ # {::Google::Cloud::Dataform::V1::MoveFolderRequest} or an equivalent Hash.
207
1513
  #
208
- def logger
209
- @dataform_stub.logger
210
- end
1514
+ # @param request [::Google::Cloud::Dataform::V1::MoveFolderRequest, ::Hash]
1515
+ # A request object representing the call parameters. Required. To specify no
1516
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1517
+ # @param options [::Gapic::CallOptions, ::Hash]
1518
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1519
+ #
1520
+ # @overload move_folder(name: nil, destination_containing_folder: nil)
1521
+ # Pass arguments to `move_folder` via keyword arguments. Note that at
1522
+ # least one keyword argument is required. To specify no parameters, or to keep all
1523
+ # the default parameter values, pass an empty Hash as a request object (see above).
1524
+ #
1525
+ # @param name [::String]
1526
+ # Required. The full resource name of the Folder to move.
1527
+ # @param destination_containing_folder [::String]
1528
+ # Optional. The name of the Folder, TeamFolder, or root location to move the
1529
+ # Folder to. Can be in the format of: "" to move into the root User folder,
1530
+ # `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
1531
+ # @yield [result, operation] Access the result along with the TransportOperation object
1532
+ # @yieldparam result [::Gapic::Operation]
1533
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1534
+ #
1535
+ # @return [::Gapic::Operation]
1536
+ #
1537
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1538
+ #
1539
+ # @example Basic example
1540
+ # require "google/cloud/dataform/v1"
1541
+ #
1542
+ # # Create a client object. The client can be reused for multiple calls.
1543
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1544
+ #
1545
+ # # Create a request. To set request fields, pass in keyword arguments.
1546
+ # request = Google::Cloud::Dataform::V1::MoveFolderRequest.new
1547
+ #
1548
+ # # Call the move_folder method.
1549
+ # result = client.move_folder request
1550
+ #
1551
+ # # The returned object is of type Gapic::Operation. You can use it to
1552
+ # # check the status of an operation, cancel it, or wait for results.
1553
+ # # Here is how to wait for a response.
1554
+ # result.wait_until_done! timeout: 60
1555
+ # if result.response?
1556
+ # p result.response
1557
+ # else
1558
+ # puts "No response received."
1559
+ # end
1560
+ #
1561
+ def move_folder request, options = nil
1562
+ raise ::ArgumentError, "request must be provided" if request.nil?
211
1563
 
212
- # Service calls
1564
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveFolderRequest
1565
+
1566
+ # Converts hash and nil to an options object
1567
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1568
+
1569
+ # Customize the options with defaults
1570
+ call_metadata = @config.rpcs.move_folder.metadata.to_h
1571
+
1572
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1573
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1574
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1575
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
1576
+ transports_version_send: [:rest]
1577
+
1578
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1579
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1580
+
1581
+ options.apply_defaults timeout: @config.rpcs.move_folder.timeout,
1582
+ metadata: call_metadata,
1583
+ retry_policy: @config.rpcs.move_folder.retry_policy
1584
+
1585
+ options.apply_defaults timeout: @config.timeout,
1586
+ metadata: @config.metadata,
1587
+ retry_policy: @config.retry_policy
1588
+
1589
+ @dataform_stub.move_folder request, options do |result, operation|
1590
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1591
+ yield result, operation if block_given?
1592
+ throw :response, result
1593
+ end
1594
+ rescue ::Gapic::Rest::Error => e
1595
+ raise ::Google::Cloud::Error.from_error(e)
1596
+ end
213
1597
 
214
1598
  ##
215
1599
  # Lists Repositories in a given project and location.
@@ -571,28 +1955,115 @@ module Google
571
1955
  # Pass arguments to `delete_repository` via a request object, either of type
572
1956
  # {::Google::Cloud::Dataform::V1::DeleteRepositoryRequest} or an equivalent Hash.
573
1957
  #
574
- # @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash]
1958
+ # @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash]
1959
+ # A request object representing the call parameters. Required. To specify no
1960
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1961
+ # @param options [::Gapic::CallOptions, ::Hash]
1962
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1963
+ #
1964
+ # @overload delete_repository(name: nil, force: nil)
1965
+ # Pass arguments to `delete_repository` via keyword arguments. Note that at
1966
+ # least one keyword argument is required. To specify no parameters, or to keep all
1967
+ # the default parameter values, pass an empty Hash as a request object (see above).
1968
+ #
1969
+ # @param name [::String]
1970
+ # Required. The repository's name.
1971
+ # @param force [::Boolean]
1972
+ # Optional. If set to true, child resources of this repository (compilation
1973
+ # results and workflow invocations) will also be deleted. Otherwise, the
1974
+ # request will only succeed if the repository has no child resources.
1975
+ #
1976
+ # **Note:** *This flag doesn't support deletion of workspaces, release
1977
+ # configs or workflow configs. If any of such resources exists in the
1978
+ # repository, the request will fail.*.
1979
+ # @yield [result, operation] Access the result along with the TransportOperation object
1980
+ # @yieldparam result [::Google::Protobuf::Empty]
1981
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1982
+ #
1983
+ # @return [::Google::Protobuf::Empty]
1984
+ #
1985
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1986
+ #
1987
+ # @example Basic example
1988
+ # require "google/cloud/dataform/v1"
1989
+ #
1990
+ # # Create a client object. The client can be reused for multiple calls.
1991
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
1992
+ #
1993
+ # # Create a request. To set request fields, pass in keyword arguments.
1994
+ # request = Google::Cloud::Dataform::V1::DeleteRepositoryRequest.new
1995
+ #
1996
+ # # Call the delete_repository method.
1997
+ # result = client.delete_repository request
1998
+ #
1999
+ # # The returned object is of type Google::Protobuf::Empty.
2000
+ # p result
2001
+ #
2002
+ def delete_repository request, options = nil
2003
+ raise ::ArgumentError, "request must be provided" if request.nil?
2004
+
2005
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest
2006
+
2007
+ # Converts hash and nil to an options object
2008
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2009
+
2010
+ # Customize the options with defaults
2011
+ call_metadata = @config.rpcs.delete_repository.metadata.to_h
2012
+
2013
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2014
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2015
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2016
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
2017
+ transports_version_send: [:rest]
2018
+
2019
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2020
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2021
+
2022
+ options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
2023
+ metadata: call_metadata,
2024
+ retry_policy: @config.rpcs.delete_repository.retry_policy
2025
+
2026
+ options.apply_defaults timeout: @config.timeout,
2027
+ metadata: @config.metadata,
2028
+ retry_policy: @config.retry_policy
2029
+
2030
+ @dataform_stub.delete_repository request, options do |result, operation|
2031
+ yield result, operation if block_given?
2032
+ end
2033
+ rescue ::Gapic::Rest::Error => e
2034
+ raise ::Google::Cloud::Error.from_error(e)
2035
+ end
2036
+
2037
+ ##
2038
+ # Moves a Repository to a new location.
2039
+ #
2040
+ # @overload move_repository(request, options = nil)
2041
+ # Pass arguments to `move_repository` via a request object, either of type
2042
+ # {::Google::Cloud::Dataform::V1::MoveRepositoryRequest} or an equivalent Hash.
2043
+ #
2044
+ # @param request [::Google::Cloud::Dataform::V1::MoveRepositoryRequest, ::Hash]
575
2045
  # A request object representing the call parameters. Required. To specify no
576
2046
  # parameters, or to keep all the default parameter values, pass an empty Hash.
577
2047
  # @param options [::Gapic::CallOptions, ::Hash]
578
2048
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
579
2049
  #
580
- # @overload delete_repository(name: nil, force: nil)
581
- # Pass arguments to `delete_repository` via keyword arguments. Note that at
2050
+ # @overload move_repository(name: nil, destination_containing_folder: nil)
2051
+ # Pass arguments to `move_repository` via keyword arguments. Note that at
582
2052
  # least one keyword argument is required. To specify no parameters, or to keep all
583
2053
  # the default parameter values, pass an empty Hash as a request object (see above).
584
2054
  #
585
2055
  # @param name [::String]
586
- # Required. The repository's name.
587
- # @param force [::Boolean]
588
- # Optional. If set to true, any child resources of this repository will also
589
- # be deleted. (Otherwise, the request will only succeed if the repository has
590
- # no child resources.)
2056
+ # Required. The full resource name of the repository to move.
2057
+ # @param destination_containing_folder [::String]
2058
+ # Optional. The name of the Folder, TeamFolder, or root location to move the
2059
+ # repository to. Can be in the format of: "" to move into the root User
2060
+ # folder, `projects/*/locations/*/folders/*`,
2061
+ # `projects/*/locations/*/teamFolders/*`
591
2062
  # @yield [result, operation] Access the result along with the TransportOperation object
592
- # @yieldparam result [::Google::Protobuf::Empty]
2063
+ # @yieldparam result [::Gapic::Operation]
593
2064
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
594
2065
  #
595
- # @return [::Google::Protobuf::Empty]
2066
+ # @return [::Gapic::Operation]
596
2067
  #
597
2068
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
598
2069
  #
@@ -603,24 +2074,31 @@ module Google
603
2074
  # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
604
2075
  #
605
2076
  # # Create a request. To set request fields, pass in keyword arguments.
606
- # request = Google::Cloud::Dataform::V1::DeleteRepositoryRequest.new
607
- #
608
- # # Call the delete_repository method.
609
- # result = client.delete_repository request
610
- #
611
- # # The returned object is of type Google::Protobuf::Empty.
612
- # p result
2077
+ # request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new
2078
+ #
2079
+ # # Call the move_repository method.
2080
+ # result = client.move_repository request
2081
+ #
2082
+ # # The returned object is of type Gapic::Operation. You can use it to
2083
+ # # check the status of an operation, cancel it, or wait for results.
2084
+ # # Here is how to wait for a response.
2085
+ # result.wait_until_done! timeout: 60
2086
+ # if result.response?
2087
+ # p result.response
2088
+ # else
2089
+ # puts "No response received."
2090
+ # end
613
2091
  #
614
- def delete_repository request, options = nil
2092
+ def move_repository request, options = nil
615
2093
  raise ::ArgumentError, "request must be provided" if request.nil?
616
2094
 
617
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest
2095
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveRepositoryRequest
618
2096
 
619
2097
  # Converts hash and nil to an options object
620
2098
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
621
2099
 
622
2100
  # Customize the options with defaults
623
- call_metadata = @config.rpcs.delete_repository.metadata.to_h
2101
+ call_metadata = @config.rpcs.move_repository.metadata.to_h
624
2102
 
625
2103
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
626
2104
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -631,16 +2109,18 @@ module Google
631
2109
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
632
2110
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
2111
 
634
- options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
2112
+ options.apply_defaults timeout: @config.rpcs.move_repository.timeout,
635
2113
  metadata: call_metadata,
636
- retry_policy: @config.rpcs.delete_repository.retry_policy
2114
+ retry_policy: @config.rpcs.move_repository.retry_policy
637
2115
 
638
2116
  options.apply_defaults timeout: @config.timeout,
639
2117
  metadata: @config.metadata,
640
2118
  retry_policy: @config.retry_policy
641
2119
 
642
- @dataform_stub.delete_repository request, options do |result, operation|
2120
+ @dataform_stub.move_repository request, options do |result, operation|
2121
+ result = ::Gapic::Operation.new result, @operations_client, options: options
643
2122
  yield result, operation if block_given?
2123
+ throw :response, result
644
2124
  end
645
2125
  rescue ::Gapic::Rest::Error => e
646
2126
  raise ::Google::Cloud::Error.from_error(e)
@@ -2181,7 +3661,7 @@ module Google
2181
3661
  # @param options [::Gapic::CallOptions, ::Hash]
2182
3662
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2183
3663
  #
2184
- # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil)
3664
+ # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil, view: nil)
2185
3665
  # Pass arguments to `query_directory_contents` via keyword arguments. Note that at
2186
3666
  # least one keyword argument is required. To specify no parameters, or to keep all
2187
3667
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2202,6 +3682,11 @@ module Google
2202
3682
  # When paginating, all other parameters provided to
2203
3683
  # `QueryDirectoryContents`, with the exception of `page_size`, must match the
2204
3684
  # call that provided the page token.
3685
+ # @param view [::Google::Cloud::Dataform::V1::DirectoryContentsView]
3686
+ # Optional. Specifies the metadata to return for each directory entry.
3687
+ # If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
3688
+ # Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
3689
+ # CMEK-protected workspaces.
2205
3690
  # @yield [result, operation] Access the result along with the TransportOperation object
2206
3691
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::DirectoryEntry>]
2207
3692
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -4823,6 +6308,273 @@ module Google
4823
6308
  raise ::Google::Cloud::Error.from_error(e)
4824
6309
  end
4825
6310
 
6311
+ ##
6312
+ # Gets the access control policy for a resource.
6313
+ # Returns an empty policy if the resource exists and does not have a policy
6314
+ # set.
6315
+ #
6316
+ # @overload get_iam_policy(request, options = nil)
6317
+ # Pass arguments to `get_iam_policy` via a request object, either of type
6318
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
6319
+ #
6320
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
6321
+ # A request object representing the call parameters. Required. To specify no
6322
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6323
+ # @param options [::Gapic::CallOptions, ::Hash]
6324
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6325
+ #
6326
+ # @overload get_iam_policy(resource: nil, options: nil)
6327
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
6328
+ # least one keyword argument is required. To specify no parameters, or to keep all
6329
+ # the default parameter values, pass an empty Hash as a request object (see above).
6330
+ #
6331
+ # @param resource [::String]
6332
+ # REQUIRED: The resource for which the policy is being requested.
6333
+ # See the operation documentation for the appropriate value for this field.
6334
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
6335
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
6336
+ # `GetIamPolicy`.
6337
+ # @yield [result, operation] Access the result along with the TransportOperation object
6338
+ # @yieldparam result [::Google::Iam::V1::Policy]
6339
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6340
+ #
6341
+ # @return [::Google::Iam::V1::Policy]
6342
+ #
6343
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6344
+ #
6345
+ # @example Basic example
6346
+ # require "google/cloud/dataform/v1"
6347
+ #
6348
+ # # Create a client object. The client can be reused for multiple calls.
6349
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
6350
+ #
6351
+ # # Create a request. To set request fields, pass in keyword arguments.
6352
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
6353
+ #
6354
+ # # Call the get_iam_policy method.
6355
+ # result = client.get_iam_policy request
6356
+ #
6357
+ # # The returned object is of type Google::Iam::V1::Policy.
6358
+ # p result
6359
+ #
6360
+ def get_iam_policy request, options = nil
6361
+ raise ::ArgumentError, "request must be provided" if request.nil?
6362
+
6363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
6364
+
6365
+ # Converts hash and nil to an options object
6366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6367
+
6368
+ # Customize the options with defaults
6369
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
6370
+
6371
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6372
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6374
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
6375
+ transports_version_send: [:rest]
6376
+
6377
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6378
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6379
+
6380
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
6381
+ metadata: call_metadata,
6382
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
6383
+
6384
+ options.apply_defaults timeout: @config.timeout,
6385
+ metadata: @config.metadata,
6386
+ retry_policy: @config.retry_policy
6387
+
6388
+ @dataform_stub.get_iam_policy request, options do |result, operation|
6389
+ yield result, operation if block_given?
6390
+ end
6391
+ rescue ::Gapic::Rest::Error => e
6392
+ raise ::Google::Cloud::Error.from_error(e)
6393
+ end
6394
+
6395
+ ##
6396
+ # Sets the access control policy on the specified resource. Replaces any
6397
+ # existing policy.
6398
+ #
6399
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
6400
+ #
6401
+ # @overload set_iam_policy(request, options = nil)
6402
+ # Pass arguments to `set_iam_policy` via a request object, either of type
6403
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
6404
+ #
6405
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
6406
+ # A request object representing the call parameters. Required. To specify no
6407
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6408
+ # @param options [::Gapic::CallOptions, ::Hash]
6409
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6410
+ #
6411
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
6412
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
6413
+ # least one keyword argument is required. To specify no parameters, or to keep all
6414
+ # the default parameter values, pass an empty Hash as a request object (see above).
6415
+ #
6416
+ # @param resource [::String]
6417
+ # REQUIRED: The resource for which the policy is being specified.
6418
+ # See the operation documentation for the appropriate value for this field.
6419
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
6420
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
6421
+ # the policy is limited to a few 10s of KB. An empty policy is a
6422
+ # valid policy but certain Cloud Platform services (such as Projects)
6423
+ # might reject them.
6424
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
6425
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
6426
+ # the fields in the mask will be modified. If no mask is provided, the
6427
+ # following default mask is used:
6428
+ #
6429
+ # `paths: "bindings, etag"`
6430
+ # @yield [result, operation] Access the result along with the TransportOperation object
6431
+ # @yieldparam result [::Google::Iam::V1::Policy]
6432
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6433
+ #
6434
+ # @return [::Google::Iam::V1::Policy]
6435
+ #
6436
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6437
+ #
6438
+ # @example Basic example
6439
+ # require "google/cloud/dataform/v1"
6440
+ #
6441
+ # # Create a client object. The client can be reused for multiple calls.
6442
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
6443
+ #
6444
+ # # Create a request. To set request fields, pass in keyword arguments.
6445
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
6446
+ #
6447
+ # # Call the set_iam_policy method.
6448
+ # result = client.set_iam_policy request
6449
+ #
6450
+ # # The returned object is of type Google::Iam::V1::Policy.
6451
+ # p result
6452
+ #
6453
+ def set_iam_policy request, options = nil
6454
+ raise ::ArgumentError, "request must be provided" if request.nil?
6455
+
6456
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
6457
+
6458
+ # Converts hash and nil to an options object
6459
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6460
+
6461
+ # Customize the options with defaults
6462
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
6463
+
6464
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6465
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6466
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6467
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
6468
+ transports_version_send: [:rest]
6469
+
6470
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6471
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6472
+
6473
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
6474
+ metadata: call_metadata,
6475
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
6476
+
6477
+ options.apply_defaults timeout: @config.timeout,
6478
+ metadata: @config.metadata,
6479
+ retry_policy: @config.retry_policy
6480
+
6481
+ @dataform_stub.set_iam_policy request, options do |result, operation|
6482
+ yield result, operation if block_given?
6483
+ end
6484
+ rescue ::Gapic::Rest::Error => e
6485
+ raise ::Google::Cloud::Error.from_error(e)
6486
+ end
6487
+
6488
+ ##
6489
+ # Returns permissions that a caller has on the specified resource.
6490
+ # If the resource does not exist, this will return an empty set of
6491
+ # permissions, not a `NOT_FOUND` error.
6492
+ #
6493
+ # Note: This operation is designed to be used for building permission-aware
6494
+ # UIs and command-line tools, not for authorization checking. This operation
6495
+ # may "fail open" without warning.
6496
+ #
6497
+ # @overload test_iam_permissions(request, options = nil)
6498
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
6499
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
6500
+ #
6501
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
6502
+ # A request object representing the call parameters. Required. To specify no
6503
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6504
+ # @param options [::Gapic::CallOptions, ::Hash]
6505
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6506
+ #
6507
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
6508
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
6509
+ # least one keyword argument is required. To specify no parameters, or to keep all
6510
+ # the default parameter values, pass an empty Hash as a request object (see above).
6511
+ #
6512
+ # @param resource [::String]
6513
+ # REQUIRED: The resource for which the policy detail is being requested.
6514
+ # See the operation documentation for the appropriate value for this field.
6515
+ # @param permissions [::Array<::String>]
6516
+ # The set of permissions to check for the `resource`. Permissions with
6517
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
6518
+ # information see
6519
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
6520
+ # @yield [result, operation] Access the result along with the TransportOperation object
6521
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
6522
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6523
+ #
6524
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
6525
+ #
6526
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6527
+ #
6528
+ # @example Basic example
6529
+ # require "google/cloud/dataform/v1"
6530
+ #
6531
+ # # Create a client object. The client can be reused for multiple calls.
6532
+ # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new
6533
+ #
6534
+ # # Create a request. To set request fields, pass in keyword arguments.
6535
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
6536
+ #
6537
+ # # Call the test_iam_permissions method.
6538
+ # result = client.test_iam_permissions request
6539
+ #
6540
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
6541
+ # p result
6542
+ #
6543
+ def test_iam_permissions request, options = nil
6544
+ raise ::ArgumentError, "request must be provided" if request.nil?
6545
+
6546
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
6547
+
6548
+ # Converts hash and nil to an options object
6549
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6550
+
6551
+ # Customize the options with defaults
6552
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
6553
+
6554
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6555
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6556
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6557
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION,
6558
+ transports_version_send: [:rest]
6559
+
6560
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6561
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6562
+
6563
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
6564
+ metadata: call_metadata,
6565
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
6566
+
6567
+ options.apply_defaults timeout: @config.timeout,
6568
+ metadata: @config.metadata,
6569
+ retry_policy: @config.retry_policy
6570
+
6571
+ @dataform_stub.test_iam_permissions request, options do |result, operation|
6572
+ yield result, operation if block_given?
6573
+ end
6574
+ rescue ::Gapic::Rest::Error => e
6575
+ raise ::Google::Cloud::Error.from_error(e)
6576
+ end
6577
+
4826
6578
  ##
4827
6579
  # Configuration class for the Dataform REST API.
4828
6580
  #
@@ -4839,17 +6591,17 @@ module Google
4839
6591
  # @example
4840
6592
  #
4841
6593
  # # Modify the global config, setting the timeout for
4842
- # # list_repositories to 20 seconds,
6594
+ # # get_team_folder to 20 seconds,
4843
6595
  # # and all remaining timeouts to 10 seconds.
4844
6596
  # ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.configure do |config|
4845
6597
  # config.timeout = 10.0
4846
- # config.rpcs.list_repositories.timeout = 20.0
6598
+ # config.rpcs.get_team_folder.timeout = 20.0
4847
6599
  # end
4848
6600
  #
4849
6601
  # # Apply the above configuration only to a new client.
4850
6602
  # client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config|
4851
6603
  # config.timeout = 10.0
4852
- # config.rpcs.list_repositories.timeout = 20.0
6604
+ # config.rpcs.get_team_folder.timeout = 20.0
4853
6605
  # end
4854
6606
  #
4855
6607
  # @!attribute [rw] endpoint
@@ -4893,6 +6645,7 @@ module Google
4893
6645
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4894
6646
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4895
6647
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
6648
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
4896
6649
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4897
6650
  # trigger a retry.
4898
6651
  # @return [::Hash]
@@ -4972,10 +6725,86 @@ module Google
4972
6725
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4973
6726
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4974
6727
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
6728
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
4975
6729
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4976
6730
  # trigger a retry.
4977
6731
  #
4978
6732
  class Rpcs
6733
+ ##
6734
+ # RPC-specific configuration for `get_team_folder`
6735
+ # @return [::Gapic::Config::Method]
6736
+ #
6737
+ attr_reader :get_team_folder
6738
+ ##
6739
+ # RPC-specific configuration for `create_team_folder`
6740
+ # @return [::Gapic::Config::Method]
6741
+ #
6742
+ attr_reader :create_team_folder
6743
+ ##
6744
+ # RPC-specific configuration for `update_team_folder`
6745
+ # @return [::Gapic::Config::Method]
6746
+ #
6747
+ attr_reader :update_team_folder
6748
+ ##
6749
+ # RPC-specific configuration for `delete_team_folder`
6750
+ # @return [::Gapic::Config::Method]
6751
+ #
6752
+ attr_reader :delete_team_folder
6753
+ ##
6754
+ # RPC-specific configuration for `delete_team_folder_tree`
6755
+ # @return [::Gapic::Config::Method]
6756
+ #
6757
+ attr_reader :delete_team_folder_tree
6758
+ ##
6759
+ # RPC-specific configuration for `query_team_folder_contents`
6760
+ # @return [::Gapic::Config::Method]
6761
+ #
6762
+ attr_reader :query_team_folder_contents
6763
+ ##
6764
+ # RPC-specific configuration for `search_team_folders`
6765
+ # @return [::Gapic::Config::Method]
6766
+ #
6767
+ attr_reader :search_team_folders
6768
+ ##
6769
+ # RPC-specific configuration for `get_folder`
6770
+ # @return [::Gapic::Config::Method]
6771
+ #
6772
+ attr_reader :get_folder
6773
+ ##
6774
+ # RPC-specific configuration for `create_folder`
6775
+ # @return [::Gapic::Config::Method]
6776
+ #
6777
+ attr_reader :create_folder
6778
+ ##
6779
+ # RPC-specific configuration for `update_folder`
6780
+ # @return [::Gapic::Config::Method]
6781
+ #
6782
+ attr_reader :update_folder
6783
+ ##
6784
+ # RPC-specific configuration for `delete_folder`
6785
+ # @return [::Gapic::Config::Method]
6786
+ #
6787
+ attr_reader :delete_folder
6788
+ ##
6789
+ # RPC-specific configuration for `delete_folder_tree`
6790
+ # @return [::Gapic::Config::Method]
6791
+ #
6792
+ attr_reader :delete_folder_tree
6793
+ ##
6794
+ # RPC-specific configuration for `query_folder_contents`
6795
+ # @return [::Gapic::Config::Method]
6796
+ #
6797
+ attr_reader :query_folder_contents
6798
+ ##
6799
+ # RPC-specific configuration for `query_user_root_contents`
6800
+ # @return [::Gapic::Config::Method]
6801
+ #
6802
+ attr_reader :query_user_root_contents
6803
+ ##
6804
+ # RPC-specific configuration for `move_folder`
6805
+ # @return [::Gapic::Config::Method]
6806
+ #
6807
+ attr_reader :move_folder
4979
6808
  ##
4980
6809
  # RPC-specific configuration for `list_repositories`
4981
6810
  # @return [::Gapic::Config::Method]
@@ -5002,6 +6831,11 @@ module Google
5002
6831
  #
5003
6832
  attr_reader :delete_repository
5004
6833
  ##
6834
+ # RPC-specific configuration for `move_repository`
6835
+ # @return [::Gapic::Config::Method]
6836
+ #
6837
+ attr_reader :move_repository
6838
+ ##
5005
6839
  # RPC-specific configuration for `commit_repository_changes`
5006
6840
  # @return [::Gapic::Config::Method]
5007
6841
  #
@@ -5246,9 +7080,54 @@ module Google
5246
7080
  # @return [::Gapic::Config::Method]
5247
7081
  #
5248
7082
  attr_reader :update_config
7083
+ ##
7084
+ # RPC-specific configuration for `get_iam_policy`
7085
+ # @return [::Gapic::Config::Method]
7086
+ #
7087
+ attr_reader :get_iam_policy
7088
+ ##
7089
+ # RPC-specific configuration for `set_iam_policy`
7090
+ # @return [::Gapic::Config::Method]
7091
+ #
7092
+ attr_reader :set_iam_policy
7093
+ ##
7094
+ # RPC-specific configuration for `test_iam_permissions`
7095
+ # @return [::Gapic::Config::Method]
7096
+ #
7097
+ attr_reader :test_iam_permissions
5249
7098
 
5250
7099
  # @private
5251
7100
  def initialize parent_rpcs = nil
7101
+ get_team_folder_config = parent_rpcs.get_team_folder if parent_rpcs.respond_to? :get_team_folder
7102
+ @get_team_folder = ::Gapic::Config::Method.new get_team_folder_config
7103
+ create_team_folder_config = parent_rpcs.create_team_folder if parent_rpcs.respond_to? :create_team_folder
7104
+ @create_team_folder = ::Gapic::Config::Method.new create_team_folder_config
7105
+ update_team_folder_config = parent_rpcs.update_team_folder if parent_rpcs.respond_to? :update_team_folder
7106
+ @update_team_folder = ::Gapic::Config::Method.new update_team_folder_config
7107
+ delete_team_folder_config = parent_rpcs.delete_team_folder if parent_rpcs.respond_to? :delete_team_folder
7108
+ @delete_team_folder = ::Gapic::Config::Method.new delete_team_folder_config
7109
+ delete_team_folder_tree_config = parent_rpcs.delete_team_folder_tree if parent_rpcs.respond_to? :delete_team_folder_tree
7110
+ @delete_team_folder_tree = ::Gapic::Config::Method.new delete_team_folder_tree_config
7111
+ query_team_folder_contents_config = parent_rpcs.query_team_folder_contents if parent_rpcs.respond_to? :query_team_folder_contents
7112
+ @query_team_folder_contents = ::Gapic::Config::Method.new query_team_folder_contents_config
7113
+ search_team_folders_config = parent_rpcs.search_team_folders if parent_rpcs.respond_to? :search_team_folders
7114
+ @search_team_folders = ::Gapic::Config::Method.new search_team_folders_config
7115
+ get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder
7116
+ @get_folder = ::Gapic::Config::Method.new get_folder_config
7117
+ create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder
7118
+ @create_folder = ::Gapic::Config::Method.new create_folder_config
7119
+ update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder
7120
+ @update_folder = ::Gapic::Config::Method.new update_folder_config
7121
+ delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder
7122
+ @delete_folder = ::Gapic::Config::Method.new delete_folder_config
7123
+ delete_folder_tree_config = parent_rpcs.delete_folder_tree if parent_rpcs.respond_to? :delete_folder_tree
7124
+ @delete_folder_tree = ::Gapic::Config::Method.new delete_folder_tree_config
7125
+ query_folder_contents_config = parent_rpcs.query_folder_contents if parent_rpcs.respond_to? :query_folder_contents
7126
+ @query_folder_contents = ::Gapic::Config::Method.new query_folder_contents_config
7127
+ query_user_root_contents_config = parent_rpcs.query_user_root_contents if parent_rpcs.respond_to? :query_user_root_contents
7128
+ @query_user_root_contents = ::Gapic::Config::Method.new query_user_root_contents_config
7129
+ move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder
7130
+ @move_folder = ::Gapic::Config::Method.new move_folder_config
5252
7131
  list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
5253
7132
  @list_repositories = ::Gapic::Config::Method.new list_repositories_config
5254
7133
  get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
@@ -5259,6 +7138,8 @@ module Google
5259
7138
  @update_repository = ::Gapic::Config::Method.new update_repository_config
5260
7139
  delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository
5261
7140
  @delete_repository = ::Gapic::Config::Method.new delete_repository_config
7141
+ move_repository_config = parent_rpcs.move_repository if parent_rpcs.respond_to? :move_repository
7142
+ @move_repository = ::Gapic::Config::Method.new move_repository_config
5262
7143
  commit_repository_changes_config = parent_rpcs.commit_repository_changes if parent_rpcs.respond_to? :commit_repository_changes
5263
7144
  @commit_repository_changes = ::Gapic::Config::Method.new commit_repository_changes_config
5264
7145
  read_repository_file_config = parent_rpcs.read_repository_file if parent_rpcs.respond_to? :read_repository_file
@@ -5357,6 +7238,12 @@ module Google
5357
7238
  @get_config = ::Gapic::Config::Method.new get_config_config
5358
7239
  update_config_config = parent_rpcs.update_config if parent_rpcs.respond_to? :update_config
5359
7240
  @update_config = ::Gapic::Config::Method.new update_config_config
7241
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
7242
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
7243
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
7244
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
7245
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
7246
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
5360
7247
 
5361
7248
  yield self if block_given?
5362
7249
  end