google-cloud-app_engine-v1 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/appengine/v1/app_yaml_pb.rb +2 -2
  3. data/lib/google/appengine/v1/appengine_pb.rb +2 -2
  4. data/lib/google/appengine/v1/appengine_services_pb.rb +8 -8
  5. data/lib/google/appengine/v1/application_pb.rb +2 -2
  6. data/lib/google/appengine/v1/audit_data_pb.rb +2 -2
  7. data/lib/google/appengine/v1/certificate_pb.rb +2 -2
  8. data/lib/google/appengine/v1/deploy_pb.rb +2 -2
  9. data/lib/google/appengine/v1/deployed_files_pb.rb +1 -1
  10. data/lib/google/appengine/v1/domain_mapping_pb.rb +1 -1
  11. data/lib/google/appengine/v1/domain_pb.rb +1 -1
  12. data/lib/google/appengine/v1/firewall_pb.rb +1 -1
  13. data/lib/google/appengine/v1/instance_pb.rb +2 -2
  14. data/lib/google/appengine/v1/location_pb.rb +2 -2
  15. data/lib/google/appengine/v1/network_settings_pb.rb +1 -1
  16. data/lib/google/appengine/v1/operation_pb.rb +2 -2
  17. data/lib/google/appengine/v1/service_pb.rb +2 -2
  18. data/lib/google/appengine/v1/version_pb.rb +2 -2
  19. data/lib/google/cloud/app_engine/v1/applications/client.rb +96 -9
  20. data/lib/google/cloud/app_engine/v1/applications/operations.rb +115 -12
  21. data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +106 -15
  22. data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +26 -3
  23. data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +127 -15
  24. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +115 -12
  25. data/lib/google/cloud/app_engine/v1/firewall/client.rb +126 -18
  26. data/lib/google/cloud/app_engine/v1/instances/client.rb +100 -12
  27. data/lib/google/cloud/app_engine/v1/instances/operations.rb +115 -12
  28. data/lib/google/cloud/app_engine/v1/services/client.rb +100 -12
  29. data/lib/google/cloud/app_engine/v1/services/operations.rb +115 -12
  30. data/lib/google/cloud/app_engine/v1/version.rb +1 -1
  31. data/lib/google/cloud/app_engine/v1/versions/client.rb +127 -15
  32. data/lib/google/cloud/app_engine/v1/versions/operations.rb +115 -12
  33. metadata +2 -2
@@ -189,6 +189,27 @@ module Google
189
189
  #
190
190
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
191
191
  #
192
+ # @example Basic example
193
+ # require "google/cloud/app_engine/v1"
194
+ #
195
+ # # Create a client object. The client can be reused for multiple calls.
196
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
197
+ #
198
+ # # Create a request. To set request fields, pass in keyword arguments.
199
+ # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new
200
+ #
201
+ # # Call the list_ingress_rules method.
202
+ # result = client.list_ingress_rules request
203
+ #
204
+ # # The returned object is of type Gapic::PagedEnumerable. You can
205
+ # # iterate over all elements by calling #each, and the enumerable
206
+ # # will lazily make API calls to fetch subsequent pages. Other
207
+ # # methods are also available for managing paging directly.
208
+ # result.each do |response|
209
+ # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule.
210
+ # p response
211
+ # end
212
+ #
192
213
  def list_ingress_rules request, options = nil
193
214
  raise ::ArgumentError, "request must be provided" if request.nil?
194
215
 
@@ -206,9 +227,11 @@ module Google
206
227
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
207
228
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
229
 
209
- header_params = {
210
- "parent" => request.parent
211
- }
230
+ header_params = {}
231
+ if request.parent
232
+ header_params["parent"] = request.parent
233
+ end
234
+
212
235
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
213
236
  metadata[:"x-goog-request-params"] ||= request_params_header
214
237
 
@@ -265,6 +288,21 @@ module Google
265
288
  #
266
289
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
267
290
  #
291
+ # @example Basic example
292
+ # require "google/cloud/app_engine/v1"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new
299
+ #
300
+ # # Call the batch_update_ingress_rules method.
301
+ # result = client.batch_update_ingress_rules request
302
+ #
303
+ # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.
304
+ # p result
305
+ #
268
306
  def batch_update_ingress_rules request, options = nil
269
307
  raise ::ArgumentError, "request must be provided" if request.nil?
270
308
 
@@ -282,9 +320,11 @@ module Google
282
320
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
283
321
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
284
322
 
285
- header_params = {
286
- "name" => request.name
287
- }
323
+ header_params = {}
324
+ if request.name
325
+ header_params["name"] = request.name
326
+ end
327
+
288
328
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
289
329
  metadata[:"x-goog-request-params"] ||= request_params_header
290
330
 
@@ -345,6 +385,21 @@ module Google
345
385
  #
