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
@@ -152,6 +152,13 @@ module Google
152
152
  @quota_project_id = @config.quota_project
153
153
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
154
 
155
+ @operations_client = Operations.new do |config|
156
+ config.credentials = credentials
157
+ config.quota_project = @quota_project_id
158
+ config.endpoint = @config.endpoint
159
+ config.universe_domain = @config.universe_domain
160
+ end
161
+
155
162
  @dataform_stub = ::Gapic::ServiceStub.new(
156
163
  ::Google::Cloud::Dataform::V1::Dataform::Stub,
157
164
  credentials: credentials,
@@ -164,57 +171,1540 @@ module Google
164
171
  logger: @config.logger
165
172
  )
166
173
 
167
- @dataform_stub.stub_logger&.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
174
+ @dataform_stub.stub_logger&.info do |entry|
175
+ entry.set_system_name
176
+ entry.set_service
177
+ entry.message = "Created client for #{entry.service}"
178
+ entry.set_credentials_fields credentials
179
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
180
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
181
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
182
+ end
183
+
184
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
185
+ config.credentials = credentials
186
+ config.quota_project = @quota_project_id
187
+ config.endpoint = @dataform_stub.endpoint
188
+ config.universe_domain = @dataform_stub.universe_domain
189
+ config.logger = @dataform_stub.logger if config.respond_to? :logger=
190
+ end
191
+
192
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
193
+ config.credentials = credentials
194
+ config.quota_project = @quota_project_id
195
+ config.endpoint = @dataform_stub.endpoint
196
+ config.universe_domain = @dataform_stub.universe_domain
197
+ config.logger = @dataform_stub.logger if config.respond_to? :logger=
198
+ end
199
+ end
200
+
201
+ ##
202
+ # Get the associated client for long-running operations.
203
+ #
204
+ # @return [::Google::Cloud::Dataform::V1::Dataform::Operations]
205
+ #
206
+ attr_reader :operations_client
207
+
208
+ ##
209
+ # Get the associated client for mix-in of the Locations.
210
+ #
211
+ # @return [Google::Cloud::Location::Locations::Client]
212
+ #
213
+ attr_reader :location_client
214
+
215
+ ##
216
+ # Get the associated client for mix-in of the IAMPolicy.
217
+ #
218
+ # @return [Google::Iam::V1::IAMPolicy::Client]
219
+ #
220
+ attr_reader :iam_policy_client
221
+
222
+ ##
223
+ # The logger used for request/response debug logging.
224
+ #
225
+ # @return [Logger]
226
+ #
227
+ def logger
228
+ @dataform_stub.logger
229
+ end
230
+
231
+ # Service calls
232
+
233
+ ##
234
+ # Fetches a single TeamFolder.
235
+ #
236
+ # @overload get_team_folder(request, options = nil)
237
+ # Pass arguments to `get_team_folder` via a request object, either of type
238
+ # {::Google::Cloud::Dataform::V1::GetTeamFolderRequest} or an equivalent Hash.
239
+ #
240
+ # @param request [::Google::Cloud::Dataform::V1::GetTeamFolderRequest, ::Hash]
241
+ # A request object representing the call parameters. Required. To specify no
242
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
243
+ # @param options [::Gapic::CallOptions, ::Hash]
244
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
245
+ #
246
+ # @overload get_team_folder(name: nil)
247
+ # Pass arguments to `get_team_folder` via keyword arguments. Note that at
248
+ # least one keyword argument is required. To specify no parameters, or to keep all
249
+ # the default parameter values, pass an empty Hash as a request object (see above).
250
+ #
251
+ # @param name [::String]
252
+ # Required. The TeamFolder's name.
253
+ #
254
+ # @yield [response, operation] Access the result along with the RPC operation
255
+ # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder]
256
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
257
+ #
258
+ # @return [::Google::Cloud::Dataform::V1::TeamFolder]
259
+ #
260
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
261
+ #
262
+ # @example Basic example
263
+ # require "google/cloud/dataform/v1"
264
+ #
265
+ # # Create a client object. The client can be reused for multiple calls.
266
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
267
+ #
268
+ # # Create a request. To set request fields, pass in keyword arguments.
269
+ # request = Google::Cloud::Dataform::V1::GetTeamFolderRequest.new
270
+ #
271
+ # # Call the get_team_folder method.
272
+ # result = client.get_team_folder request
273
+ #
274
+ # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
275
+ # p result
276
+ #
277
+ def get_team_folder request, options = nil
278
+ raise ::ArgumentError, "request must be provided" if request.nil?
279
+
280
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetTeamFolderRequest
281
+
282
+ # Converts hash and nil to an options object
283
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
284
+
285
+ # Customize the options with defaults
286
+ metadata = @config.rpcs.get_team_folder.metadata.to_h
287
+
288
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
289
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
290
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
291
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
292
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
293
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
+
295
+ header_params = {}
296
+ if request.name
297
+ header_params["name"] = request.name
298
+ end
299
+
300
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
301
+ metadata[:"x-goog-request-params"] ||= request_params_header
302
+
303
+ options.apply_defaults timeout: @config.rpcs.get_team_folder.timeout,
304
+ metadata: metadata,
305
+ retry_policy: @config.rpcs.get_team_folder.retry_policy
306
+
307
+ options.apply_defaults timeout: @config.timeout,
308
+ metadata: @config.metadata,
309
+ retry_policy: @config.retry_policy
310
+
311
+ @dataform_stub.call_rpc :get_team_folder, request, options: options do |response, operation|
312
+ yield response, operation if block_given?
313
+ end
314
+ rescue ::GRPC::BadStatus => e
315
+ raise ::Google::Cloud::Error.from_error(e)
316
+ end
317
+
318
+ ##
319
+ # Creates a new TeamFolder in a given project and location.
320
+ #
321
+ # @overload create_team_folder(request, options = nil)
322
+ # Pass arguments to `create_team_folder` via a request object, either of type
323
+ # {::Google::Cloud::Dataform::V1::CreateTeamFolderRequest} or an equivalent Hash.
324
+ #
325
+ # @param request [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest, ::Hash]
326
+ # A request object representing the call parameters. Required. To specify no
327
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
328
+ # @param options [::Gapic::CallOptions, ::Hash]
329
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
330
+ #
331
+ # @overload create_team_folder(parent: nil, team_folder: nil)
332
+ # Pass arguments to `create_team_folder` via keyword arguments. Note that at
333
+ # least one keyword argument is required. To specify no parameters, or to keep all
334
+ # the default parameter values, pass an empty Hash as a request object (see above).
335
+ #
336
+ # @param parent [::String]
337
+ # Required. The location in which to create the TeamFolder. Must be in the
338
+ # format `projects/*/locations/*`.
339
+ # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash]
340
+ # Required. The TeamFolder to create.
341
+ #
342
+ # @yield [response, operation] Access the result along with the RPC operation
343
+ # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder]
344
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
345
+ #
346
+ # @return [::Google::Cloud::Dataform::V1::TeamFolder]
347
+ #
348
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
349
+ #
350
+ # @example Basic example
351
+ # require "google/cloud/dataform/v1"
352
+ #
353
+ # # Create a client object. The client can be reused for multiple calls.
354
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
355
+ #
356
+ # # Create a request. To set request fields, pass in keyword arguments.
357
+ # request = Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new
358
+ #
359
+ # # Call the create_team_folder method.
360
+ # result = client.create_team_folder request
361
+ #
362
+ # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
363
+ # p result
364
+ #
365
+ def create_team_folder request, options = nil
366
+ raise ::ArgumentError, "request must be provided" if request.nil?
367
+
368
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest
369
+
370
+ # Converts hash and nil to an options object
371
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
372
+
373
+ # Customize the options with defaults
374
+ metadata = @config.rpcs.create_team_folder.metadata.to_h
375
+
376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
377
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
378
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
379
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
381
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
382
+
383
+ header_params = {}
384
+ if request.parent
385
+ header_params["parent"] = request.parent
386
+ end
387
+
388
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
+ metadata[:"x-goog-request-params"] ||= request_params_header
390
+
391
+ options.apply_defaults timeout: @config.rpcs.create_team_folder.timeout,
392
+ metadata: metadata,
393
+ retry_policy: @config.rpcs.create_team_folder.retry_policy
394
+
395
+ options.apply_defaults timeout: @config.timeout,
396
+ metadata: @config.metadata,
397
+ retry_policy: @config.retry_policy
398
+
399
+ @dataform_stub.call_rpc :create_team_folder, request, options: options do |response, operation|
400
+ yield response, operation if block_given?
401
+ end
402
+ rescue ::GRPC::BadStatus => e
403
+ raise ::Google::Cloud::Error.from_error(e)
404
+ end
405
+
406
+ ##
407
+ # Updates a single TeamFolder.
408
+ #
409
+ # @overload update_team_folder(request, options = nil)
410
+ # Pass arguments to `update_team_folder` via a request object, either of type
411
+ # {::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest} or an equivalent Hash.
412
+ #
413
+ # @param request [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest, ::Hash]
414
+ # A request object representing the call parameters. Required. To specify no
415
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
416
+ # @param options [::Gapic::CallOptions, ::Hash]
417
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
418
+ #
419
+ # @overload update_team_folder(update_mask: nil, team_folder: nil)
420
+ # Pass arguments to `update_team_folder` via keyword arguments. Note that at
421
+ # least one keyword argument is required. To specify no parameters, or to keep all
422
+ # the default parameter values, pass an empty Hash as a request object (see above).
423
+ #
424
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
425
+ # Optional. Specifies the fields to be updated in the Folder. If left unset,
426
+ # all fields will be updated.
427
+ # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash]
428
+ # Required. The updated TeamFolder.
429
+ #
430
+ # @yield [response, operation] Access the result along with the RPC operation
431
+ # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder]
432
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
433
+ #
434
+ # @return [::Google::Cloud::Dataform::V1::TeamFolder]
435
+ #
436
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
+ #
438
+ # @example Basic example
439
+ # require "google/cloud/dataform/v1"
440
+ #
441
+ # # Create a client object. The client can be reused for multiple calls.
442
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
443
+ #
444
+ # # Create a request. To set request fields, pass in keyword arguments.
445
+ # request = Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new
446
+ #
447
+ # # Call the update_team_folder method.
448
+ # result = client.update_team_folder request
449
+ #
450
+ # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder.
451
+ # p result
452
+ #
453
+ def update_team_folder request, options = nil
454
+ raise ::ArgumentError, "request must be provided" if request.nil?
455
+
456
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest
457
+
458
+ # Converts hash and nil to an options object
459
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
460
+
461
+ # Customize the options with defaults
462
+ metadata = @config.rpcs.update_team_folder.metadata.to_h
463
+
464
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
465
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
466
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
467
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
468
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
469
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
470
+
471
+ header_params = {}
472
+ if request.team_folder&.name
473
+ header_params["team_folder.name"] = request.team_folder.name
474
+ end
475
+
476
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
477
+ metadata[:"x-goog-request-params"] ||= request_params_header
478
+
479
+ options.apply_defaults timeout: @config.rpcs.update_team_folder.timeout,
480
+ metadata: metadata,
481
+ retry_policy: @config.rpcs.update_team_folder.retry_policy
482
+
483
+ options.apply_defaults timeout: @config.timeout,
484
+ metadata: @config.metadata,
485
+ retry_policy: @config.retry_policy
486
+
487
+ @dataform_stub.call_rpc :update_team_folder, request, options: options do |response, operation|
488
+ yield response, operation if block_given?
489
+ end
490
+ rescue ::GRPC::BadStatus => e
491
+ raise ::Google::Cloud::Error.from_error(e)
492
+ end
493
+
494
+ ##
495
+ # Deletes a single TeamFolder.
496
+ #
497
+ # @overload delete_team_folder(request, options = nil)
498
+ # Pass arguments to `delete_team_folder` via a request object, either of type
499
+ # {::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest} or an equivalent Hash.
500
+ #
501
+ # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest, ::Hash]
502
+ # A request object representing the call parameters. Required. To specify no
503
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
504
+ # @param options [::Gapic::CallOptions, ::Hash]
505
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
506
+ #
507
+ # @overload delete_team_folder(name: nil)
508
+ # Pass arguments to `delete_team_folder` via keyword arguments. Note that at
509
+ # least one keyword argument is required. To specify no parameters, or to keep all
510
+ # the default parameter values, pass an empty Hash as a request object (see above).
511
+ #
512
+ # @param name [::String]
513
+ # Required. The TeamFolder's name.
514
+ #
515
+ # @yield [response, operation] Access the result along with the RPC operation
516
+ # @yieldparam response [::Google::Protobuf::Empty]
517
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
518
+ #
519
+ # @return [::Google::Protobuf::Empty]
520
+ #
521
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
522
+ #
523
+ # @example Basic example
524
+ # require "google/cloud/dataform/v1"
525
+ #
526
+ # # Create a client object. The client can be reused for multiple calls.
527
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
528
+ #
529
+ # # Create a request. To set request fields, pass in keyword arguments.
530
+ # request = Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new
531
+ #
532
+ # # Call the delete_team_folder method.
533
+ # result = client.delete_team_folder request
534
+ #
535
+ # # The returned object is of type Google::Protobuf::Empty.
536
+ # p result
537
+ #
538
+ def delete_team_folder request, options = nil
539
+ raise ::ArgumentError, "request must be provided" if request.nil?
540
+
541
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest
542
+
543
+ # Converts hash and nil to an options object
544
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
545
+
546
+ # Customize the options with defaults
547
+ metadata = @config.rpcs.delete_team_folder.metadata.to_h
548
+
549
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
550
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
551
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
552
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
553
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
554
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
+
556
+ header_params = {}
557
+ if request.name
558
+ header_params["name"] = request.name
559
+ end
560
+
561
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
562
+ metadata[:"x-goog-request-params"] ||= request_params_header
563
+
564
+ options.apply_defaults timeout: @config.rpcs.delete_team_folder.timeout,
565
+ metadata: metadata,
566
+ retry_policy: @config.rpcs.delete_team_folder.retry_policy
567
+
568
+ options.apply_defaults timeout: @config.timeout,
569
+ metadata: @config.metadata,
570
+ retry_policy: @config.retry_policy
571
+
572
+ @dataform_stub.call_rpc :delete_team_folder, request, options: options do |response, operation|
573
+ yield response, operation if block_given?
574
+ end
575
+ rescue ::GRPC::BadStatus => e
576
+ raise ::Google::Cloud::Error.from_error(e)
577
+ end
578
+
579
+ ##
580
+ # Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces,
581
+ # ReleaseConfigs, and WorkflowConfigs).
582
+ #
583
+ # @overload delete_team_folder_tree(request, options = nil)
584
+ # Pass arguments to `delete_team_folder_tree` via a request object, either of type
585
+ # {::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest} or an equivalent Hash.
586
+ #
587
+ # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest, ::Hash]
588
+ # A request object representing the call parameters. Required. To specify no
589
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
590
+ # @param options [::Gapic::CallOptions, ::Hash]
591
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
592
+ #
593
+ # @overload delete_team_folder_tree(name: nil, force: nil)
594
+ # Pass arguments to `delete_team_folder_tree` via keyword arguments. Note that at
595
+ # least one keyword argument is required. To specify no parameters, or to keep all
596
+ # the default parameter values, pass an empty Hash as a request object (see above).
597
+ #
598
+ # @param name [::String]
599
+ # Required. The TeamFolder's name.
600
+ # Format: projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder}
601
+ # @param force [::Boolean]
602
+ # Optional. If `false` (default): The operation will fail if any
603
+ # Repository within the folder hierarchy has associated Release Configs or
604
+ # Workflow Configs.
605
+ #
606
+ # If `true`: The operation will attempt to delete everything, including any
607
+ # Release Configs and Workflow Configs linked to Repositories within the
608
+ # folder hierarchy. This permanently removes schedules and resources.
609
+ #
610
+ # @yield [response, operation] Access the result along with the RPC operation
611
+ # @yieldparam response [::Gapic::Operation]
612
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
613
+ #
614
+ # @return [::Gapic::Operation]
615
+ #
616
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
617
+ #
618
+ # @example Basic example
619
+ # require "google/cloud/dataform/v1"
620
+ #
621
+ # # Create a client object. The client can be reused for multiple calls.
622
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
623
+ #
624
+ # # Create a request. To set request fields, pass in keyword arguments.
625
+ # request = Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new
626
+ #
627
+ # # Call the delete_team_folder_tree method.
628
+ # result = client.delete_team_folder_tree request
629
+ #
630
+ # # The returned object is of type Gapic::Operation. You can use it to
631
+ # # check the status of an operation, cancel it, or wait for results.
632
+ # # Here is how to wait for a response.
633
+ # result.wait_until_done! timeout: 60
634
+ # if result.response?
635
+ # p result.response
636
+ # else
637
+ # puts "No response received."
638
+ # end
639
+ #
640
+ def delete_team_folder_tree request, options = nil
641
+ raise ::ArgumentError, "request must be provided" if request.nil?
642
+
643
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest
644
+
645
+ # Converts hash and nil to an options object
646
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
647
+
648
+ # Customize the options with defaults
649
+ metadata = @config.rpcs.delete_team_folder_tree.metadata.to_h
650
+
651
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
652
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
653
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
654
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
655
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
656
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
657
+
658
+ header_params = {}
659
+ if request.name
660
+ header_params["name"] = request.name
661
+ end
662
+
663
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
664
+ metadata[:"x-goog-request-params"] ||= request_params_header
665
+
666
+ options.apply_defaults timeout: @config.rpcs.delete_team_folder_tree.timeout,
667
+ metadata: metadata,
668
+ retry_policy: @config.rpcs.delete_team_folder_tree.retry_policy
669
+
670
+ options.apply_defaults timeout: @config.timeout,
671
+ metadata: @config.metadata,
672
+ retry_policy: @config.retry_policy
673
+
674
+ @dataform_stub.call_rpc :delete_team_folder_tree, request, options: options do |response, operation|
675
+ response = ::Gapic::Operation.new response, @operations_client, options: options
676
+ yield response, operation if block_given?
677
+ throw :response, response
678
+ end
679
+ rescue ::GRPC::BadStatus => e
680
+ raise ::Google::Cloud::Error.from_error(e)
681
+ end
682
+
683
+ ##
684
+ # Returns the contents of a given TeamFolder.
685
+ #
686
+ # @overload query_team_folder_contents(request, options = nil)
687
+ # Pass arguments to `query_team_folder_contents` via a request object, either of type
688
+ # {::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest} or an equivalent Hash.
689
+ #
690
+ # @param request [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest, ::Hash]
691
+ # A request object representing the call parameters. Required. To specify no
692
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
693
+ # @param options [::Gapic::CallOptions, ::Hash]
694
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
695
+ #
696
+ # @overload query_team_folder_contents(team_folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
697
+ # Pass arguments to `query_team_folder_contents` via keyword arguments. Note that at
698
+ # least one keyword argument is required. To specify no parameters, or to keep all
699
+ # the default parameter values, pass an empty Hash as a request object (see above).
700
+ #
701
+ # @param team_folder [::String]
702
+ # Required. Resource name of the TeamFolder to list contents for.
703
+ # Format: `projects/*/locations/*/teamFolders/*`.
704
+ # @param page_size [::Integer]
705
+ # Optional. Maximum number of paths to return. The server may return fewer
706
+ # items than requested. If unspecified, the server will pick an appropriate
707
+ # default.
708
+ # @param page_token [::String]
709
+ # Optional. Page token received from a previous `QueryTeamFolderContents`
710
+ # call. Provide this to retrieve the subsequent page.
711
+ #
712
+ # When paginating, all other parameters provided to
713
+ # `QueryTeamFolderContents`, with the exception of `page_size`, must match
714
+ # the call that provided the page token.
715
+ # @param order_by [::String]
716
+ # Optional. Field to additionally sort results by.
717
+ # Will order Folders before Repositories, and then by `order_by` in ascending
718
+ # order. Supported keywords: `display_name` (default), `create_time`,
719
+ # last_modified_time.
720
+ # Examples:
721
+ #
722
+ # * `orderBy="display_name"`
723
+ # * `orderBy="display_name desc"`
724
+ # @param filter [::String]
725
+ # Optional. Optional filtering for the returned list. Filtering is currently
726
+ # only supported on the `display_name` field.
727
+ #
728
+ # Example:
729
+ #
730
+ # * `filter="display_name="MyFolder""`
731
+ #
732
+ # @yield [response, operation] Access the result along with the RPC operation
733
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
734
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
735
+ #
736
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>]
737
+ #
738
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
739
+ #
740
+ # @example Basic example
741
+ # require "google/cloud/dataform/v1"
742
+ #
743
+ # # Create a client object. The client can be reused for multiple calls.
744
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
745
+ #
746
+ # # Create a request. To set request fields, pass in keyword arguments.
747
+ # request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new
748
+ #
749
+ # # Call the query_team_folder_contents method.
750
+ # result = client.query_team_folder_contents request
751
+ #
752
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
753
+ # # over elements, and API calls will be issued to fetch pages as needed.
754
+ # result.each do |item|
755
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry.
756
+ # p item
757
+ # end
758
+ #
759
+ def query_team_folder_contents request, options = nil
760
+ raise ::ArgumentError, "request must be provided" if request.nil?
761
+
762
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest
763
+
764
+ # Converts hash and nil to an options object
765
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
766
+
767
+ # Customize the options with defaults
768
+ metadata = @config.rpcs.query_team_folder_contents.metadata.to_h
769
+
770
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
771
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
772
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
773
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
774
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
775
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
776
+
777
+ header_params = {}
778
+ if request.team_folder
779
+ header_params["team_folder"] = request.team_folder
780
+ end
781
+
782
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
783
+ metadata[:"x-goog-request-params"] ||= request_params_header
784
+
785
+ options.apply_defaults timeout: @config.rpcs.query_team_folder_contents.timeout,
786
+ metadata: metadata,
787
+ retry_policy: @config.rpcs.query_team_folder_contents.retry_policy
788
+
789
+ options.apply_defaults timeout: @config.timeout,
790
+ metadata: @config.metadata,
791
+ retry_policy: @config.retry_policy
792
+
793
+ @dataform_stub.call_rpc :query_team_folder_contents, request, options: options do |response, operation|
794
+ response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_team_folder_contents, request, response, operation, options
795
+ yield response, operation if block_given?
796
+ throw :response, response
797
+ end
798
+ rescue ::GRPC::BadStatus => e
799
+ raise ::Google::Cloud::Error.from_error(e)
800
+ end
801
+
802
+ ##
803
+ # Returns all TeamFolders in a given location that the caller has access to
804
+ # and match the provided filter.
805
+ #
806
+ # @overload search_team_folders(request, options = nil)
807
+ # Pass arguments to `search_team_folders` via a request object, either of type
808
+ # {::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest} or an equivalent Hash.
809
+ #
810
+ # @param request [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, ::Hash]
811
+ # A request object representing the call parameters. Required. To specify no
812
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
813
+ # @param options [::Gapic::CallOptions, ::Hash]
814
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
815
+ #
816
+ # @overload search_team_folders(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
817
+ # Pass arguments to `search_team_folders` via keyword arguments. Note that at
818
+ # least one keyword argument is required. To specify no parameters, or to keep all
819
+ # the default parameter values, pass an empty Hash as a request object (see above).
820
+ #
821
+ # @param location [::String]
822
+ # Required. Location in which to query TeamFolders.
823
+ # Format: `projects/*/locations/*`.
824
+ # @param page_size [::Integer]
825
+ # Optional. Maximum number of `TeamFolders` to return. The server may return
826
+ # fewer items than requested. If unspecified, the server will pick a default
827
+ # of `page_size` = 50.
828
+ # @param page_token [::String]
829
+ # Optional. Page token received from a previous `SearchTeamFolders` call.
830
+ # Provide this to retrieve the subsequent page.
831
+ #
832
+ # When paginating, all other parameters provided to
833
+ # `SearchTeamFolders`, with the exception of `page_size`, must
834
+ # match the call that provided the page token.
835
+ # @param order_by [::String]
836
+ # Optional. Field to additionally sort results by.
837
+ # Supported keywords: `display_name` (default), `create_time`,
838
+ # `last_modified_time`. Examples:
839
+ #
840
+ # * `orderBy="display_name"`
841
+ # * `orderBy="display_name desc"`
842
+ # @param filter [::String]
843
+ # Optional. Optional filtering for the returned list. Filtering is currently
844
+ # only supported on the `display_name` field.
845
+ #
846
+ # Example:
847
+ #
848
+ # * `filter="display_name="MyFolder""`
849
+ #
850
+ # @yield [response, operation] Access the result along with the RPC operation
851
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
852
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
853
+ #
854
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>]
855
+ #
856
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
857
+ #
858
+ # @example Basic example
859
+ # require "google/cloud/dataform/v1"
860
+ #
861
+ # # Create a client object. The client can be reused for multiple calls.
862
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
863
+ #
864
+ # # Create a request. To set request fields, pass in keyword arguments.
865
+ # request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new
866
+ #
867
+ # # Call the search_team_folders method.
868
+ # result = client.search_team_folders request
869
+ #
870
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
871
+ # # over elements, and API calls will be issued to fetch pages as needed.
872
+ # result.each do |item|
873
+ # # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult.
874
+ # p item
875
+ # end
876
+ #
877
+ def search_team_folders request, options = nil
878
+ raise ::ArgumentError, "request must be provided" if request.nil?
879
+
880
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest
881
+
882
+ # Converts hash and nil to an options object
883
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
884
+
885
+ # Customize the options with defaults
886
+ metadata = @config.rpcs.search_team_folders.metadata.to_h
887
+
888
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
889
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
890
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
891
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
892
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
893
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
894
+
895
+ header_params = {}
896
+ if request.location
897
+ header_params["location"] = request.location
898
+ end
899
+
900
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
901
+ metadata[:"x-goog-request-params"] ||= request_params_header
902
+
903
+ options.apply_defaults timeout: @config.rpcs.search_team_folders.timeout,
904
+ metadata: metadata,
905
+ retry_policy: @config.rpcs.search_team_folders.retry_policy
906
+
907
+ options.apply_defaults timeout: @config.timeout,
908
+ metadata: @config.metadata,
909
+ retry_policy: @config.retry_policy
910
+
911
+ @dataform_stub.call_rpc :search_team_folders, request, options: options do |response, operation|
912
+ response = ::Gapic::PagedEnumerable.new @dataform_stub, :search_team_folders, request, response, operation, options
913
+ yield response, operation if block_given?
914
+ throw :response, response
915
+ end
916
+ rescue ::GRPC::BadStatus => e
917
+ raise ::Google::Cloud::Error.from_error(e)
918
+ end
919
+
920
+ ##
921
+ # Fetches a single Folder.
922
+ #
923
+ # @overload get_folder(request, options = nil)
924
+ # Pass arguments to `get_folder` via a request object, either of type
925
+ # {::Google::Cloud::Dataform::V1::GetFolderRequest} or an equivalent Hash.
926
+ #
927
+ # @param request [::Google::Cloud::Dataform::V1::GetFolderRequest, ::Hash]
928
+ # A request object representing the call parameters. Required. To specify no
929
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
930
+ # @param options [::Gapic::CallOptions, ::Hash]
931
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
932
+ #
933
+ # @overload get_folder(name: nil)
934
+ # Pass arguments to `get_folder` via keyword arguments. Note that at
935
+ # least one keyword argument is required. To specify no parameters, or to keep all
936
+ # the default parameter values, pass an empty Hash as a request object (see above).
937
+ #
938
+ # @param name [::String]
939
+ # Required. The Folder's name.
940
+ #
941
+ # @yield [response, operation] Access the result along with the RPC operation
942
+ # @yieldparam response [::Google::Cloud::Dataform::V1::Folder]
943
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
944
+ #
945
+ # @return [::Google::Cloud::Dataform::V1::Folder]
946
+ #
947
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
948
+ #
949
+ # @example Basic example
950
+ # require "google/cloud/dataform/v1"
951
+ #
952
+ # # Create a client object. The client can be reused for multiple calls.
953
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
954
+ #
955
+ # # Create a request. To set request fields, pass in keyword arguments.
956
+ # request = Google::Cloud::Dataform::V1::GetFolderRequest.new
957
+ #
958
+ # # Call the get_folder method.
959
+ # result = client.get_folder request
960
+ #
961
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
962
+ # p result
963
+ #
964
+ def get_folder request, options = nil
965
+ raise ::ArgumentError, "request must be provided" if request.nil?
966
+
967
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetFolderRequest
968
+
969
+ # Converts hash and nil to an options object
970
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
971
+
972
+ # Customize the options with defaults
973
+ metadata = @config.rpcs.get_folder.metadata.to_h
974
+
975
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
976
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
977
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
978
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
979
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
980
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
981
+
982
+ header_params = {}
983
+ if request.name
984
+ header_params["name"] = request.name
985
+ end
986
+
987
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
988
+ metadata[:"x-goog-request-params"] ||= request_params_header
989
+
990
+ options.apply_defaults timeout: @config.rpcs.get_folder.timeout,
991
+ metadata: metadata,
992
+ retry_policy: @config.rpcs.get_folder.retry_policy
993
+
994
+ options.apply_defaults timeout: @config.timeout,
995
+ metadata: @config.metadata,
996
+ retry_policy: @config.retry_policy
997
+
998
+ @dataform_stub.call_rpc :get_folder, request, options: options do |response, operation|
999
+ yield response, operation if block_given?
1000
+ end
1001
+ rescue ::GRPC::BadStatus => e
1002
+ raise ::Google::Cloud::Error.from_error(e)
1003
+ end
1004
+
1005
+ ##
1006
+ # Creates a new Folder in a given project and location.
1007
+ #
1008
+ # @overload create_folder(request, options = nil)
1009
+ # Pass arguments to `create_folder` via a request object, either of type
1010
+ # {::Google::Cloud::Dataform::V1::CreateFolderRequest} or an equivalent Hash.
1011
+ #
1012
+ # @param request [::Google::Cloud::Dataform::V1::CreateFolderRequest, ::Hash]
1013
+ # A request object representing the call parameters. Required. To specify no
1014
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1015
+ # @param options [::Gapic::CallOptions, ::Hash]
1016
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1017
+ #
1018
+ # @overload create_folder(parent: nil, folder: nil)
1019
+ # Pass arguments to `create_folder` via keyword arguments. Note that at
1020
+ # least one keyword argument is required. To specify no parameters, or to keep all
1021
+ # the default parameter values, pass an empty Hash as a request object (see above).
1022
+ #
1023
+ # @param parent [::String]
1024
+ # Required. The location in which to create the Folder. Must be in the format
1025
+ # `projects/*/locations/*`.
1026
+ # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
1027
+ # Required. The Folder to create.
1028
+ #
1029
+ # @yield [response, operation] Access the result along with the RPC operation
1030
+ # @yieldparam response [::Google::Cloud::Dataform::V1::Folder]
1031
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1032
+ #
1033
+ # @return [::Google::Cloud::Dataform::V1::Folder]
1034
+ #
1035
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1036
+ #
1037
+ # @example Basic example
1038
+ # require "google/cloud/dataform/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::Dataform::V1::CreateFolderRequest.new
1045
+ #
1046
+ # # Call the create_folder method.
1047
+ # result = client.create_folder request
1048
+ #
1049
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
1050
+ # p result
1051
+ #
1052
+ def create_folder request, options = nil
1053
+ raise ::ArgumentError, "request must be provided" if request.nil?
1054
+
1055
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateFolderRequest
1056
+
1057
+ # Converts hash and nil to an options object
1058
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1059
+
1060
+ # Customize the options with defaults
1061
+ metadata = @config.rpcs.create_folder.metadata.to_h
1062
+
1063
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1064
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1065
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1066
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1067
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1068
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1069
+
1070
+ header_params = {}
1071
+ if request.parent
1072
+ header_params["parent"] = request.parent
1073
+ end
1074
+
1075
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1076
+ metadata[:"x-goog-request-params"] ||= request_params_header
1077
+
1078
+ options.apply_defaults timeout: @config.rpcs.create_folder.timeout,
1079
+ metadata: metadata,
1080
+ retry_policy: @config.rpcs.create_folder.retry_policy
1081
+
1082
+ options.apply_defaults timeout: @config.timeout,
1083
+ metadata: @config.metadata,
1084
+ retry_policy: @config.retry_policy
1085
+
1086
+ @dataform_stub.call_rpc :create_folder, request, options: options do |response, operation|
1087
+ yield response, operation if block_given?
1088
+ end
1089
+ rescue ::GRPC::BadStatus => e
1090
+ raise ::Google::Cloud::Error.from_error(e)
1091
+ end
1092
+
1093
+ ##
1094
+ # Updates a single Folder.
1095
+ #
1096
+ # @overload update_folder(request, options = nil)
1097
+ # Pass arguments to `update_folder` via a request object, either of type
1098
+ # {::Google::Cloud::Dataform::V1::UpdateFolderRequest} or an equivalent Hash.
1099
+ #
1100
+ # @param request [::Google::Cloud::Dataform::V1::UpdateFolderRequest, ::Hash]
1101
+ # A request object representing the call parameters. Required. To specify no
1102
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1103
+ # @param options [::Gapic::CallOptions, ::Hash]
1104
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1105
+ #
1106
+ # @overload update_folder(update_mask: nil, folder: nil)
1107
+ # Pass arguments to `update_folder` via keyword arguments. Note that at
1108
+ # least one keyword argument is required. To specify no parameters, or to keep all
1109
+ # the default parameter values, pass an empty Hash as a request object (see above).
1110
+ #
1111
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1112
+ # Optional. Specifies the fields to be updated in the Folder. If left unset,
1113
+ # all fields that can be updated, will be updated. A few fields cannot be
1114
+ # updated and will be ignored if specified in the update_mask (e.g.
1115
+ # parent_name, team_folder_name).
1116
+ # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash]
1117
+ # Required. The updated Folder.
1118
+ #
1119
+ # @yield [response, operation] Access the result along with the RPC operation
1120
+ # @yieldparam response [::Google::Cloud::Dataform::V1::Folder]
1121
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1122
+ #
1123
+ # @return [::Google::Cloud::Dataform::V1::Folder]
1124
+ #
1125
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1126
+ #
1127
+ # @example Basic example
1128
+ # require "google/cloud/dataform/v1"
1129
+ #
1130
+ # # Create a client object. The client can be reused for multiple calls.
1131
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1132
+ #
1133
+ # # Create a request. To set request fields, pass in keyword arguments.
1134
+ # request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new
1135
+ #
1136
+ # # Call the update_folder method.
1137
+ # result = client.update_folder request
1138
+ #
1139
+ # # The returned object is of type Google::Cloud::Dataform::V1::Folder.
1140
+ # p result
1141
+ #
1142
+ def update_folder request, options = nil
1143
+ raise ::ArgumentError, "request must be provided" if request.nil?
1144
+
1145
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateFolderRequest
1146
+
1147
+ # Converts hash and nil to an options object
1148
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1149
+
1150
+ # Customize the options with defaults
1151
+ metadata = @config.rpcs.update_folder.metadata.to_h
1152
+
1153
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1154
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1155
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1156
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1157
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1158
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1159
+
1160
+ header_params = {}
1161
+ if request.folder&.name
1162
+ header_params["folder.name"] = request.folder.name
1163
+ end
1164
+
1165
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1166
+ metadata[:"x-goog-request-params"] ||= request_params_header
1167
+
1168
+ options.apply_defaults timeout: @config.rpcs.update_folder.timeout,
1169
+ metadata: metadata,
1170
+ retry_policy: @config.rpcs.update_folder.retry_policy
1171
+
1172
+ options.apply_defaults timeout: @config.timeout,
1173
+ metadata: @config.metadata,
1174
+ retry_policy: @config.retry_policy
1175
+
1176
+ @dataform_stub.call_rpc :update_folder, request, options: options do |response, operation|
1177
+ yield response, operation if block_given?
1178
+ end
1179
+ rescue ::GRPC::BadStatus => e
1180
+ raise ::Google::Cloud::Error.from_error(e)
1181
+ end
1182
+
1183
+ ##
1184
+ # Deletes a single Folder.
1185
+ #
1186
+ # @overload delete_folder(request, options = nil)
1187
+ # Pass arguments to `delete_folder` via a request object, either of type
1188
+ # {::Google::Cloud::Dataform::V1::DeleteFolderRequest} or an equivalent Hash.
1189
+ #
1190
+ # @param request [::Google::Cloud::Dataform::V1::DeleteFolderRequest, ::Hash]
1191
+ # A request object representing the call parameters. Required. To specify no
1192
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1193
+ # @param options [::Gapic::CallOptions, ::Hash]
1194
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1195
+ #
1196
+ # @overload delete_folder(name: nil)
1197
+ # Pass arguments to `delete_folder` via keyword arguments. Note that at
1198
+ # least one keyword argument is required. To specify no parameters, or to keep all
1199
+ # the default parameter values, pass an empty Hash as a request object (see above).
1200
+ #
1201
+ # @param name [::String]
1202
+ # Required. The Folder's name.
1203
+ #
1204
+ # @yield [response, operation] Access the result along with the RPC operation
1205
+ # @yieldparam response [::Google::Protobuf::Empty]
1206
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1207
+ #
1208
+ # @return [::Google::Protobuf::Empty]
1209
+ #
1210
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1211
+ #
1212
+ # @example Basic example
1213
+ # require "google/cloud/dataform/v1"
1214
+ #
1215
+ # # Create a client object. The client can be reused for multiple calls.
1216
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1217
+ #
1218
+ # # Create a request. To set request fields, pass in keyword arguments.
1219
+ # request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new
1220
+ #
1221
+ # # Call the delete_folder method.
1222
+ # result = client.delete_folder request
1223
+ #
1224
+ # # The returned object is of type Google::Protobuf::Empty.
1225
+ # p result
1226
+ #
1227
+ def delete_folder request, options = nil
1228
+ raise ::ArgumentError, "request must be provided" if request.nil?
1229
+
1230
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderRequest
1231
+
1232
+ # Converts hash and nil to an options object
1233
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1234
+
1235
+ # Customize the options with defaults
1236
+ metadata = @config.rpcs.delete_folder.metadata.to_h
1237
+
1238
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1239
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1240
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1241
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1242
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1243
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1244
+
1245
+ header_params = {}
1246
+ if request.name
1247
+ header_params["name"] = request.name
1248
+ end
1249
+
1250
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1251
+ metadata[:"x-goog-request-params"] ||= request_params_header
1252
+
1253
+ options.apply_defaults timeout: @config.rpcs.delete_folder.timeout,
1254
+ metadata: metadata,
1255
+ retry_policy: @config.rpcs.delete_folder.retry_policy
1256
+
1257
+ options.apply_defaults timeout: @config.timeout,
1258
+ metadata: @config.metadata,
1259
+ retry_policy: @config.retry_policy
1260
+
1261
+ @dataform_stub.call_rpc :delete_folder, request, options: options do |response, operation|
1262
+ yield response, operation if block_given?
1263
+ end
1264
+ rescue ::GRPC::BadStatus => e
1265
+ raise ::Google::Cloud::Error.from_error(e)
1266
+ end
1267
+
1268
+ ##
1269
+ # Deletes a Folder with its contents (Folders, Repositories, Workspaces,
1270
+ # ReleaseConfigs, and WorkflowConfigs).
1271
+ #
1272
+ # @overload delete_folder_tree(request, options = nil)
1273
+ # Pass arguments to `delete_folder_tree` via a request object, either of type
1274
+ # {::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest} or an equivalent Hash.
1275
+ #
1276
+ # @param request [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, ::Hash]
1277
+ # A request object representing the call parameters. Required. To specify no
1278
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1279
+ # @param options [::Gapic::CallOptions, ::Hash]
1280
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1281
+ #
1282
+ # @overload delete_folder_tree(name: nil, force: nil)
1283
+ # Pass arguments to `delete_folder_tree` via keyword arguments. Note that at
1284
+ # least one keyword argument is required. To specify no parameters, or to keep all
1285
+ # the default parameter values, pass an empty Hash as a request object (see above).
1286
+ #
1287
+ # @param name [::String]
1288
+ # Required. The Folder's name.
1289
+ # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder}
1290
+ # @param force [::Boolean]
1291
+ # Optional. If `false` (default): The operation will fail if any
1292
+ # Repository within the folder hierarchy has associated Release Configs or
1293
+ # Workflow Configs.
1294
+ #
1295
+ # If `true`: The operation will attempt to delete everything, including any
1296
+ # Release Configs and Workflow Configs linked to Repositories within the
1297
+ # folder hierarchy. This permanently removes schedules and resources.
1298
+ #
1299
+ # @yield [response, operation] Access the result along with the RPC operation
1300
+ # @yieldparam response [::Gapic::Operation]
1301
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1302
+ #
1303
+ # @return [::Gapic::Operation]
1304
+ #
1305
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1306
+ #
1307
+ # @example Basic example
1308
+ # require "google/cloud/dataform/v1"
1309
+ #
1310
+ # # Create a client object. The client can be reused for multiple calls.
1311
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1312
+ #
1313
+ # # Create a request. To set request fields, pass in keyword arguments.
1314
+ # request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new
1315
+ #
1316
+ # # Call the delete_folder_tree method.
1317
+ # result = client.delete_folder_tree request
1318
+ #
1319
+ # # The returned object is of type Gapic::Operation. You can use it to
1320
+ # # check the status of an operation, cancel it, or wait for results.
1321
+ # # Here is how to wait for a response.
1322
+ # result.wait_until_done! timeout: 60
1323
+ # if result.response?
1324
+ # p result.response
1325
+ # else
1326
+ # puts "No response received."
1327
+ # end
1328
+ #
1329
+ def delete_folder_tree request, options = nil
1330
+ raise ::ArgumentError, "request must be provided" if request.nil?
1331
+
1332
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest
1333
+
1334
+ # Converts hash and nil to an options object
1335
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1336
+
1337
+ # Customize the options with defaults
1338
+ metadata = @config.rpcs.delete_folder_tree.metadata.to_h
1339
+
1340
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1341
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1342
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1343
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1344
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1345
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1346
+
1347
+ header_params = {}
1348
+ if request.name
1349
+ header_params["name"] = request.name
1350
+ end
1351
+
1352
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1353
+ metadata[:"x-goog-request-params"] ||= request_params_header
1354
+
1355
+ options.apply_defaults timeout: @config.rpcs.delete_folder_tree.timeout,
1356
+ metadata: metadata,
1357
+ retry_policy: @config.rpcs.delete_folder_tree.retry_policy
1358
+
1359
+ options.apply_defaults timeout: @config.timeout,
1360
+ metadata: @config.metadata,
1361
+ retry_policy: @config.retry_policy
1362
+
1363
+ @dataform_stub.call_rpc :delete_folder_tree, request, options: options do |response, operation|
1364
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1365
+ yield response, operation if block_given?
1366
+ throw :response, response
1367
+ end
1368
+ rescue ::GRPC::BadStatus => e
1369
+ raise ::Google::Cloud::Error.from_error(e)
1370
+ end
1371
+
1372
+ ##
1373
+ # Returns the contents of a given Folder.
1374
+ #
1375
+ # @overload query_folder_contents(request, options = nil)
1376
+ # Pass arguments to `query_folder_contents` via a request object, either of type
1377
+ # {::Google::Cloud::Dataform::V1::QueryFolderContentsRequest} or an equivalent Hash.
1378
+ #
1379
+ # @param request [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, ::Hash]
1380
+ # A request object representing the call parameters. Required. To specify no
1381
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1382
+ # @param options [::Gapic::CallOptions, ::Hash]
1383
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1384
+ #
1385
+ # @overload query_folder_contents(folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1386
+ # Pass arguments to `query_folder_contents` via keyword arguments. Note that at
1387
+ # least one keyword argument is required. To specify no parameters, or to keep all
1388
+ # the default parameter values, pass an empty Hash as a request object (see above).
1389
+ #
1390
+ # @param folder [::String]
1391
+ # Required. Resource name of the Folder to list contents for.
1392
+ # Format: projects/*/locations/*/folders/*
1393
+ # @param page_size [::Integer]
1394
+ # Optional. Maximum number of paths to return. The server may return fewer
1395
+ # items than requested. If unspecified, the server will pick an appropriate
1396
+ # default.
1397
+ # @param page_token [::String]
1398
+ # Optional. Page token received from a previous `QueryFolderContents` call.
1399
+ # Provide this to retrieve the subsequent page.
1400
+ #
1401
+ # When paginating, all other parameters provided to
1402
+ # `QueryFolderContents`, with the exception of `page_size`, must match the
1403
+ # call that provided the page token.
1404
+ # @param order_by [::String]
1405
+ # Optional. Field to additionally sort results by.
1406
+ # Will order Folders before Repositories, and then by `order_by` in ascending
1407
+ # order. Supported keywords: display_name (default), create_time,
1408
+ # last_modified_time.
1409
+ # Examples:
1410
+ #
1411
+ # * `orderBy="display_name"`
1412
+ # * `orderBy="display_name desc"`
1413
+ # @param filter [::String]
1414
+ # Optional. Optional filtering for the returned list. Filtering is currently
1415
+ # only supported on the `display_name` field.
1416
+ #
1417
+ # Example:
1418
+ #
1419
+ # * `filter="display_name="MyFolder""`
1420
+ #
1421
+ # @yield [response, operation] Access the result along with the RPC operation
1422
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
1423
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1424
+ #
1425
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>]
1426
+ #
1427
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1428
+ #
1429
+ # @example Basic example
1430
+ # require "google/cloud/dataform/v1"
1431
+ #
1432
+ # # Create a client object. The client can be reused for multiple calls.
1433
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1434
+ #
1435
+ # # Create a request. To set request fields, pass in keyword arguments.
1436
+ # request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new
1437
+ #
1438
+ # # Call the query_folder_contents method.
1439
+ # result = client.query_folder_contents request
1440
+ #
1441
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1442
+ # # over elements, and API calls will be issued to fetch pages as needed.
1443
+ # result.each do |item|
1444
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry.
1445
+ # p item
1446
+ # end
1447
+ #
1448
+ def query_folder_contents request, options = nil
1449
+ raise ::ArgumentError, "request must be provided" if request.nil?
1450
+
1451
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest
1452
+
1453
+ # Converts hash and nil to an options object
1454
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1455
+
1456
+ # Customize the options with defaults
1457
+ metadata = @config.rpcs.query_folder_contents.metadata.to_h
1458
+
1459
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1460
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1461
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1462
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1463
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1464
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1465
+
1466
+ header_params = {}
1467
+ if request.folder
1468
+ header_params["folder"] = request.folder
175
1469
  end
