google-cloud-dataproc-v1 0.7.0 → 0.7.1

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.
@@ -232,6 +232,21 @@ module Google
232
232
  #
233
233
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
234
234
  #
235
+ # @example Basic example
236
+ # require "google/cloud/dataproc/v1"
237
+ #
238
+ # # Create a client object. The client can be reused for multiple calls.
239
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
240
+ #
241
+ # # Create a request. To set request fields, pass in keyword arguments.
242
+ # request = Google::Cloud::Dataproc::V1::CreateWorkflowTemplateRequest.new
243
+ #
244
+ # # Call the create_workflow_template method.
245
+ # result = client.create_workflow_template request
246
+ #
247
+ # # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
248
+ # p result
249
+ #
235
250
  def create_workflow_template request, options = nil
236
251
  raise ::ArgumentError, "request must be provided" if request.nil?
237
252
 
@@ -249,9 +264,11 @@ module Google
249
264
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
250
265
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
251
266
 
252
- header_params = {
253
- "parent" => request.parent
254
- }
267
+ header_params = {}
268
+ if request.parent
269
+ header_params["parent"] = request.parent
270
+ end
271
+
255
272
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
256
273
  metadata[:"x-goog-request-params"] ||= request_params_header
257
274
 
@@ -317,6 +334,21 @@ module Google
317
334
  #
318
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
319
336
  #
337
+ # @example Basic example
338
+ # require "google/cloud/dataproc/v1"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Cloud::Dataproc::V1::GetWorkflowTemplateRequest.new
345
+ #
346
+ # # Call the get_workflow_template method.
347
+ # result = client.get_workflow_template request
348
+ #
349
+ # # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
350
+ # p result
351
+ #
320
352
  def get_workflow_template request, options = nil
321
353
  raise ::ArgumentError, "request must be provided" if request.nil?
322
354
 
@@ -334,9 +366,11 @@ module Google
334
366
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
335
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
336
368
 
