google-cloud-spanner-admin-instance-v1 0.5.3 → 0.5.4

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: 186095dfc96b29fe1ed26f955166224e62e06d3bef60a1eb2391cbcbaa4d51f5
4
- data.tar.gz: f2afb8074fa39356b3e39490df1d1be15f3f3d6ad92e03198c601107e7628742
3
+ metadata.gz: f1167a453ce24ee67bf626261535c720720d7ba62308809291224fdd3de9cd8a
4
+ data.tar.gz: 108b5b6aebfb818218234056d18d7efd0cb203877487c1a533cc7bec4dab2043
5
5
  SHA512:
6
- metadata.gz: f34611f63b581e4bb4937b9139266f8045da84c0e10755b5441ca549a236c0c2aa70b04935d81a1995dfc840343902715c2c00688bb7393eb579ffb4277f8f7e
7
- data.tar.gz: 5f16ae96db9107f9f852e960dee5fc40b862c83e2ccf29657da8983017a111973f8513ab3b5259df177e0b2e131c2cb90200d7faa1c2bd498ed3e76567e7476a
6
+ metadata.gz: 1bd897e4aa4bc53ec0eb48d4e0b7e65b0e98fca9cc60b8da0bb2d2fa2dde5d51c348209214a39c4c25b09463ecd1accd72c609269ade7109f1d80acc322671e2
7
+ data.tar.gz: 3d917872bcf9c4c421c3f8918b775ab96b46ea6473568b79cf0240b095bda51a8672329b75b395f8522c1576c683e7d0e724836a65fbb15ef53283aa4d9af172
@@ -254,6 +254,27 @@ module Google
254
254
  #
255
255
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
256
256
  #
257
+ # @example Basic example
258
+ # require "google/cloud/spanner/admin/instance/v1"
259
+ #
260
+ # # Create a client object. The client can be reused for multiple calls.
261
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
262
+ #
263
+ # # Create a request. To set request fields, pass in keyword arguments.
264
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new
265
+ #
266
+ # # Call the list_instance_configs method.
267
+ # result = client.list_instance_configs request
268
+ #
269
+ # # The returned object is of type Gapic::PagedEnumerable. You can
270
+ # # iterate over all elements by calling #each, and the enumerable
271
+ # # will lazily make API calls to fetch subsequent pages. Other
272
+ # # methods are also available for managing paging directly.
273
+ # result.each do |response|
274
+ # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.
275
+ # p response
276
+ # end
277
+ #
257
278
  def list_instance_configs request, options = nil
258
279
  raise ::ArgumentError, "request must be provided" if request.nil?
259
280
 
@@ -271,9 +292,11 @@ module Google
271
292
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
272
293
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
273
294
 
274
- header_params = {
275
- "parent" => request.parent
276
- }
295
+ header_params = {}
296
+ if request.parent
297
+ header_params["parent"] = request.parent
298
+ end
299
+
277
300
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
278
301
  metadata[:"x-goog-request-params"] ||= request_params_header
279
302
 
@@ -324,6 +347,21 @@ module Google
324
347
  #
325
348
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
326
349
  #
350
+ # @example Basic example
351
+ # require "google/cloud/spanner/admin/instance/v1"
352
+ #
353
+ # # Create a client object. The client can be reused for multiple calls.
354
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
355
+ #
356
+ # # Create a request. To set request fields, pass in keyword arguments.
357
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new
358
+ #
359
+ # # Call the get_instance_config method.
360
+ # result = client.get_instance_config request
361
+ #
362
+ # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.
363
+ # p result
364
+ #
327
365
  def get_instance_config request, options = nil
328
366
  raise ::ArgumentError, "request must be provided" if request.nil?
329
367
 
@@ -341,9 +379,11 @@ module Google
341
379
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
342
380
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
381
 
344
- header_params = {
345
- "name" => request.name
346
- }
382
+ header_params = {}
383
+ if request.name
384
+ header_params["name"] = request.name
385
+ end
386
+
347
387
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
348
388
  metadata[:"x-goog-request-params"] ||= request_params_header
349
389
 
@@ -420,6 +460,27 @@ module Google
420
460
  #
421
461
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
422
462
  #