176
1470
 
177
- @location_client = Google::Cloud::Location::Locations::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.logger = @dataform_stub.logger if config.respond_to? :logger=
183
- end
1471
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1472
+ metadata[:"x-goog-request-params"] ||= request_params_header
184
1473
 
185
- @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
186
- config.credentials = credentials
187
- config.quota_project = @quota_project_id
188
- config.endpoint = @dataform_stub.endpoint
189
- config.universe_domain = @dataform_stub.universe_domain
190
- config.logger = @dataform_stub.logger if config.respond_to? :logger=
1474
+ options.apply_defaults timeout: @config.rpcs.query_folder_contents.timeout,
1475
+ metadata: metadata,
1476
+ retry_policy: @config.rpcs.query_folder_contents.retry_policy
1477
+
1478
+ options.apply_defaults timeout: @config.timeout,
1479
+ metadata: @config.metadata,
1480
+ retry_policy: @config.retry_policy
1481
+
1482
+ @dataform_stub.call_rpc :query_folder_contents, request, options: options do |response, operation|
1483
+ response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_folder_contents, request, response, operation, options
1484
+ yield response, operation if block_given?
1485
+ throw :response, response
191
1486
  end
1487
+ rescue ::GRPC::BadStatus => e
1488
+ raise ::Google::Cloud::Error.from_error(e)
192
1489
  end