337
- header_params = {
338
- "name" => request.name
339
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
340
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
341
375
  metadata[:"x-goog-request-params"] ||= request_params_header
342
376
 
@@ -433,6 +467,28 @@ module Google
433
467
  #
434
468
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
435
469
  #
470
+ # @example Basic example
471
+ # require "google/cloud/dataproc/v1"
472
+ #
473
+ # # Create a client object. The client can be reused for multiple calls.
474
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
475
+ #
476
+ # # Create a request. To set request fields, pass in keyword arguments.
477
+ # request = Google::Cloud::Dataproc::V1::InstantiateWorkflowTemplateRequest.new
478
+ #
479
+ # # Call the instantiate_workflow_template method.
480
+ # result = client.instantiate_workflow_template request
481
+ #
482
+ # # The returned object is of type Gapic::Operation. You can use this
483
+ # # object to check the status of an operation, cancel it, or wait
484
+ # # for results. Here is how to block until completion:
485
+ # result.wait_until_done! timeout: 60
486
+ # if result.response?
487
+ # p result.response
488
+ # else
489
+ # puts "Error!"
490
+ # end
491
+ #
436
492
  def instantiate_workflow_template request, options = nil
437
493
  raise ::ArgumentError, "request must be provided" if request.nil?
438
494
 
@@ -450,9 +506,11 @@ module Google
450
506
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
451
507
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
508
 
453
- header_params = {
454
- "name" => request.name
455
- }
509
+ header_params = {}
510
+ if request.name
511
+ header_params["name"] = request.name
512
+ end
513
+
456
514
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
457
515
  metadata[:"x-goog-request-params"] ||= request_params_header
458
516
 
@@ -546,6 +604,28 @@ module Google
546
604
  #
547
605
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
548
606
  #
607
+ # @example Basic example
608
+ # require "google/cloud/dataproc/v1"
609
+ #
610
+ # # Create a client object. The client can be reused for multiple calls.
611
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
612
+ #
613
+ # # Create a request. To set request fields, pass in keyword arguments.
614
+ # request = Google::Cloud::Dataproc::V1::InstantiateInlineWorkflowTemplateRequest.new
615
+ #
616
+ # # Call the instantiate_inline_workflow_template method.
617
+ # result = client.instantiate_inline_workflow_template request
618
+ #
619
+ # # The returned object is of type Gapic::Operation. You can use this
620
+ # # object to check the status of an operation, cancel it, or wait
621
+ # # for results. Here is how to block until completion:
622
+ # result.wait_until_done! timeout: 60
623
+ # if result.response?
624
+ # p result.response
625
+ # else
626
+ # puts "Error!"
627
+ # end
628
+ #
549
629
  def instantiate_inline_workflow_template request, options = nil
550
630
  raise ::ArgumentError, "request must be provided" if request.nil?
551
631
 
@@ -563,9 +643,11 @@ module Google
563
643
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
564
644
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
565
645
 
566
- header_params = {
567
- "parent" => request.parent
568
- }
646
+ header_params = {}
647
+ if request.parent
648
+ header_params["parent"] = request.parent
649
+ end
650
+
569
651
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
570
652
  metadata[:"x-goog-request-params"] ||= request_params_header
571
653
 
@@ -618,6 +700,21 @@ module Google
618
700
  #
619
701
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
620
702
  #
703
+ # @example Basic example
704
+ # require "google/cloud/dataproc/v1"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Cloud::Dataproc::V1::UpdateWorkflowTemplateRequest.new
711
+ #
712
+ # # Call the update_workflow_template method.
713
+ # result = client.update_workflow_template request
714
+ #
715
+ # # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
716
+ # p result
717
+ #
621
718
  def update_workflow_template request, options = nil
622
719
  raise ::ArgumentError, "request must be provided" if request.nil?
623
720
 
@@ -635,9 +732,11 @@ module Google
635
732
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
636
733
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
637
734
 
638
- header_params = {
639
- "template.name" => request.template.name
640
- }
735
+ header_params = {}
736
+ if request.template&.name
737
+ header_params["template.name"] = request.template.name
738
+ end
739
+
641
740
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
642
741
  metadata[:"x-goog-request-params"] ||= request_params_header
643
742
 
@@ -700,6 +799,27 @@ module Google
700
799
  #
701
800
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
702
801
  #
802
+ # @example Basic example
803
+ # require "google/cloud/dataproc/v1"
804
+ #
805
+ # # Create a client object. The client can be reused for multiple calls.
806
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
807
+ #
808
+ # # Create a request. To set request fields, pass in keyword arguments.
809
+ # request = Google::Cloud::Dataproc::V1::ListWorkflowTemplatesRequest.new
810
+ #
811
+ # # Call the list_workflow_templates method.
812
+ # result = client.list_workflow_templates request
813
+ #
814
+ # # The returned object is of type Gapic::PagedEnumerable. You can
815
+ # # iterate over all elements by calling #each, and the enumerable
816
+ # # will lazily make API calls to fetch subsequent pages. Other
817
+ # # methods are also available for managing paging directly.
818
+ # result.each do |response|
819
+ # # Each element is of type ::Google::Cloud::Dataproc::V1::WorkflowTemplate.
820
+ # p response
821
+ # end
822
+ #
703
823
  def list_workflow_templates request, options = nil
704
824
  raise ::ArgumentError, "request must be provided" if request.nil?
705
825
 
@@ -717,9 +837,11 @@ module Google
717
837
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
718
838
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
839
 
720
- header_params = {
721
- "parent" => request.parent
722
- }
840
+ header_params = {}
841
+ if request.parent
842
+ header_params["parent"] = request.parent
843
+ end
844
+
723
845
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
724
846
  metadata[:"x-goog-request-params"] ||= request_params_header
725
847
 
@@ -782,6 +904,21 @@ module Google
782
904
  #
783
905
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
784
906
  #
907
+ # @example Basic example
908
+ # require "google/cloud/dataproc/v1"
909
+ #
910
+ # # Create a client object. The client can be reused for multiple calls.
911
+ # client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
912
+ #
913
+ # # Create a request. To set request fields, pass in keyword arguments.
914
+ # request = Google::Cloud::Dataproc::V1::DeleteWorkflowTemplateRequest.new
915
+ #
916
+ # # Call the delete_workflow_template method.
917
+ # result = client.delete_workflow_template request
918
+ #
919
+ # # The returned object is of type Google::Protobuf::Empty.
920
+ # p result
921
+ #
785
922
  def delete_workflow_template request, options = nil
786
923
  raise ::ArgumentError, "request must be provided" if request.nil?
787
924
 
@@ -799,9 +936,11 @@ module Google
799
936
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
800
937
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
801
938
 
802
- header_params = {
803
- "name" => request.name
804
- }
939
+ header_params = {}
940
+ if request.name
941
+ header_params["name"] = request.name
942
+ end
943
+
805
944
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
806
945
  metadata[:"x-goog-request-params"] ||= request_params_header
807
946
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataproc-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common