463
+ # @example Basic example
464
+ # require "google/cloud/spanner/admin/instance/v1"
465
+ #
466
+ # # Create a client object. The client can be reused for multiple calls.
467
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
468
+ #
469
+ # # Create a request. To set request fields, pass in keyword arguments.
470
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new
471
+ #
472
+ # # Call the list_instances method.
473
+ # result = client.list_instances request
474
+ #
475
+ # # The returned object is of type Gapic::PagedEnumerable. You can
476
+ # # iterate over all elements by calling #each, and the enumerable
477
+ # # will lazily make API calls to fetch subsequent pages. Other
478
+ # # methods are also available for managing paging directly.
479
+ # result.each do |response|
480
+ # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.
481
+ # p response
482
+ # end
483
+ #
423
484
  def list_instances request, options = nil
424
485
  raise ::ArgumentError, "request must be provided" if request.nil?
425
486
 
@@ -437,9 +498,11 @@ module Google
437
498
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
438
499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
439
500
 
440
- header_params = {
441
- "parent" => request.parent
442
- }
501
+ header_params = {}
502
+ if request.parent
503
+ header_params["parent"] = request.parent
504
+ end
505
+
443
506
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
444
507
  metadata[:"x-goog-request-params"] ||= request_params_header
445
508
 
@@ -494,6 +557,21 @@ module Google
494
557
  #
495
558
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
496
559
  #
560
+ # @example Basic example
561
+ # require "google/cloud/spanner/admin/instance/v1"
562
+ #
563
+ # # Create a client object. The client can be reused for multiple calls.
564
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
565
+ #
566
+ # # Create a request. To set request fields, pass in keyword arguments.
567
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new
568
+ #
569
+ # # Call the get_instance method.
570
+ # result = client.get_instance request
571
+ #
572
+ # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance.
573
+ # p result
574
+ #
497
575
  def get_instance request, options = nil
498
576
  raise ::ArgumentError, "request must be provided" if request.nil?
499
577
 
@@ -511,9 +589,11 @@ module Google
511
589
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
512
590
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
513
591
 
514
- header_params = {
515
- "name" => request.name
516
- }
592
+ header_params = {}
593
+ if request.name
594
+ header_params["name"] = request.name
595
+ end
596
+
517
597
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
518
598
  metadata[:"x-goog-request-params"] ||= request_params_header
519
599
 
@@ -603,6 +683,28 @@ module Google
603
683
  #
604
684
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
605
685
  #
686
+ # @example Basic example
687
+ # require "google/cloud/spanner/admin/instance/v1"
688
+ #
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new
694
+ #
695
+ # # Call the create_instance method.
696
+ # result = client.create_instance request
697
+ #
698
+ # # The returned object is of type Gapic::Operation. You can use this
699
+ # # object to check the status of an operation, cancel it, or wait
700
+ # # for results. Here is how to block until completion:
701
+ # result.wait_until_done! timeout: 60
702
+ # if result.response?
703
+ # p result.response
704
+ # else
705
+ # puts "Error!"
706
+ # end
707
+ #
606
708
  def create_instance request, options = nil
607
709
  raise ::ArgumentError, "request must be provided" if request.nil?
608
710
 
@@ -620,9 +722,11 @@ module Google
620
722
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
621
723
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
622
724
 
623
- header_params = {
624
- "parent" => request.parent
625
- }
725
+ header_params = {}
726
+ if request.parent
727
+ header_params["parent"] = request.parent
728
+ end
729
+
626
730
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
627
731
  metadata[:"x-goog-request-params"] ||= request_params_header
628
732
 
@@ -717,6 +821,28 @@ module Google
717
821
  #
718
822
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
719
823
  #
824
+ # @example Basic example
825
+ # require "google/cloud/spanner/admin/instance/v1"
826
+ #
827
+ # # Create a client object. The client can be reused for multiple calls.
828
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
829
+ #
830
+ # # Create a request. To set request fields, pass in keyword arguments.
831
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new
832
+ #
833
+ # # Call the update_instance method.
834
+ # result = client.update_instance request
835
+ #
836
+ # # The returned object is of type Gapic::Operation. You can use this
837
+ # # object to check the status of an operation, cancel it, or wait
838
+ # # for results. Here is how to block until completion:
839
+ # result.wait_until_done! timeout: 60
840
+ # if result.response?
841
+ # p result.response
842
+ # else
843
+ # puts "Error!"
844
+ # end
845
+ #
720
846
  def update_instance request, options = nil