193
1490
 
194
1491
  ##
195
- # Get the associated client for mix-in of the Locations.
1492
+ # Returns the contents of a caller's root folder in a given location.
1493
+ # The root folder contains all resources that are created by the user and not
1494
+ # contained in any other folder.
196
1495
  #
197
- # @return [Google::Cloud::Location::Locations::Client]
1496
+ # @overload query_user_root_contents(request, options = nil)
1497
+ # Pass arguments to `query_user_root_contents` via a request object, either of type
1498
+ # {::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest} or an equivalent Hash.
198
1499
  #
199
- attr_reader :location_client
200
-
201
- ##
202
- # Get the associated client for mix-in of the IAMPolicy.
1500
+ # @param request [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, ::Hash]
1501
+ # A request object representing the call parameters. Required. To specify no
1502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1503
+ # @param options [::Gapic::CallOptions, ::Hash]
1504
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
203
1505
  #
204
- # @return [Google::Iam::V1::IAMPolicy::Client]
1506
+ # @overload query_user_root_contents(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1507
+ # Pass arguments to `query_user_root_contents` via keyword arguments. Note that at
1508
+ # least one keyword argument is required. To specify no parameters, or to keep all
1509
+ # the default parameter values, pass an empty Hash as a request object (see above).
205
1510
  #
