google-cloud-tpu-v1 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dd28927088103b60cc1f2d85c96ca70021921b8058c454ea0f3e88d007089b8
4
- data.tar.gz: 2d657b3bbcf30b0cedc91f006e9c1fe515859ca94e2a63677166a094c0cbc5a7
3
+ metadata.gz: da173f982f4853f99fb9cd2072ccd00497693921d00356db13b77a2b9c642f09
4
+ data.tar.gz: ad2ae4ec9448125b983b5573de0e492720fd203ac97955fcb8fc678ee7fa248e
5
5
  SHA512:
6
- metadata.gz: f2313bcb05cf16483c339be0874a273ab260e98c6f5bed761a358aadef389b3874b9a5611492a45c9b562da719ba93e576f78af929694ea6747da5496db9a67b
7
- data.tar.gz: 2ae8d8519bc98ef5086433d9f03c5a743ab9e2e4851c1dca992b3850c6dfa53ab4550af3052ba8192ca181a8f72ac98280e297d1c99326a7b7302d185faed3a7
6
+ metadata.gz: 254b2b49d8926e51b6f108de6418bc6c7bcc18ad648889ae6eb9cac6556d5c16f183f4a54b5fec0a7aeaee41c01b9e45f46687e0e861cc7f2a572c40092cf2c1
7
+ data.tar.gz: c020cdb6a3f6a451366e6360fb98c2ee0114f62fd3b3f08dc71f0297e72eae82efc424419a361b02d51f586bdfe72f572d3320c2bd4ffe03b656c59b501819d6
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/tpu/v1/cloud_tpu.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/timestamp_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/tpu/v1/cloud_tpu.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.tpu.v1.SchedulingConfig" do
@@ -29,7 +29,7 @@ module Google
29
29
  # TPU API v1
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -193,6 +193,27 @@ module Google
193
193
  #
194
194
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
195
195
  #
196
+ # @example Basic example
197
+ # require "google/cloud/tpu/v1"
198
+ #
199
+ # # Create a client object. The client can be reused for multiple calls.
200
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
201
+ #
202
+ # # Create a request. To set request fields, pass in keyword arguments.
203
+ # request = Google::Cloud::Tpu::V1::ListNodesRequest.new
204
+ #
205
+ # # Call the list_nodes method.
206
+ # result = client.list_nodes request
207
+ #
208
+ # # The returned object is of type Gapic::PagedEnumerable. You can
209
+ # # iterate over all elements by calling #each, and the enumerable
210
+ # # will lazily make API calls to fetch subsequent pages. Other
211
+ # # methods are also available for managing paging directly.
212
+ # result.each do |response|
213
+ # # Each element is of type ::Google::Cloud::Tpu::V1::Node.
214
+ # p response
215
+ # end
216
+ #
196
217
  def list_nodes request, options = nil
197
218
  raise ::ArgumentError, "request must be provided" if request.nil?
198
219
 
@@ -210,9 +231,11 @@ module Google
210
231
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
211
232
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
212
233
 
213
- header_params = {
214
- "parent" => request.parent
215
- }
234
+ header_params = {}
235
+ if request.parent
236
+ header_params["parent"] = request.parent
237
+ end
238
+
216
239
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
217
240
  metadata[:"x-goog-request-params"] ||= request_params_header
218
241
 
@@ -262,6 +285,21 @@ module Google
262
285
  #
263
286
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
287
  #
288
+ # @example Basic example
289
+ # require "google/cloud/tpu/v1"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::Tpu::V1::GetNodeRequest.new
296
+ #
297
+ # # Call the get_node method.
298
+ # result = client.get_node request
299
+ #
300
+ # # The returned object is of type Google::Cloud::Tpu::V1::Node.
301
+ # p result
302
+ #
265
303
  def get_node request, options = nil
266
304
  raise ::ArgumentError, "request must be provided" if request.nil?
267
305
 
@@ -279,9 +317,11 @@ module Google
279
317
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
280
318
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
281
319
 