721
847
  raise ::ArgumentError, "request must be provided" if request.nil?
722
848
 
@@ -734,9 +860,11 @@ module Google
734
860
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
735
861
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
736
862
 
737
- header_params = {
738
- "instance.name" => request.instance.name
739
- }
863
+ header_params = {}
864
+ if request.instance&.name
865
+ header_params["instance.name"] = request.instance.name
866
+ end
867
+
740
868
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
741
869
  metadata[:"x-goog-request-params"] ||= request_params_header
742
870
 
@@ -797,6 +925,21 @@ module Google
797
925
  #
798
926
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
799
927
  #
928
+ # @example Basic example
929
+ # require "google/cloud/spanner/admin/instance/v1"
930
+ #
931
+ # # Create a client object. The client can be reused for multiple calls.
932
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
933
+ #
934
+ # # Create a request. To set request fields, pass in keyword arguments.
935
+ # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new
936
+ #
937
+ # # Call the delete_instance method.
938
+ # result = client.delete_instance request
939
+ #
940
+ # # The returned object is of type Google::Protobuf::Empty.
941
+ # p result
942
+ #
800
943
  def delete_instance request, options = nil
801
944
  raise ::ArgumentError, "request must be provided" if request.nil?
802
945
 
@@ -814,9 +957,11 @@ module Google
814
957
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
815
958
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
959
 
817
- header_params = {
818
- "name" => request.name
819
- }
960
+ header_params = {}
961
+ if request.name
962
+ header_params["name"] = request.name
963
+ end
964
+
820
965
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
821
966
  metadata[:"x-goog-request-params"] ||= request_params_header
822
967
 
@@ -875,6 +1020,21 @@ module Google
875
1020
  #
876
1021
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
877
1022
  #
1023
+ # @example Basic example
1024
+ # require "google/cloud/spanner/admin/instance/v1"
1025
+ #
1026
+ # # Create a client object. The client can be reused for multiple calls.
1027
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
1028
+ #
1029
+ # # Create a request. To set request fields, pass in keyword arguments.
1030
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1031
+ #
1032
+ # # Call the set_iam_policy method.
1033
+ # result = client.set_iam_policy request
1034
+ #
1035
+ # # The returned object is of type Google::Iam::V1::Policy.
1036
+ # p result
1037
+ #
878
1038
  def set_iam_policy request, options = nil
879
1039
  raise ::ArgumentError, "request must be provided" if request.nil?
880
1040
 
@@ -892,9 +1052,11 @@ module Google
892
1052
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
893
1053
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
894
1054
 
895
- header_params = {
896
- "resource" => request.resource
897
- }
1055
+ header_params = {}
1056
+ if request.resource
1057
+ header_params["resource"] = request.resource
1058
+ end
1059
+
898
1060
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
899
1061
  metadata[:"x-goog-request-params"] ||= request_params_header
900
1062
 
@@ -951,6 +1113,21 @@ module Google
951
1113
  #
952
1114
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
953
1115
  #
1116
+ # @example Basic example
1117
+ # require "google/cloud/spanner/admin/instance/v1"
1118
+ #
1119
+ # # Create a client object. The client can be reused for multiple calls.
1120
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
1121
+ #
1122
+ # # Create a request. To set request fields, pass in keyword arguments.
1123
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1124
+ #
1125
+ # # Call the get_iam_policy method.
1126
+ # result = client.get_iam_policy request
1127
+ #
1128
+ # # The returned object is of type Google::Iam::V1::Policy.
1129
+ # p result
1130
+ #
954
1131
  def get_iam_policy request, options = nil
955
1132
  raise ::ArgumentError, "request must be provided" if request.nil?
956
1133
 
@@ -968,9 +1145,11 @@ module Google
968
1145
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
969
1146
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
1147
 
971
- header_params = {
972
- "resource" => request.resource
973
- }
1148
+ header_params = {}
1149
+ if request.resource
1150
+ header_params["resource"] = request.resource
1151
+ end
1152
+
974
1153
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
975
1154
  metadata[:"x-goog-request-params"] ||= request_params_header
976
1155
 
@@ -1030,6 +1209,21 @@ module Google
1030
1209
  #
1031
1210
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1032
1211
  #