206
- attr_reader :iam_policy_client
1511
+ # @param location [::String]
1512
+ # Required. Location of the user root folder to list contents for.
1513
+ # Format: projects/*/locations/*
1514
+ # @param page_size [::Integer]
1515
+ # Optional. Maximum number of paths to return. The server may return fewer
1516
+ # items than requested. If unspecified, the server will pick an appropriate
1517
+ # default.
1518
+ # @param page_token [::String]
1519
+ # Optional. Page token received from a previous `QueryUserRootContents` call.
1520
+ # Provide this to retrieve the subsequent page.
1521
+ #
1522
+ # When paginating, all other parameters provided to
1523
+ # `QueryUserRootFolderContents`, with the exception of `page_size`, must
1524
+ # match the call that provided the page token.
1525
+ # @param order_by [::String]
1526
+ # Optional. Field to additionally sort results by.
1527
+ # Will order Folders before Repositories, and then by `order_by` in ascending
1528
+ # order. Supported keywords: display_name (default), created_at,
1529
+ # last_modified_at. Examples:
1530
+ #
1531
+ # * `orderBy="display_name"`
1532
+ # * `orderBy="display_name desc"`
1533
+ # @param filter [::String]
1534
+ # Optional. Optional filtering for the returned list. Filtering is currently
1535
+ # only supported on the `display_name` field.
1536
+ #
1537
+ # Example:
1538
+ #
1539
+ # * `filter="display_name="MyFolder""`
1540
+ #
1541
+ # @yield [response, operation] Access the result along with the RPC operation
1542
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
1543
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1544
+ #
1545
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>]
1546
+ #
1547
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1548
+ #
1549
+ # @example Basic example
1550
+ # require "google/cloud/dataform/v1"
1551
+ #
1552
+ # # Create a client object. The client can be reused for multiple calls.
1553
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1554
+ #
1555
+ # # Create a request. To set request fields, pass in keyword arguments.
1556
+ # request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new
1557
+ #
1558
+ # # Call the query_user_root_contents method.
1559
+ # result = client.query_user_root_contents request
1560
+ #
1561
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1562
+ # # over elements, and API calls will be issued to fetch pages as needed.
1563
+ # result.each do |item|
1564
+ # # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry.
1565
+ # p item
1566
+ # end
1567
+ #
1568
+ def query_user_root_contents request, options = nil
1569
+ raise ::ArgumentError, "request must be provided" if request.nil?
1570
+
1571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest
1572
+
1573
+ # Converts hash and nil to an options object
1574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1575
+
1576
+ # Customize the options with defaults
1577
+ metadata = @config.rpcs.query_user_root_contents.metadata.to_h
1578
+
1579
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1580
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1581
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1582
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1583
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1584
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1585
+
1586
+ header_params = {}
1587
+ if request.location
1588
+ header_params["location"] = request.location
1589
+ end
1590
+
1591
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1592
+ metadata[:"x-goog-request-params"] ||= request_params_header
1593
+
1594
+ options.apply_defaults timeout: @config.rpcs.query_user_root_contents.timeout,
1595
+ metadata: metadata,
1596
+ retry_policy: @config.rpcs.query_user_root_contents.retry_policy
1597
+
1598
+ options.apply_defaults timeout: @config.timeout,
1599
+ metadata: @config.metadata,
1600
+ retry_policy: @config.retry_policy
1601
+
1602
+ @dataform_stub.call_rpc :query_user_root_contents, request, options: options do |response, operation|
1603
+ response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_user_root_contents, request, response, operation, options
1604
+ yield response, operation if block_given?
1605
+ throw :response, response
1606
+ end
1607
+ rescue ::GRPC::BadStatus => e
1608
+ raise ::Google::Cloud::Error.from_error(e)
1609
+ end
207
1610
 