346
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
347
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/app_engine/v1"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new
396
+ #
397
+ # # Call the create_ingress_rule method.
398
+ # result = client.create_ingress_rule request
399
+ #
400
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
401
+ # p result
402
+ #
348
403
  def create_ingress_rule request, options = nil
349
404
  raise ::ArgumentError, "request must be provided" if request.nil?
350
405
 
@@ -362,9 +417,11 @@ module Google
362
417
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
363
418
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
364
419
 
365
- header_params = {
366
- "parent" => request.parent
367
- }
420
+ header_params = {}
421
+ if request.parent
422
+ header_params["parent"] = request.parent
423
+ end
424
+
368
425
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
369
426
  metadata[:"x-goog-request-params"] ||= request_params_header
370
427
 
@@ -414,6 +471,21 @@ module Google
414
471
  #
415
472
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
416
473
  #
474
+ # @example Basic example
475
+ # require "google/cloud/app_engine/v1"
476
+ #
477
+ # # Create a client object. The client can be reused for multiple calls.
478
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
479
+ #
480
+ # # Create a request. To set request fields, pass in keyword arguments.
481
+ # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new
482
+ #
483
+ # # Call the get_ingress_rule method.
484
+ # result = client.get_ingress_rule request
485
+ #
486
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
487
+ # p result
488
+ #
417
489
  def get_ingress_rule request, options = nil
418
490
  raise ::ArgumentError, "request must be provided" if request.nil?
419
491
 
@@ -431,9 +503,11 @@ module Google
431
503
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
432
504
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
433
505
 
434
- header_params = {
435
- "name" => request.name
436
- }
506
+ header_params = {}
507
+ if request.name
508
+ header_params["name"] = request.name
509
+ end
510
+
437
511
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
438
512
  metadata[:"x-goog-request-params"] ||= request_params_header
439
513
 
@@ -487,6 +561,21 @@ module Google
487
561
  #
488
562
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
489
563
  #
564
+ # @example Basic example
565
+ # require "google/cloud/app_engine/v1"
566
+ #
567
+ # # Create a client object. The client can be reused for multiple calls.
568
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
569
+ #
570
+ # # Create a request. To set request fields, pass in keyword arguments.
571
+ # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new
572
+ #
573
+ # # Call the update_ingress_rule method.
574
+ # result = client.update_ingress_rule request
575
+ #
576
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
577
+ # p result
578
+ #
490
579
  def update_ingress_rule request, options = nil
491
580
  raise ::ArgumentError, "request must be provided" if request.nil?
492
581
 
@@ -504,9 +593,11 @@ module Google
504
593
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
505
594
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
595
 
507
- header_params = {
508
- "name" => request.name
509
- }
596
+ header_params = {}
597
+ if request.name
598
+ header_params["name"] = request.name
599
+ end
600
+
510
601
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
511
602
  metadata[:"x-goog-request-params"] ||= request_params_header
512
603
 
@@ -556,6 +647,21 @@ module Google
556
647
  #
557
648
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
649
  #
650
+ # @example Basic example
651
+ # require "google/cloud/app_engine/v1"
652
+ #
653
+ # # Create a client object. The client can be reused for multiple calls.
654
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
655
+ #
656
+ # # Create a request. To set request fields, pass in keyword arguments.
657
+ # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new
658
+ #
659
+ # # Call the delete_ingress_rule method.
660
+ # result = client.delete_ingress_rule request
661
+ #
662
+ # # The returned object is of type Google::Protobuf::Empty.
663
+ # p result
664
+ #
559
665
  def delete_ingress_rule request, options = nil
560
666
  raise ::ArgumentError, "request must be provided" if request.nil?
561
667
 
@@ -573,9 +679,11 @@ module Google
573
679
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
574
680
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
681
 
576
- header_params = {
577
- "name" => request.name
578
- }
682
+ header_params = {}
683
+ if request.name
684
+ header_params["name"] = request.name
685
+ end
686
+
579
687
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
688
  metadata[:"x-goog-request-params"] ||= request_params_header
581
689
 
@@ -191,6 +191,27 @@ module Google
191
191
  #
192
192
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
193
193
  #
194
+ # @example Basic example
195
+ # require "google/cloud/app_engine/v1"
196
+ #
197
+ # # Create a client object. The client can be reused for multiple calls.
198
+ # client = Google::Cloud::AppEngine::V1::Instances::Client.new
199
+ #
200
+ # # Create a request. To set request fields, pass in keyword arguments.
201
+ # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new
202
+ #
203
+ # # Call the list_instances method.
204
+ # result = client.list_instances request
205
+ #
206
+ # # The returned object is of type Gapic::PagedEnumerable. You can
207
+ # # iterate over all elements by calling #each, and the enumerable
208
+ # # will lazily make API calls to fetch subsequent pages. Other
209
+ # # methods are also available for managing paging directly.
210
+ # result.each do |response|
211
+ # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance.
212
+ # p response
213
+ # end
214
+ #
194
215
  def list_instances request, options = nil