1212
+ # @example Basic example
1213
+ # require "google/cloud/spanner/admin/instance/v1"
1214
+ #
1215
+ # # Create a client object. The client can be reused for multiple calls.
1216
+ # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
1217
+ #
1218
+ # # Create a request. To set request fields, pass in keyword arguments.
1219
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
1220
+ #
1221
+ # # Call the test_iam_permissions method.
1222
+ # result = client.test_iam_permissions request
1223
+ #
1224
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
1225
+ # p result
1226
+ #
1033
1227
  def test_iam_permissions request, options = nil
1034
1228
  raise ::ArgumentError, "request must be provided" if request.nil?
1035
1229
 
@@ -1047,9 +1241,11 @@ module Google
1047
1241
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
1048
1242
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1049
1243
 
1050
- header_params = {
1051
- "resource" => request.resource
1052
- }
1244
+ header_params = {}
1245
+ if request.resource
1246
+ header_params["resource"] = request.resource
1247
+ end
1248
+
1053
1249
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1054
1250
  metadata[:"x-goog-request-params"] ||= request_params_header
1055
1251
 
@@ -145,6 +145,27 @@ module Google
145
145
  #
146
146
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
147
147
  #
148
+ # @example Basic example
149
+ # require "google/longrunning"
150
+ #
151
+ # # Create a client object. The client can be reused for multiple calls.
152
+ # client = Google::Longrunning::Operations::Client.new
153
+ #
154
+ # # Create a request. To set request fields, pass in keyword arguments.
155
+ # request = Google::Longrunning::ListOperationsRequest.new
156
+ #
157
+ # # Call the list_operations method.
158
+ # result = client.list_operations request
159
+ #
160
+ # # The returned object is of type Gapic::PagedEnumerable. You can
161
+ # # iterate over all elements by calling #each, and the enumerable
162
+ # # will lazily make API calls to fetch subsequent pages. Other
163
+ # # methods are also available for managing paging directly.
164
+ # result.each do |response|
165
+ # # Each element is of type ::Google::Longrunning::Operation.
166
+ # p response
167
+ # end
168
+ #
148
169
  def list_operations request, options = nil
149
170
  raise ::ArgumentError, "request must be provided" if request.nil?
150
171
 
@@ -162,9 +183,11 @@ module Google
162
183
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
163
184
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
164
185
 
165
- header_params = {
166
- "name" => request.name
167
- }
186
+ header_params = {}
187
+ if request.name
188
+ header_params["name"] = request.name
189
+ end
190
+
168
191
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
169
192
  metadata[:"x-goog-request-params"] ||= request_params_header
170
193
 
@@ -217,6 +240,28 @@ module Google
217
240
  #
218
241
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
242
  #
243
+ # @example Basic example
244
+ # require "google/longrunning"
245
+ #
246
+ # # Create a client object. The client can be reused for multiple calls.
247
+ # client = Google::Longrunning::Operations::Client.new
248
+ #
249
+ # # Create a request. To set request fields, pass in keyword arguments.
250
+ # request = Google::Longrunning::GetOperationRequest.new
251
+ #
252
+ # # Call the get_operation method.
253
+ # result = client.get_operation request
254
+ #
255
+ # # The returned object is of type Gapic::Operation. You can use this
256
+ # # object to check the status of an operation, cancel it, or wait
257
+ # # for results. Here is how to block until completion:
258
+ # result.wait_until_done! timeout: 60
259
+ # if result.response?
260
+ # p result.response
261
+ # else
262
+ # puts "Error!"
263
+ # end
264
+ #
220
265
  def get_operation request, options = nil
221
266
  raise ::ArgumentError, "request must be provided" if request.nil?
222
267
 
@@ -234,9 +279,11 @@ module Google
234
279
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
235
280
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
236
281
 
237
- header_params = {
238
- "name" => request.name
239
- }
282
+ header_params = {}
283
+ if request.name
284
+ header_params["name"] = request.name
285
+ end
286
+
240
287
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
241
288
  metadata[:"x-goog-request-params"] ||= request_params_header
242
289
 
@@ -289,6 +336,21 @@ module Google
289
336
  #
290
337
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
291
338
  #