208
1611
  ##
209
- # The logger used for request/response debug logging.
1612
+ # Moves a Folder to a new Folder, TeamFolder, or the root location.
210
1613
  #
211
- # @return [Logger]
1614
+ # @overload move_folder(request, options = nil)
1615
+ # Pass arguments to `move_folder` via a request object, either of type
1616
+ # {::Google::Cloud::Dataform::V1::MoveFolderRequest} or an equivalent Hash.
212
1617
  #
213
- def logger
214
- @dataform_stub.logger
215
- end
1618
+ # @param request [::Google::Cloud::Dataform::V1::MoveFolderRequest, ::Hash]
1619
+ # A request object representing the call parameters. Required. To specify no
1620
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1621
+ # @param options [::Gapic::CallOptions, ::Hash]
1622
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1623
+ #
1624
+ # @overload move_folder(name: nil, destination_containing_folder: nil)
1625
+ # Pass arguments to `move_folder` via keyword arguments. Note that at
1626
+ # least one keyword argument is required. To specify no parameters, or to keep all
1627
+ # the default parameter values, pass an empty Hash as a request object (see above).
1628
+ #
1629
+ # @param name [::String]
1630
+ # Required. The full resource name of the Folder to move.
1631
+ # @param destination_containing_folder [::String]
1632
+ # Optional. The name of the Folder, TeamFolder, or root location to move the
1633
+ # Folder to. Can be in the format of: "" to move into the root User folder,
1634
+ # `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
1635
+ #
1636
+ # @yield [response, operation] Access the result along with the RPC operation
1637
+ # @yieldparam response [::Gapic::Operation]
1638
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1639
+ #
1640
+ # @return [::Gapic::Operation]
1641
+ #
1642
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1643
+ #
1644
+ # @example Basic example
1645
+ # require "google/cloud/dataform/v1"
1646
+ #
1647
+ # # Create a client object. The client can be reused for multiple calls.
1648
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
1649
+ #
1650
+ # # Create a request. To set request fields, pass in keyword arguments.
1651
+ # request = Google::Cloud::Dataform::V1::MoveFolderRequest.new
1652
+ #
1653
+ # # Call the move_folder method.
1654
+ # result = client.move_folder request
1655
+ #
1656
+ # # The returned object is of type Gapic::Operation. You can use it to
1657
+ # # check the status of an operation, cancel it, or wait for results.
1658
+ # # Here is how to wait for a response.
1659
+ # result.wait_until_done! timeout: 60
1660
+ # if result.response?
1661
+ # p result.response
1662
+ # else
1663
+ # puts "No response received."
1664
+ # end
1665
+ #
1666
+ def move_folder request, options = nil
1667
+ raise ::ArgumentError, "request must be provided" if request.nil?
216
1668
 