282
- header_params = {
283
- "name" => request.name
284
- }
320
+ header_params = {}
321
+ if request.name
322
+ header_params["name"] = request.name
323
+ end
324
+
285
325
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
286
326
  metadata[:"x-goog-request-params"] ||= request_params_header
287
327
 
@@ -334,6 +374,28 @@ module Google
334
374
  #
335
375
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
336
376
  #
377
+ # @example Basic example
378
+ # require "google/cloud/tpu/v1"
379
+ #
380
+ # # Create a client object. The client can be reused for multiple calls.
381
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
382
+ #
383
+ # # Create a request. To set request fields, pass in keyword arguments.
384
+ # request = Google::Cloud::Tpu::V1::CreateNodeRequest.new
385
+ #
386
+ # # Call the create_node method.
387
+ # result = client.create_node request
388
+ #
389
+ # # The returned object is of type Gapic::Operation. You can use this
390
+ # # object to check the status of an operation, cancel it, or wait
391
+ # # for results. Here is how to block until completion:
392
+ # result.wait_until_done! timeout: 60
393
+ # if result.response?
394
+ # p result.response
395
+ # else
396
+ # puts "Error!"
397
+ # end
398
+ #
337
399
  def create_node request, options = nil
338
400
  raise ::ArgumentError, "request must be provided" if request.nil?
339
401
 
@@ -351,9 +413,11 @@ module Google
351
413
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
352
414
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
353
415
 
354
- header_params = {
355
- "parent" => request.parent
356
- }
416
+ header_params = {}
417
+ if request.parent
418
+ header_params["parent"] = request.parent
419
+ end
420
+
357
421
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
358
422
  metadata[:"x-goog-request-params"] ||= request_params_header
359
423
 
@@ -403,6 +467,28 @@ module Google
403
467
  #
404
468
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
405
469
  #
470
+ # @example Basic example
471
+ # require "google/cloud/tpu/v1"
472
+ #
473
+ # # Create a client object. The client can be reused for multiple calls.
474
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
475
+ #
476
+ # # Create a request. To set request fields, pass in keyword arguments.
477
+ # request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new
478
+ #
479
+ # # Call the delete_node method.
480
+ # result = client.delete_node 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
+ #
406
492
  def delete_node request, options = nil
407
493
  raise ::ArgumentError, "request must be provided" if request.nil?
408
494
 
@@ -420,9 +506,11 @@ module Google
420
506
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
421
507
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
422
508
 
423
- header_params = {
424
- "name" => request.name
425
- }
509
+ header_params = {}
510
+ if request.name
511
+ header_params["name"] = request.name
512
+ end
513
+
426
514
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
427
515
  metadata[:"x-goog-request-params"] ||= request_params_header
428
516
 
@@ -474,6 +562,28 @@ module Google
474
562
  #
475
563
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
476
564
  #
565
+ # @example Basic example
566
+ # require "google/cloud/tpu/v1"
567
+ #
568
+ # # Create a client object. The client can be reused for multiple calls.
569
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
570
+ #
571
+ # # Create a request. To set request fields, pass in keyword arguments.
572
+ # request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new
573
+ #
574
+ # # Call the reimage_node method.
575
+ # result = client.reimage_node request
576
+ #
577
+ # # The returned object is of type Gapic::Operation. You can use this
578
+ # # object to check the status of an operation, cancel it, or wait
579
+ # # for results. Here is how to block until completion:
580
+ # result.wait_until_done! timeout: 60
581
+ # if result.response?
582
+ # p result.response
583
+ # else
584
+ # puts "Error!"
585
+ # end
586
+ #
477
587
  def reimage_node request, options = nil
478
588
  raise ::ArgumentError, "request must be provided" if request.nil?
479
589
 
@@ -491,9 +601,11 @@ module Google
491
601
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
492
602
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
603
 
494
- header_params = {
495
- "name" => request.name
496
- }
604
+ header_params = {}
605
+ if request.name
606
+ header_params["name"] = request.name
607
+ end
608
+
497
609
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
498
610
  metadata[:"x-goog-request-params"] ||= request_params_header
499
611
 
@@ -543,6 +655,28 @@ module Google
543
655
  #
544
656
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
545
657
  #