195
216
  raise ::ArgumentError, "request must be provided" if request.nil?
196
217
 
@@ -208,9 +229,11 @@ module Google
208
229
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
209
230
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
210
231
 
211
- header_params = {
212
- "parent" => request.parent
213
- }
232
+ header_params = {}
233
+ if request.parent
234
+ header_params["parent"] = request.parent
235
+ end
236
+
214
237
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
215
238
  metadata[:"x-goog-request-params"] ||= request_params_header
216
239
 
@@ -261,6 +284,21 @@ module Google
261
284
  #
262
285
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
263
286
  #
287
+ # @example Basic example
288
+ # require "google/cloud/app_engine/v1"
289
+ #
290
+ # # Create a client object. The client can be reused for multiple calls.
291
+ # client = Google::Cloud::AppEngine::V1::Instances::Client.new
292
+ #
293
+ # # Create a request. To set request fields, pass in keyword arguments.
294
+ # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new
295
+ #
296
+ # # Call the get_instance method.
297
+ # result = client.get_instance request
298
+ #
299
+ # # The returned object is of type Google::Cloud::AppEngine::V1::Instance.
300
+ # p result
301
+ #
264
302
  def get_instance request, options = nil
265
303
  raise ::ArgumentError, "request must be provided" if request.nil?
266
304
 
@@ -278,9 +316,11 @@ module Google
278
316
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
279
317
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
280
318
 
281
- header_params = {
282
- "name" => request.name
283
- }
319
+ header_params = {}
320
+ if request.name
321
+ header_params["name"] = request.name
322
+ end
323
+
284
324
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
285
325
  metadata[:"x-goog-request-params"] ||= request_params_header
286
326
 
@@ -341,6 +381,28 @@ module Google
341
381
  #
342
382
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
343
383
  #
384
+ # @example Basic example
385
+ # require "google/cloud/app_engine/v1"
386
+ #
387
+ # # Create a client object. The client can be reused for multiple calls.
388
+ # client = Google::Cloud::AppEngine::V1::Instances::Client.new
389
+ #
390
+ # # Create a request. To set request fields, pass in keyword arguments.
391
+ # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new
392
+ #
393
+ # # Call the delete_instance method.
394
+ # result = client.delete_instance request
395
+ #
396
+ # # The returned object is of type Gapic::Operation. You can use this
397
+ # # object to check the status of an operation, cancel it, or wait
398
+ # # for results. Here is how to block until completion:
399
+ # result.wait_until_done! timeout: 60
400
+ # if result.response?
401
+ # p result.response
402
+ # else
403
+ # puts "Error!"
404
+ # end
405
+ #
344
406
  def delete_instance request, options = nil
345
407
  raise ::ArgumentError, "request must be provided" if request.nil?
346
408
 
@@ -358,9 +420,11 @@ module Google
358
420
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
359
421
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
422
 
361
- header_params = {
362
- "name" => request.name
363
- }
423
+ header_params = {}
424
+ if request.name
425
+ header_params["name"] = request.name
426
+ end
427
+
364
428
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
365
429
  metadata[:"x-goog-request-params"] ||= request_params_header
366
430
 
@@ -426,6 +490,28 @@ module Google
426
490
  #
427
491
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
492
  #
493
+ # @example Basic example
494
+ # require "google/cloud/app_engine/v1"
495
+ #
496
+ # # Create a client object. The client can be reused for multiple calls.
497
+ # client = Google::Cloud::AppEngine::V1::Instances::Client.new
498
+ #
499
+ # # Create a request. To set request fields, pass in keyword arguments.
500
+ # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new
501
+ #
502
+ # # Call the debug_instance method.
503
+ # result = client.debug_instance request
504
+ #
505
+ # # The returned object is of type Gapic::Operation. You can use this
506
+ # # object to check the status of an operation, cancel it, or wait
507
+ # # for results. Here is how to block until completion:
508
+ # result.wait_until_done! timeout: 60
509
+ # if result.response?
510
+ # p result.response
511
+ # else
512
+ # puts "Error!"
513
+ # end
514
+ #
429
515
  def debug_instance request, options = nil
430
516
  raise ::ArgumentError, "request must be provided" if request.nil?
431
517
 
@@ -443,9 +529,11 @@ module Google
443
529
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
444
530
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
445
531
 
446
- header_params = {
447
- "name" => request.name
448
- }
532
+ header_params = {}
533
+ if request.name
534
+ header_params["name"] = request.name
535
+ end
536
+
449
537
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
538
  metadata[:"x-goog-request-params"] ||= request_params_header
451
539
 
@@ -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::AppEngine::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::AppEngine::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::AppEngine::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::AppEngine::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