217
- # Service calls
1669
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveFolderRequest
1670
+
1671
+ # Converts hash and nil to an options object
1672
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1673
+
1674
+ # Customize the options with defaults
1675
+ metadata = @config.rpcs.move_folder.metadata.to_h
1676
+
1677
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1678
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1679
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1680
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
1681
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1682
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1683
+
1684
+ header_params = {}
1685
+ if request.name
1686
+ header_params["name"] = request.name
1687
+ end
1688
+
1689
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1690
+ metadata[:"x-goog-request-params"] ||= request_params_header
1691
+
1692
+ options.apply_defaults timeout: @config.rpcs.move_folder.timeout,
1693
+ metadata: metadata,
1694
+ retry_policy: @config.rpcs.move_folder.retry_policy
1695
+
1696
+ options.apply_defaults timeout: @config.timeout,
1697
+ metadata: @config.metadata,
1698
+ retry_policy: @config.retry_policy
1699
+
1700
+ @dataform_stub.call_rpc :move_folder, request, options: options do |response, operation|
1701
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1702
+ yield response, operation if block_given?
1703
+ throw :response, response
1704
+ end
1705
+ rescue ::GRPC::BadStatus => e
1706
+ raise ::Google::Cloud::Error.from_error(e)
1707
+ end
218
1708
 
219
1709
  ##
220
1710
  # Lists Repositories in a given project and location.
@@ -618,9 +2108,13 @@ module Google
618
2108
  # @param name [::String]
619
2109
  # Required. The repository's name.
620
2110
  # @param force [::Boolean]
621
- # Optional. If set to true, any child resources of this repository will also
622
- # be deleted. (Otherwise, the request will only succeed if the repository has
623
- # no child resources.)
2111
+ # Optional. If set to true, child resources of this repository (compilation
2112
+ # results and workflow invocations) will also be deleted. Otherwise, the
2113
+ # request will only succeed if the repository has no child resources.
2114
+ #
2115
+ # **Note:** *This flag doesn't support deletion of workspaces, release
2116
+ # configs or workflow configs. If any of such resources exists in the
2117
+ # repository, the request will fail.*.
624
2118
  #
625
2119
  # @yield [response, operation] Access the result along with the RPC operation
626
2120
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -645,16 +2139,113 @@ module Google
645
2139
  # # The returned object is of type Google::Protobuf::Empty.
646
2140
  # p result
647
2141
  #
648
- def delete_repository request, options = nil
2142
+ def delete_repository request, options = nil
2143
+ raise ::ArgumentError, "request must be provided" if request.nil?
2144
+
2145
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest
2146
+
2147
+ # Converts hash and nil to an options object
2148
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2149
+
2150
+ # Customize the options with defaults
2151
+ metadata = @config.rpcs.delete_repository.metadata.to_h
2152
+
2153
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2154
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2155
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2156
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
2157
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2158
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2159
+
2160
+ header_params = {}
2161
+ if request.name
2162
+ header_params["name"] = request.name
2163
+ end
2164
+
2165
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2166
+ metadata[:"x-goog-request-params"] ||= request_params_header
2167
+
2168
+ options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
2169
+ metadata: metadata,
2170
+ retry_policy: @config.rpcs.delete_repository.retry_policy
2171
+
2172
+ options.apply_defaults timeout: @config.timeout,
2173
+ metadata: @config.metadata,
2174
+ retry_policy: @config.retry_policy
2175
+
2176
+ @dataform_stub.call_rpc :delete_repository, request, options: options do |response, operation|
2177
+ yield response, operation if block_given?
2178
+ end
2179
+ rescue ::GRPC::BadStatus => e
2180
+ raise ::Google::Cloud::Error.from_error(e)
2181
+ end
2182
+
2183
+ ##
2184
+ # Moves a Repository to a new location.
2185
+ #
2186
+ # @overload move_repository(request, options = nil)
2187
+ # Pass arguments to `move_repository` via a request object, either of type
2188
+ # {::Google::Cloud::Dataform::V1::MoveRepositoryRequest} or an equivalent Hash.
2189
+ #
2190
+ # @param request [::Google::Cloud::Dataform::V1::MoveRepositoryRequest, ::Hash]
2191
+ # A request object representing the call parameters. Required. To specify no
2192
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2193
+ # @param options [::Gapic::CallOptions, ::Hash]
2194
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2195
+ #
2196
+ # @overload move_repository(name: nil, destination_containing_folder: nil)
2197
+ # Pass arguments to `move_repository` via keyword arguments. Note that at
2198
+ # least one keyword argument is required. To specify no parameters, or to keep all
2199
+ # the default parameter values, pass an empty Hash as a request object (see above).
2200
+ #
2201
+ # @param name [::String]
2202
+ # Required. The full resource name of the repository to move.
2203
+ # @param destination_containing_folder [::String]
2204
+ # Optional. The name of the Folder, TeamFolder, or root location to move the
2205
+ # repository to. Can be in the format of: "" to move into the root User
2206
+ # folder, `projects/*/locations/*/folders/*`,
2207
+ # `projects/*/locations/*/teamFolders/*`
2208
+ #
2209
+ # @yield [response, operation] Access the result along with the RPC operation
2210
+ # @yieldparam response [::Gapic::Operation]
2211
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2212
+ #
2213
+ # @return [::Gapic::Operation]
2214
+ #
2215
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2216
+ #
2217
+ # @example Basic example
2218
+ # require "google/cloud/dataform/v1"
2219
+ #
2220
+ # # Create a client object. The client can be reused for multiple calls.
2221
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
2222
+ #
2223
+ # # Create a request. To set request fields, pass in keyword arguments.
2224
+ # request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new
2225
+ #
2226
+ # # Call the move_repository method.
2227
+ # result = client.move_repository request
2228
+ #
2229
+ # # The returned object is of type Gapic::Operation. You can use it to
2230
+ # # check the status of an operation, cancel it, or wait for results.
2231
+ # # Here is how to wait for a response.
2232
+ # result.wait_until_done! timeout: 60
2233
+ # if result.response?
2234
+ # p result.response
2235
+ # else
2236
+ # puts "No response received."
2237
+ # end
2238
+ #
2239
+ def move_repository request, options = nil
649
2240
  raise ::ArgumentError, "request must be provided" if request.nil?
650
2241
 
651
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest
2242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveRepositoryRequest
652
2243
 
653
2244
  # Converts hash and nil to an options object
654
2245
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
655
2246
 
656
2247
  # Customize the options with defaults
657
- metadata = @config.rpcs.delete_repository.metadata.to_h
2248
+ metadata = @config.rpcs.move_repository.metadata.to_h
658
2249
 
659
2250
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
660
2251
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -671,16 +2262,18 @@ module Google
671
2262
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
672
2263
  metadata[:"x-goog-request-params"] ||= request_params_header
673
2264
 
674
- options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
2265
+ options.apply_defaults timeout: @config.rpcs.move_repository.timeout,
675
2266
  metadata: metadata,
676
- retry_policy: @config.rpcs.delete_repository.retry_policy
2267
+ retry_policy: @config.rpcs.move_repository.retry_policy
677
2268
 
678
2269
  options.apply_defaults timeout: @config.timeout,
679
2270
  metadata: @config.metadata,
680
2271
  retry_policy: @config.retry_policy
681
2272
 