658
+ # @example Basic example
659
+ # require "google/cloud/tpu/v1"
660
+ #
661
+ # # Create a client object. The client can be reused for multiple calls.
662
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
663
+ #
664
+ # # Create a request. To set request fields, pass in keyword arguments.
665
+ # request = Google::Cloud::Tpu::V1::StopNodeRequest.new
666
+ #
667
+ # # Call the stop_node method.
668
+ # result = client.stop_node request
669
+ #
670
+ # # The returned object is of type Gapic::Operation. You can use this
671
+ # # object to check the status of an operation, cancel it, or wait
672
+ # # for results. Here is how to block until completion:
673
+ # result.wait_until_done! timeout: 60
674
+ # if result.response?
675
+ # p result.response
676
+ # else
677
+ # puts "Error!"
678
+ # end
679
+ #
546
680
  def stop_node request, options = nil
547
681
  raise ::ArgumentError, "request must be provided" if request.nil?
548
682
 
@@ -560,9 +694,11 @@ module Google
560
694
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
561
695
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
562
696
 
563
- header_params = {
564
- "name" => request.name
565
- }
697
+ header_params = {}
698
+ if request.name
699
+ header_params["name"] = request.name
700
+ end
701
+
566
702
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
567
703
  metadata[:"x-goog-request-params"] ||= request_params_header
568
704
 
@@ -612,6 +748,28 @@ module Google
612
748
  #
613
749
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
614
750
  #
751
+ # @example Basic example
752
+ # require "google/cloud/tpu/v1"
753
+ #
754
+ # # Create a client object. The client can be reused for multiple calls.
755
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
756
+ #
757
+ # # Create a request. To set request fields, pass in keyword arguments.
758
+ # request = Google::Cloud::Tpu::V1::StartNodeRequest.new
759
+ #
760
+ # # Call the start_node method.
761
+ # result = client.start_node request
762
+ #
763
+ # # The returned object is of type Gapic::Operation. You can use this
764
+ # # object to check the status of an operation, cancel it, or wait
765
+ # # for results. Here is how to block until completion:
766
+ # result.wait_until_done! timeout: 60
767
+ # if result.response?
768
+ # p result.response
769
+ # else
770
+ # puts "Error!"
771
+ # end
772
+ #
615
773
  def start_node request, options = nil
616
774
  raise ::ArgumentError, "request must be provided" if request.nil?
617
775
 
@@ -629,9 +787,11 @@ module Google
629
787
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
630
788
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
789
 
632
- header_params = {
633
- "name" => request.name
634
- }
790
+ header_params = {}
791
+ if request.name
792
+ header_params["name"] = request.name
793
+ end
794
+
635
795
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
636
796
  metadata[:"x-goog-request-params"] ||= request_params_header
637
797
 
@@ -689,6 +849,27 @@ module Google
689
849
  #
690
850
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
691
851
  #
852
+ # @example Basic example
853
+ # require "google/cloud/tpu/v1"
854
+ #
855
+ # # Create a client object. The client can be reused for multiple calls.
856
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
857
+ #
858
+ # # Create a request. To set request fields, pass in keyword arguments.
859
+ # request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new
860
+ #
861
+ # # Call the list_tensor_flow_versions method.
862
+ # result = client.list_tensor_flow_versions request
863
+ #
864
+ # # The returned object is of type Gapic::PagedEnumerable. You can
865
+ # # iterate over all elements by calling #each, and the enumerable
866
+ # # will lazily make API calls to fetch subsequent pages. Other
867
+ # # methods are also available for managing paging directly.
868
+ # result.each do |response|
869
+ # # Each element is of type ::Google::Cloud::Tpu::V1::TensorFlowVersion.
870
+ # p response
871
+ # end
872
+ #
692
873
  def list_tensor_flow_versions request, options = nil
693
874
  raise ::ArgumentError, "request must be provided" if request.nil?
694
875
 
@@ -706,9 +887,11 @@ module Google
706
887
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
707
888
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
708
889
 