339
+ # @example Basic example
340
+ # require "google/longrunning"
341
+ #
342
+ # # Create a client object. The client can be reused for multiple calls.
343
+ # client = Google::Longrunning::Operations::Client.new
344
+ #
345
+ # # Create a request. To set request fields, pass in keyword arguments.
346
+ # request = Google::Longrunning::DeleteOperationRequest.new
347
+ #
348
+ # # Call the delete_operation method.
349
+ # result = client.delete_operation request
350
+ #
351
+ # # The returned object is of type Google::Protobuf::Empty.
352
+ # p result
353
+ #
292
354
  def delete_operation request, options = nil
293
355
  raise ::ArgumentError, "request must be provided" if request.nil?
294
356
 
@@ -306,9 +368,11 @@ module Google
306
368
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
307
369
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
308
370
 
309
- header_params = {
310
- "name" => request.name
311
- }
371
+ header_params = {}
372
+ if request.name
373
+ header_params["name"] = request.name
374
+ end
375
+
312
376
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
313
377
  metadata[:"x-goog-request-params"] ||= request_params_header
314
378
 
@@ -366,6 +430,21 @@ module Google
366
430
  #
367
431
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
368
432
  #
433
+ # @example Basic example
434
+ # require "google/longrunning"
435
+ #
436
+ # # Create a client object. The client can be reused for multiple calls.
437
+ # client = Google::Longrunning::Operations::Client.new
438
+ #
439
+ # # Create a request. To set request fields, pass in keyword arguments.
440
+ # request = Google::Longrunning::CancelOperationRequest.new
441
+ #
442
+ # # Call the cancel_operation method.
443
+ # result = client.cancel_operation request
444
+ #
445
+ # # The returned object is of type Google::Protobuf::Empty.
446
+ # p result
447
+ #
369
448
  def cancel_operation request, options = nil
370
449
  raise ::ArgumentError, "request must be provided" if request.nil?
371
450
 
@@ -383,9 +462,11 @@ module Google
383
462
  gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
384
463
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
385
464
 
386
- header_params = {
387
- "name" => request.name
388
- }
465
+ header_params = {}
466
+ if request.name
467
+ header_params["name"] = request.name
468
+ end
469
+
389
470
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
390
471
  metadata[:"x-goog-request-params"] ||= request_params_header
391
472
 
@@ -446,6 +527,28 @@ module Google
446
527
  #
447
528
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
448
529
  #
530
+ # @example Basic example
531
+ # require "google/longrunning"
532
+ #
533
+ # # Create a client object. The client can be reused for multiple calls.
534
+ # client = Google::Longrunning::Operations::Client.new
535
+ #
536
+ # # Create a request. To set request fields, pass in keyword arguments.
537
+ # request = Google::Longrunning::WaitOperationRequest.new
538
+ #
539
+ # # Call the wait_operation method.
540
+ # result = client.wait_operation request
541
+ #
542
+ # # The returned object is of type Gapic::Operation. You can use this
543
+ # # object to check the status of an operation, cancel it, or wait
544
+ # # for results. Here is how to block until completion:
545
+ # result.wait_until_done! timeout: 60
546
+ # if result.response?
547
+ # p result.response
548
+ # else
549
+ # puts "Error!"
550
+ # end
551
+ #
449
552
  def wait_operation request, options = nil
450
553
  raise ::ArgumentError, "request must be provided" if request.nil?
451
554
 
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Instance
25
25
  module V1
26
- VERSION = "0.5.3"
26
+ VERSION = "0.5.4"
27
27
  end
28
28
  end
29
29
  end
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/admin/instance/v1/spanner_instance_admin.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'
@@ -13,6 +11,8 @@ require 'google/longrunning/operations_pb'
13
11
  require 'google/protobuf/empty_pb'
14
12
  require 'google/protobuf/field_mask_pb'
15
13
  require 'google/protobuf/timestamp_pb'
14
+ require 'google/protobuf'
15
+
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/spanner/admin/instance/v1/spanner_instance_admin.proto", :syntax => :proto3) do
18
18
  add_message "google.spanner.admin.instance.v1.ReplicaInfo" do
@@ -49,7 +49,7 @@ module Google
49
49
  # databases in that instance, and their performance may suffer.
50
50
  class Service
51
51
 
52
- include GRPC::GenericService
52
+ include ::GRPC::GenericService
53
53
 
54
54
  self.marshal_class_method = :encode
55
55
  self.unmarshal_class_method = :decode
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-admin-instance-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
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-30 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