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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9775385215deb483c8be4fb3e48a732bcf23e42fac681a657441fedb5c2c6587
4
- data.tar.gz: 288920760ec16395f52dc3a22c8c4c853daab9c1ed37bcf611811afac1b2a804
3
+ metadata.gz: 89df0e2a0ac1dd2d7ac88db153a9944695825e95a77e6236c2c31104dfae639a
4
+ data.tar.gz: 49d4306b2f39e73df7516c9e406d3a174b57c72c4db1c33e71d4160c0bb0d804
5
5
  SHA512:
6
- metadata.gz: e739d97d6cc64954d55609af6ebf60add1a743e908e4a3665d47b84ba180d064176596e3c9bbe6fee8b7d651138edcb05fc5c7684d4430c36a3922325c4846ea
7
- data.tar.gz: 31e43e639bcf12d0cb4ce77c0715cc820ccf018fa6aa5a3a308223b03d4cf2866add501da48ee65daf57f96d4bd84af1decdd7efc1c4544cd0c0e011f46e2aa8
6
+ metadata.gz: 4c074e0cc9460c96da62a9b1061e336d842f31d1f180042638955262307a2d432398a9a00798481b00383269540856dff53fa0cb6d701373272a605121a6eefa
7
+ data.tar.gz: d39afd0382e2a898768a12973588f228729dd7dcd9dc60ce6a742b240c047e4d20604718e9196689995ab5de6d90b6df8012a2172acc0ccc804ebbd113c1b30a
@@ -204,6 +204,21 @@ module Google
204
204
  #
205
205
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
206
206
  #
207
+ # @example Basic example
208
+ # require "google/cloud/dataproc/v1"
209
+ #
210
+ # # Create a client object. The client can be reused for multiple calls.
211
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
212
+ #
213
+ # # Create a request. To set request fields, pass in keyword arguments.
214
+ # request = Google::Cloud::Dataproc::V1::CreateAutoscalingPolicyRequest.new
215
+ #
216
+ # # Call the create_autoscaling_policy method.
217
+ # result = client.create_autoscaling_policy request
218
+ #
219
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
220
+ # p result
221
+ #
207
222
  def create_autoscaling_policy request, options = nil
208
223
  raise ::ArgumentError, "request must be provided" if request.nil?
209
224
 
@@ -221,9 +236,11 @@ module Google
221
236
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
222
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
223
238
 