682
- @dataform_stub.call_rpc :delete_repository, request, options: options do |response, operation|
2273
+ @dataform_stub.call_rpc :move_repository, request, options: options do |response, operation|
2274
+ response = ::Gapic::Operation.new response, @operations_client, options: options
683
2275
  yield response, operation if block_given?
2276
+ throw :response, response
684
2277
  end
685
2278
  rescue ::GRPC::BadStatus => e
686
2279
  raise ::Google::Cloud::Error.from_error(e)
@@ -2347,7 +3940,7 @@ module Google
2347
3940
  # @param options [::Gapic::CallOptions, ::Hash]
2348
3941
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2349
3942
  #
2350
- # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil)
3943
+ # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil, view: nil)
2351
3944
  # Pass arguments to `query_directory_contents` via keyword arguments. Note that at
2352
3945
  # least one keyword argument is required. To specify no parameters, or to keep all
2353
3946
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2368,6 +3961,11 @@ module Google
2368
3961
  # When paginating, all other parameters provided to
2369
3962
  # `QueryDirectoryContents`, with the exception of `page_size`, must match the
2370
3963
  # call that provided the page token.
3964
+ # @param view [::Google::Cloud::Dataform::V1::DirectoryContentsView]
3965
+ # Optional. Specifies the metadata to return for each directory entry.
3966
+ # If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
3967
+ # Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
3968
+ # CMEK-protected workspaces.
2371
3969
  #
2372
3970
  # @yield [response, operation] Access the result along with the RPC operation
2373
3971
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::DirectoryEntry>]
@@ -5206,6 +6804,294 @@ module Google
5206
6804
  raise ::Google::Cloud::Error.from_error(e)
5207
6805
  end
5208
6806
 
6807
+ ##
6808
+ # Gets the access control policy for a resource.
6809
+ # Returns an empty policy if the resource exists and does not have a policy
6810
+ # set.
6811
+ #
6812
+ # @overload get_iam_policy(request, options = nil)
6813
+ # Pass arguments to `get_iam_policy` via a request object, either of type
6814
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
6815
+ #
6816
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
6817
+ # A request object representing the call parameters. Required. To specify no
6818
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6819
+ # @param options [::Gapic::CallOptions, ::Hash]
6820
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6821
+ #
6822
+ # @overload get_iam_policy(resource: nil, options: nil)
6823
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
6824
+ # least one keyword argument is required. To specify no parameters, or to keep all
6825
+ # the default parameter values, pass an empty Hash as a request object (see above).
6826
+ #
6827
+ # @param resource [::String]
6828
+ # REQUIRED: The resource for which the policy is being requested.
6829
+ # See the operation documentation for the appropriate value for this field.
6830
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
6831
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
6832
+ # `GetIamPolicy`.
6833
+ #
6834
+ # @yield [response, operation] Access the result along with the RPC operation
6835
+ # @yieldparam response [::Google::Iam::V1::Policy]
6836
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6837
+ #
6838
+ # @return [::Google::Iam::V1::Policy]
6839
+ #
6840
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6841
+ #
6842
+ # @example Basic example
6843
+ # require "google/cloud/dataform/v1"
6844
+ #
6845
+ # # Create a client object. The client can be reused for multiple calls.
6846
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
6847
+ #
6848
+ # # Create a request. To set request fields, pass in keyword arguments.
6849
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
6850
+ #
6851
+ # # Call the get_iam_policy method.
6852
+ # result = client.get_iam_policy request
6853
+ #
6854
+ # # The returned object is of type Google::Iam::V1::Policy.
6855
+ # p result
6856
+ #
6857
+ def get_iam_policy request, options = nil
6858
+ raise ::ArgumentError, "request must be provided" if request.nil?
6859
+
6860
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
6861
+
6862
+ # Converts hash and nil to an options object
6863
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6864
+
6865
+ # Customize the options with defaults
6866
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
6867
+
6868
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6869
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6870
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6871
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
6872
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6873
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6874
+
6875
+ header_params = {}
6876
+ if request.resource
6877
+ header_params["resource"] = request.resource
6878
+ end
6879
+
6880
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6881
+ metadata[:"x-goog-request-params"] ||= request_params_header
6882
+
6883
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
6884
+ metadata: metadata,
6885
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
6886
+
6887
+ options.apply_defaults timeout: @config.timeout,
6888
+ metadata: @config.metadata,
6889
+ retry_policy: @config.retry_policy
6890
+
6891
+ @dataform_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
6892
+ yield response, operation if block_given?
6893
+ end
6894
+ rescue ::GRPC::BadStatus => e
6895
+ raise ::Google::Cloud::Error.from_error(e)
6896
+ end
6897
+
6898
+ ##
6899
+ # Sets the access control policy on the specified resource. Replaces any
6900
+ # existing policy.
6901
+ #
6902
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
6903
+ #
6904
+ # @overload set_iam_policy(request, options = nil)
6905
+ # Pass arguments to `set_iam_policy` via a request object, either of type
6906
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
6907
+ #
6908
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
6909
+ # A request object representing the call parameters. Required. To specify no
6910
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6911
+ # @param options [::Gapic::CallOptions, ::Hash]
6912
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6913
+ #
6914
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
6915
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
6916
+ # least one keyword argument is required. To specify no parameters, or to keep all
6917
+ # the default parameter values, pass an empty Hash as a request object (see above).
6918
+ #
6919
+ # @param resource [::String]
6920
+ # REQUIRED: The resource for which the policy is being specified.
6921
+ # See the operation documentation for the appropriate value for this field.
6922
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
6923
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
6924
+ # the policy is limited to a few 10s of KB. An empty policy is a
6925
+ # valid policy but certain Cloud Platform services (such as Projects)
6926
+ # might reject them.
6927
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
6928
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
6929
+ # the fields in the mask will be modified. If no mask is provided, the
6930
+ # following default mask is used:
6931
+ #
6932
+ # `paths: "bindings, etag"`
6933
+ #
6934
+ # @yield [response, operation] Access the result along with the RPC operation
6935
+ # @yieldparam response [::Google::Iam::V1::Policy]
6936
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6937
+ #
6938
+ # @return [::Google::Iam::V1::Policy]
6939
+ #
6940
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6941
+ #
6942
+ # @example Basic example
6943
+ # require "google/cloud/dataform/v1"
6944
+ #
6945
+ # # Create a client object. The client can be reused for multiple calls.
6946
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
6947
+ #
6948
+ # # Create a request. To set request fields, pass in keyword arguments.
6949
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
6950
+ #
6951
+ # # Call the set_iam_policy method.
6952
+ # result = client.set_iam_policy request
6953
+ #
6954
+ # # The returned object is of type Google::Iam::V1::Policy.
6955
+ # p result
6956
+ #
6957
+ def set_iam_policy request, options = nil
6958
+ raise ::ArgumentError, "request must be provided" if request.nil?
6959
+
6960
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
6961
+
6962
+ # Converts hash and nil to an options object
6963
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6964
+
6965
+ # Customize the options with defaults
6966
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
6967
+
6968
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6969
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6970
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6971
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
6972
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6973
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6974
+
6975
+ header_params = {}
6976
+ if request.resource
6977
+ header_params["resource"] = request.resource
6978
+ end
6979
+
6980
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6981
+ metadata[:"x-goog-request-params"] ||= request_params_header
6982
+
6983
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
6984
+ metadata: metadata,
6985
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
6986
+
6987
+ options.apply_defaults timeout: @config.timeout,
6988
+ metadata: @config.metadata,
6989
+ retry_policy: @config.retry_policy
6990
+
6991
+ @dataform_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
6992
+ yield response, operation if block_given?
6993
+ end
6994
+ rescue ::GRPC::BadStatus => e
6995
+ raise ::Google::Cloud::Error.from_error(e)
6996
+ end
6997
+
6998
+ ##
6999
+ # Returns permissions that a caller has on the specified resource.
7000
+ # If the resource does not exist, this will return an empty set of
7001
+ # permissions, not a `NOT_FOUND` error.
7002
+ #
7003
+ # Note: This operation is designed to be used for building permission-aware
7004
+ # UIs and command-line tools, not for authorization checking. This operation
7005
+ # may "fail open" without warning.
7006
+ #
7007
+ # @overload test_iam_permissions(request, options = nil)
7008
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
7009
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
7010
+ #
7011
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
7012
+ # A request object representing the call parameters. Required. To specify no
7013
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
7014
+ # @param options [::Gapic::CallOptions, ::Hash]
7015
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
7016
+ #
7017
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
7018
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
7019
+ # least one keyword argument is required. To specify no parameters, or to keep all
7020
+ # the default parameter values, pass an empty Hash as a request object (see above).
7021
+ #
7022
+ # @param resource [::String]
7023
+ # REQUIRED: The resource for which the policy detail is being requested.
7024
+ # See the operation documentation for the appropriate value for this field.
7025
+ # @param permissions [::Array<::String>]
7026
+ # The set of permissions to check for the `resource`. Permissions with
7027
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
7028
+ # information see
7029
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
7030
+ #
7031
+ # @yield [response, operation] Access the result along with the RPC operation
7032
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
7033
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
7034
+ #
7035
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
7036
+ #
7037
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
7038
+ #
7039
+ # @example Basic example
7040
+ # require "google/cloud/dataform/v1"
7041
+ #
7042
+ # # Create a client object. The client can be reused for multiple calls.
7043
+ # client = Google::Cloud::Dataform::V1::Dataform::Client.new
7044
+ #
7045
+ # # Create a request. To set request fields, pass in keyword arguments.
7046
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
7047
+ #
7048
+ # # Call the test_iam_permissions method.
7049
+ # result = client.test_iam_permissions request
7050
+ #
7051
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
7052
+ # p result
7053
+ #
7054
+ def test_iam_permissions request, options = nil
7055
+ raise ::ArgumentError, "request must be provided" if request.nil?
7056
+
7057
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
7058
+
7059
+ # Converts hash and nil to an options object
7060
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
7061
+
7062
+ # Customize the options with defaults
7063
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
7064
+
7065
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
7066
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
7067
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
7068
+ gapic_version: ::Google::Cloud::Dataform::V1::VERSION
7069
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
7070
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
7071
+
7072
+ header_params = {}
7073
+ if request.resource
7074
+ header_params["resource"] = request.resource
7075
+ end
7076
+
7077
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
7078
+ metadata[:"x-goog-request-params"] ||= request_params_header
7079
+
7080
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
7081
+ metadata: metadata,
7082
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
7083
+
7084
+ options.apply_defaults timeout: @config.timeout,
7085
+ metadata: @config.metadata,
7086
+ retry_policy: @config.retry_policy
7087
+
7088
+ @dataform_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
7089
+ yield response, operation if block_given?
7090
+ end
7091
+ rescue ::GRPC::BadStatus => e
7092
+ raise ::Google::Cloud::Error.from_error(e)
7093
+ end
7094
+
5209
7095
  ##