709
- header_params = {
710
- "parent" => request.parent
711
- }
890
+ header_params = {}
891
+ if request.parent
892
+ header_params["parent"] = request.parent
893
+ end
894
+
712
895
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
713
896
  metadata[:"x-goog-request-params"] ||= request_params_header
714
897
 
@@ -758,6 +941,21 @@ module Google
758
941
  #
759
942
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
760
943
  #
944
+ # @example Basic example
945
+ # require "google/cloud/tpu/v1"
946
+ #
947
+ # # Create a client object. The client can be reused for multiple calls.
948
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
949
+ #
950
+ # # Create a request. To set request fields, pass in keyword arguments.
951
+ # request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new
952
+ #
953
+ # # Call the get_tensor_flow_version method.
954
+ # result = client.get_tensor_flow_version request
955
+ #
956
+ # # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion.
957
+ # p result
958
+ #
761
959
  def get_tensor_flow_version request, options = nil
762
960
  raise ::ArgumentError, "request must be provided" if request.nil?
763
961
 
@@ -775,9 +973,11 @@ module Google
775
973
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
776
974
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
777
975
 
778
- header_params = {
779
- "name" => request.name
780
- }
976
+ header_params = {}
977
+ if request.name
978
+ header_params["name"] = request.name
979
+ end
980
+
781
981
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
782
982
  metadata[:"x-goog-request-params"] ||= request_params_header
783
983
 
@@ -834,6 +1034,27 @@ module Google
834
1034
  #
835
1035
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
836
1036
  #
1037
+ # @example Basic example
1038
+ # require "google/cloud/tpu/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new
1045
+ #
1046
+ # # Call the list_accelerator_types method.
1047
+ # result = client.list_accelerator_types request
1048
+ #
1049
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1050
+ # # iterate over all elements by calling #each, and the enumerable
1051
+ # # will lazily make API calls to fetch subsequent pages. Other
1052
+ # # methods are also available for managing paging directly.
1053
+ # result.each do |response|
1054
+ # # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType.
1055
+ # p response
1056
+ # end
1057
+ #
837
1058
  def list_accelerator_types request, options = nil
838
1059
  raise ::ArgumentError, "request must be provided" if request.nil?
839
1060
 
@@ -851,9 +1072,11 @@ module Google
851
1072
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
852
1073
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
853
1074
 
854
- header_params = {
855
- "parent" => request.parent
856
- }
1075
+ header_params = {}
1076
+ if request.parent
1077
+ header_params["parent"] = request.parent
1078
+ end
1079
+
857
1080
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
858
1081
  metadata[:"x-goog-request-params"] ||= request_params_header
859
1082
 
@@ -903,6 +1126,21 @@ module Google
903
1126
  #
904
1127
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
905
1128
  #
1129
+ # @example Basic example
1130
+ # require "google/cloud/tpu/v1"
1131
+ #
1132
+ # # Create a client object. The client can be reused for multiple calls.
1133
+ # client = Google::Cloud::Tpu::V1::Tpu::Client.new
1134
+ #
1135
+ # # Create a request. To set request fields, pass in keyword arguments.
1136
+ # request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new
1137
+ #
1138
+ # # Call the get_accelerator_type method.
1139
+ # result = client.get_accelerator_type request
1140
+ #
1141
+ # # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType.
1142
+ # p result
1143
+ #
906
1144
  def get_accelerator_type request, options = nil
907
1145
  raise ::ArgumentError, "request must be provided" if request.nil?
908
1146
 
@@ -920,9 +1158,11 @@ module Google
920
1158
  gapic_version: ::Google::Cloud::Tpu::V1::VERSION
921
1159
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
922
1160
 
923
- header_params = {
924
- "name" => request.name
925
- }
1161
+ header_params = {}
1162
+ if request.name
1163
+ header_params["name"] = request.name
1164
+ end
1165
+
926
1166
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
927
1167
  metadata[:"x-goog-request-params"] ||= request_params_header
928
1168
 
@@ -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::Tpu::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::Tpu::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::Tpu::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::Tpu::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
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tpu
23
23
  module V1
24
- VERSION = "0.1.2"
24
+ VERSION = "0.1.3"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tpu-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-08-11 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