224
- header_params = {
225
- "parent" => request.parent
226
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
227
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
228
245
  metadata[:"x-goog-request-params"] ||= request_params_header
229
246
 
@@ -275,6 +292,21 @@ module Google
275
292
  #
276
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/dataproc/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Dataproc::V1::UpdateAutoscalingPolicyRequest.new
303
+ #
304
+ # # Call the update_autoscaling_policy method.
305
+ # result = client.update_autoscaling_policy request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
308
+ # p result
309
+ #
278
310
  def update_autoscaling_policy request, options = nil
279
311
  raise ::ArgumentError, "request must be provided" if request.nil?
280
312
 
@@ -292,9 +324,11 @@ module Google
292
324
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
293
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
326
 
295
- header_params = {
296
- "policy.name" => request.policy.name
297
- }
327
+ header_params = {}
328
+ if request.policy&.name
329
+ header_params["policy.name"] = request.policy.name
330
+ end
331
+
298
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
299
333
  metadata[:"x-goog-request-params"] ||= request_params_header
300
334
 
@@ -352,6 +386,21 @@ module Google
352
386
  #
353
387
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
354
388
  #
389
+ # @example Basic example
390
+ # require "google/cloud/dataproc/v1"
391
+ #
392
+ # # Create a client object. The client can be reused for multiple calls.
393
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
394
+ #
395
+ # # Create a request. To set request fields, pass in keyword arguments.
396
+ # request = Google::Cloud::Dataproc::V1::GetAutoscalingPolicyRequest.new
397
+ #
398
+ # # Call the get_autoscaling_policy method.
399
+ # result = client.get_autoscaling_policy request
400
+ #
401
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
402
+ # p result
403
+ #
355
404
  def get_autoscaling_policy request, options = nil
356
405
  raise ::ArgumentError, "request must be provided" if request.nil?
357
406
 
@@ -369,9 +418,11 @@ module Google
369
418
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
370
419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
420
 
372
- header_params = {
373
- "name" => request.name
374
- }
421
+ header_params = {}
422
+ if request.name
423
+ header_params["name"] = request.name
424
+ end
425
+
375
426
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
376
427
  metadata[:"x-goog-request-params"] ||= request_params_header
377
428
 
@@ -435,6 +486,27 @@ module Google
435
486
  #
436
487
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
488
  #
489
+ # @example Basic example
490
+ # require "google/cloud/dataproc/v1"
491
+ #
492
+ # # Create a client object. The client can be reused for multiple calls.
493
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
494
+ #
495
+ # # Create a request. To set request fields, pass in keyword arguments.
496
+ # request = Google::Cloud::Dataproc::V1::ListAutoscalingPoliciesRequest.new
497
+ #
498
+ # # Call the list_autoscaling_policies method.
499
+ # result = client.list_autoscaling_policies request
500
+ #
501
+ # # The returned object is of type Gapic::PagedEnumerable. You can
502
+ # # iterate over all elements by calling #each, and the enumerable
503
+ # # will lazily make API calls to fetch subsequent pages. Other
504
+ # # methods are also available for managing paging directly.
505
+ # result.each do |response|
506
+ # # Each element is of type ::Google::Cloud::Dataproc::V1::AutoscalingPolicy.
507
+ # p response
508
+ # end
509
+ #
438
510
  def list_autoscaling_policies request, options = nil
439
511
  raise ::ArgumentError, "request must be provided" if request.nil?
440
512
 
@@ -452,9 +524,11 @@ module Google
452
524
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
453
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
454
526
 
455
- header_params = {
456
- "parent" => request.parent
457
- }
527
+ header_params = {}
528
+ if request.parent
529
+ header_params["parent"] = request.parent
530
+ end
531
+
458
532
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
459
533
  metadata[:"x-goog-request-params"] ||= request_params_header
460
534
 
@@ -514,6 +588,21 @@ module Google
514
588
  #
515
589
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
516
590
  #
591
+ # @example Basic example
592
+ # require "google/cloud/dataproc/v1"
593
+ #
594
+ # # Create a client object. The client can be reused for multiple calls.
595
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
596
+ #
597
+ # # Create a request. To set request fields, pass in keyword arguments.
598
+ # request = Google::Cloud::Dataproc::V1::DeleteAutoscalingPolicyRequest.new
599
+ #
600
+ # # Call the delete_autoscaling_policy method.
601
+ # result = client.delete_autoscaling_policy request
602
+ #
603
+ # # The returned object is of type Google::Protobuf::Empty.
604
+ # p result
605
+ #
517
606
  def delete_autoscaling_policy request, options = nil
518
607
  raise ::ArgumentError, "request must be provided" if request.nil?
519
608
 
@@ -531,9 +620,11 @@ module Google
531
620
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
532
621
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
622
 
534
- header_params = {
535
- "name" => request.name
536
- }
623
+ header_params = {}
624
+ if request.name
625
+ header_params["name"] = request.name
626
+ end
627
+
537
628
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
538
629
  metadata[:"x-goog-request-params"] ||= request_params_header
539
630
 
@@ -205,6 +205,28 @@ module Google
205
205
  #
206
206
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
207
207
  #
208
+ # @example Basic example
209
+ # require "google/cloud/dataproc/v1"
210
+ #
211
+ # # Create a client object. The client can be reused for multiple calls.
212
+ # client = Google::Cloud::Dataproc::V1::BatchController::Client.new
213
+ #
214
+ # # Create a request. To set request fields, pass in keyword arguments.
215
+ # request = Google::Cloud::Dataproc::V1::CreateBatchRequest.new
216
+ #
217
+ # # Call the create_batch method.
218
+ # result = client.create_batch request
219
+ #
220
+ # # The returned object is of type Gapic::Operation. You can use this
221
+ # # object to check the status of an operation, cancel it, or wait
222
+ # # for results. Here is how to block until completion:
223
+ # result.wait_until_done! timeout: 60
224
+ # if result.response?
225
+ # p result.response
226
+ # else
227
+ # puts "Error!"
228
+ # end
229
+ #
208
230
  def create_batch request, options = nil
209
231
  raise ::ArgumentError, "request must be provided" if request.nil?
210
232
 
@@ -222,9 +244,11 @@ module Google
222
244
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
223
245
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
224
246
 
225
- header_params = {
226
- "parent" => request.parent
227
- }
247
+ header_params = {}
248
+ if request.parent
249
+ header_params["parent"] = request.parent
250
+ end
251
+
228
252
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
229
253
  metadata[:"x-goog-request-params"] ||= request_params_header
230
254
 
@@ -274,6 +298,21 @@ module Google
274
298
  #
275
299
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
276
300
  #
301
+ # @example Basic example
302
+ # require "google/cloud/dataproc/v1"
303
+ #
304
+ # # Create a client object. The client can be reused for multiple calls.
305
+ # client = Google::Cloud::Dataproc::V1::BatchController::Client.new
306
+ #
307
+ # # Create a request. To set request fields, pass in keyword arguments.
308
+ # request = Google::Cloud::Dataproc::V1::GetBatchRequest.new
309
+ #
310
+ # # Call the get_batch method.
311
+ # result = client.get_batch request
312
+ #
313
+ # # The returned object is of type Google::Cloud::Dataproc::V1::Batch.
314
+ # p result
315
+ #
277
316
  def get_batch request, options = nil
278
317
  raise ::ArgumentError, "request must be provided" if request.nil?
279
318
 
@@ -291,9 +330,11 @@ module Google
291
330
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
292
331
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
293
332
 
294
- header_params = {
295
- "name" => request.name
296
- }
333
+ header_params = {}
334
+ if request.name
335
+ header_params["name"] = request.name
336
+ end
337
+
297
338
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
298
339
  metadata[:"x-goog-request-params"] ||= request_params_header
299
340
 
@@ -349,6 +390,27 @@ module Google
349
390
  #
350
391
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
351
392
  #
393
+ # @example Basic example
394
+ # require "google/cloud/dataproc/v1"
395
+ #
396
+ # # Create a client object. The client can be reused for multiple calls.
397
+ # client = Google::Cloud::Dataproc::V1::BatchController::Client.new
398
+ #
399
+ # # Create a request. To set request fields, pass in keyword arguments.
400
+ # request = Google::Cloud::Dataproc::V1::ListBatchesRequest.new
401
+ #
402
+ # # Call the list_batches method.
403
+ # result = client.list_batches request
404
+ #
405
+ # # The returned object is of type Gapic::PagedEnumerable. You can
406
+ # # iterate over all elements by calling #each, and the enumerable
407
+ # # will lazily make API calls to fetch subsequent pages. Other
408
+ # # methods are also available for managing paging directly.
409
+ # result.each do |response|
410
+ # # Each element is of type ::Google::Cloud::Dataproc::V1::Batch.
411
+ # p response
412
+ # end
413
+ #
352
414
  def list_batches request, options = nil
353
415
  raise ::ArgumentError, "request must be provided" if request.nil?
354
416
 
@@ -366,9 +428,11 @@ module Google
366
428
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
367
429
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
368
430
 
369
- header_params = {
370
- "parent" => request.parent
371
- }
431
+ header_params = {}
432
+ if request.parent
433
+ header_params["parent"] = request.parent
434
+ end
435
+
372
436
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
373
437
  metadata[:"x-goog-request-params"] ||= request_params_header
374
438
 
@@ -419,6 +483,21 @@ module Google
419
483
  #
420
484
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
421
485
  #
486
+ # @example Basic example
487
+ # require "google/cloud/dataproc/v1"
488
+ #
489
+ # # Create a client object. The client can be reused for multiple calls.
490
+ # client = Google::Cloud::Dataproc::V1::BatchController::Client.new
491
+ #
492
+ # # Create a request. To set request fields, pass in keyword arguments.
493
+ # request = Google::Cloud::Dataproc::V1::DeleteBatchRequest.new
494
+ #
495
+ # # Call the delete_batch method.
496
+ # result = client.delete_batch request
497
+ #
498
+ # # The returned object is of type Google::Protobuf::Empty.
499
+ # p result
500
+ #
422
501
  def delete_batch request, options = nil
423
502
  raise ::ArgumentError, "request must be provided" if request.nil?
424
503
 
@@ -436,9 +515,11 @@ module Google
436
515
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
437
516
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
438
517
 
439
- header_params = {
440
- "name" => request.name
441
- }
518
+ header_params = {}
519
+ if request.name
520
+ header_params["name"] = request.name
521
+ end
522
+
442
523
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
443
524
  metadata[:"x-goog-request-params"] ||= request_params_header
444
525
 
@@ -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