5210
7096
  # Configuration class for the Dataform API.
5211
7097
  #
@@ -5222,17 +7108,17 @@ module Google
5222
7108
  # @example
5223
7109
  #
5224
7110
  # # Modify the global config, setting the timeout for
5225
- # # list_repositories to 20 seconds,
7111
+ # # get_team_folder to 20 seconds,
5226
7112
  # # and all remaining timeouts to 10 seconds.
5227
7113
  # ::Google::Cloud::Dataform::V1::Dataform::Client.configure do |config|
5228
7114
  # config.timeout = 10.0
5229
- # config.rpcs.list_repositories.timeout = 20.0
7115
+ # config.rpcs.get_team_folder.timeout = 20.0
5230
7116
  # end
5231
7117
  #
5232
7118
  # # Apply the above configuration only to a new client.
5233
7119
  # client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config|
5234
7120
  # config.timeout = 10.0
5235
- # config.rpcs.list_repositories.timeout = 20.0
7121
+ # config.rpcs.get_team_folder.timeout = 20.0
5236
7122
  # end
5237
7123
  #
5238
7124
  # @!attribute [rw] endpoint
@@ -5302,6 +7188,7 @@ module Google
5302
7188
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
5303
7189
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
5304
7190
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
7191
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
5305
7192
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
5306
7193
  # trigger a retry.
5307
7194
  # @return [::Hash]
@@ -5385,10 +7272,86 @@ module Google
5385
7272
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
5386
7273
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
5387
7274
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
7275
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
5388
7276
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
5389
7277
  # trigger a retry.
5390
7278
  #
5391
7279
  class Rpcs
7280
+ ##
7281
+ # RPC-specific configuration for `get_team_folder`
7282
+ # @return [::Gapic::Config::Method]
7283
+ #
7284
+ attr_reader :get_team_folder
7285
+ ##
7286
+ # RPC-specific configuration for `create_team_folder`
7287
+ # @return [::Gapic::Config::Method]
7288
+ #
7289
+ attr_reader :create_team_folder
7290
+ ##
7291
+ # RPC-specific configuration for `update_team_folder`
7292
+ # @return [::Gapic::Config::Method]
7293
+ #
7294
+ attr_reader :update_team_folder
7295
+ ##
7296
+ # RPC-specific configuration for `delete_team_folder`
7297
+ # @return [::Gapic::Config::Method]
7298
+ #
7299
+ attr_reader :delete_team_folder
7300
+ ##
7301
+ # RPC-specific configuration for `delete_team_folder_tree`
7302
+ # @return [::Gapic::Config::Method]
7303
+ #
7304
+ attr_reader :delete_team_folder_tree
7305
+ ##
7306
+ # RPC-specific configuration for `query_team_folder_contents`
7307
+ # @return [::Gapic::Config::Method]
7308
+ #
7309
+ attr_reader :query_team_folder_contents
7310
+ ##
7311
+ # RPC-specific configuration for `search_team_folders`
7312
+ # @return [::Gapic::Config::Method]
7313
+ #
7314
+ attr_reader :search_team_folders
7315
+ ##
7316
+ # RPC-specific configuration for `get_folder`
7317
+ # @return [::Gapic::Config::Method]
7318
+ #
7319
+ attr_reader :get_folder
7320
+ ##
7321
+ # RPC-specific configuration for `create_folder`
7322
+ # @return [::Gapic::Config::Method]
7323
+ #
7324
+ attr_reader :create_folder
7325
+ ##
7326
+ # RPC-specific configuration for `update_folder`
7327
+ # @return [::Gapic::Config::Method]
7328
+ #
7329
+ attr_reader :update_folder
7330
+ ##
7331
+ # RPC-specific configuration for `delete_folder`
7332
+ # @return [::Gapic::Config::Method]
7333
+ #
7334
+ attr_reader :delete_folder
7335
+ ##
7336
+ # RPC-specific configuration for `delete_folder_tree`
7337
+ # @return [::Gapic::Config::Method]
7338
+ #
7339
+ attr_reader :delete_folder_tree
7340
+ ##
7341
+ # RPC-specific configuration for `query_folder_contents`
7342
+ # @return [::Gapic::Config::Method]
7343
+ #
7344
+ attr_reader :query_folder_contents
7345
+ ##
7346
+ # RPC-specific configuration for `query_user_root_contents`
7347
+ # @return [::Gapic::Config::Method]
7348
+ #
7349
+ attr_reader :query_user_root_contents
7350
+ ##
7351
+ # RPC-specific configuration for `move_folder`
7352
+ # @return [::Gapic::Config::Method]
7353
+ #
7354
+ attr_reader :move_folder
5392
7355
  ##
5393
7356
  # RPC-specific configuration for `list_repositories`
5394
7357
  # @return [::Gapic::Config::Method]
@@ -5415,6 +7378,11 @@ module Google
5415
7378
  #
5416
7379
  attr_reader :delete_repository
5417
7380
  ##
7381
+ # RPC-specific configuration for `move_repository`
7382
+ # @return [::Gapic::Config::Method]
7383
+ #
7384
+ attr_reader :move_repository
7385
+ ##
5418
7386
  # RPC-specific configuration for `commit_repository_changes`
5419
7387
  # @return [::Gapic::Config::Method]
5420
7388
  #
@@ -5659,9 +7627,54 @@ module Google
5659
7627
  # @return [::Gapic::Config::Method]
5660
7628
  #
5661
7629
  attr_reader :update_config
7630
+ ##
7631
+ # RPC-specific configuration for `get_iam_policy`
7632
+ # @return [::Gapic::Config::Method]
7633
+ #
7634
+ attr_reader :get_iam_policy
7635
+ ##
7636
+ # RPC-specific configuration for `set_iam_policy`
7637
+ # @return [::Gapic::Config::Method]
7638
+ #
7639
+ attr_reader :set_iam_policy
7640
+ ##
7641
+ # RPC-specific configuration for `test_iam_permissions`
7642
+ # @return [::Gapic::Config::Method]
7643
+ #
7644
+ attr_reader :test_iam_permissions
5662
7645
 
5663
7646
  # @private
5664
7647
  def initialize parent_rpcs = nil
7648
+ get_team_folder_config = parent_rpcs.get_team_folder if parent_rpcs.respond_to? :get_team_folder
7649
+ @get_team_folder = ::Gapic::Config::Method.new get_team_folder_config
7650
+ create_team_folder_config = parent_rpcs.create_team_folder if parent_rpcs.respond_to? :create_team_folder
7651
+ @create_team_folder = ::Gapic::Config::Method.new create_team_folder_config
7652
+ update_team_folder_config = parent_rpcs.update_team_folder if parent_rpcs.respond_to? :update_team_folder
7653
+ @update_team_folder = ::Gapic::Config::Method.new update_team_folder_config
7654
+ delete_team_folder_config = parent_rpcs.delete_team_folder if parent_rpcs.respond_to? :delete_team_folder
7655
+ @delete_team_folder = ::Gapic::Config::Method.new delete_team_folder_config
7656
+ delete_team_folder_tree_config = parent_rpcs.delete_team_folder_tree if parent_rpcs.respond_to? :delete_team_folder_tree
7657
+ @delete_team_folder_tree = ::Gapic::Config::Method.new delete_team_folder_tree_config
7658
+ query_team_folder_contents_config = parent_rpcs.query_team_folder_contents if parent_rpcs.respond_to? :query_team_folder_contents
7659
+ @query_team_folder_contents = ::Gapic::Config::Method.new query_team_folder_contents_config
7660
+ search_team_folders_config = parent_rpcs.search_team_folders if parent_rpcs.respond_to? :search_team_folders
7661
+ @search_team_folders = ::Gapic::Config::Method.new search_team_folders_config
7662
+ get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder
7663
+ @get_folder = ::Gapic::Config::Method.new get_folder_config
7664
+ create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder
7665
+ @create_folder = ::Gapic::Config::Method.new create_folder_config
7666
+ update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder
7667
+ @update_folder = ::Gapic::Config::Method.new update_folder_config
7668
+ delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder
7669
+ @delete_folder = ::Gapic::Config::Method.new delete_folder_config
7670
+ delete_folder_tree_config = parent_rpcs.delete_folder_tree if parent_rpcs.respond_to? :delete_folder_tree
7671
+ @delete_folder_tree = ::Gapic::Config::Method.new delete_folder_tree_config
7672
+ query_folder_contents_config = parent_rpcs.query_folder_contents if parent_rpcs.respond_to? :query_folder_contents
7673
+ @query_folder_contents = ::Gapic::Config::Method.new query_folder_contents_config
7674
+ query_user_root_contents_config = parent_rpcs.query_user_root_contents if parent_rpcs.respond_to? :query_user_root_contents
7675
+ @query_user_root_contents = ::Gapic::Config::Method.new query_user_root_contents_config
7676
+ move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder
7677
+ @move_folder = ::Gapic::Config::Method.new move_folder_config
5665
7678
  list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
5666
7679
  @list_repositories = ::Gapic::Config::Method.new list_repositories_config
5667
7680
  get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
@@ -5672,6 +7685,8 @@ module Google
5672
7685
  @update_repository = ::Gapic::Config::Method.new update_repository_config
5673
7686
  delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository
5674
7687
  @delete_repository = ::Gapic::Config::Method.new delete_repository_config
7688
+ move_repository_config = parent_rpcs.move_repository if parent_rpcs.respond_to? :move_repository
7689
+ @move_repository = ::Gapic::Config::Method.new move_repository_config
5675
7690
  commit_repository_changes_config = parent_rpcs.commit_repository_changes if parent_rpcs.respond_to? :commit_repository_changes
5676
7691
  @commit_repository_changes = ::Gapic::Config::Method.new commit_repository_changes_config
5677
7692
  read_repository_file_config = parent_rpcs.read_repository_file if parent_rpcs.respond_to? :read_repository_file
@@ -5770,6 +7785,12 @@ module Google
5770
7785
  @get_config = ::Gapic::Config::Method.new get_config_config
5771
7786
  update_config_config = parent_rpcs.update_config if parent_rpcs.respond_to? :update_config
5772
7787
  @update_config = ::Gapic::Config::Method.new update_config_config
7788
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
7789
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
7790
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
7791
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
7792
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
7793
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
5773
7794
 
5774
7795
  yield self if block_given?
5775
7796
  end