google-cloud-spanner-admin-instance-v1 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,8 @@ module Google
32
32
  # including transcoding, making the REST call, and deserialing the response.
33
33
  #
34
34
  class ServiceStub
35
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # @private
36
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
36
37
  # These require statements are intentionally placed here to initialize
37
38
  # the REST modules only when it's required.
38
39
  require "gapic/rest"
@@ -42,7 +43,9 @@ module Google
42
43
  universe_domain: universe_domain,
43
44
  credentials: credentials,
44
45
  numeric_enums: true,
45
- raise_faraday_errors: false
46
+ service_name: self.class,
47
+ raise_faraday_errors: false,
48
+ logger: logger
46
49
  end
47
50
 
48
51
  ##
@@ -63,6 +66,15 @@ module Google
63
66
  @client_stub.endpoint
64
67
  end
65
68
 
69
+ ##
70
+ # The logger used for request/response debug logging.
71
+ #
72
+ # @return [Logger]
73
+ #
74
+ def logger stub: false
75
+ stub ? @client_stub.stub_logger : @client_stub.logger
76
+ end
77
+
66
78
  ##
67
79
  # Baseline implementation for the list_instance_configs REST call
68
80
  #
@@ -89,16 +101,18 @@ module Google
89
101
 
90
102
  response = @client_stub.make_http_request(
91
103
  verb,
92
- uri: uri,
93
- body: body || "",
94
- params: query_string_params,
104
+ uri: uri,
105
+ body: body || "",
106
+ params: query_string_params,
107
+ method_name: "list_instance_configs",
95
108
  options: options
96
109
  )
97
110
  operation = ::Gapic::Rest::TransportOperation.new response
98
111
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.decode_json response.body, ignore_unknown_fields: true
99
-
100
- yield result, operation if block_given?
101
- result
112
+ catch :response do
113
+ yield result, operation if block_given?
114
+ result
115
+ end
102
116
  end
103
117
 
104
118
  ##
@@ -127,16 +141,18 @@ module Google
127
141
 
128
142
  response = @client_stub.make_http_request(
129
143
  verb,
130
- uri: uri,
131
- body: body || "",
132
- params: query_string_params,
144
+ uri: uri,
145
+ body: body || "",
146
+ params: query_string_params,
147
+ method_name: "get_instance_config",
133
148
  options: options
134
149
  )
135
150
  operation = ::Gapic::Rest::TransportOperation.new response
136
151
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.decode_json response.body, ignore_unknown_fields: true
137
-
138
- yield result, operation if block_given?
139
- result
152
+ catch :response do
153
+ yield result, operation if block_given?
154
+ result
155
+ end
140
156
  end
141
157
 
142
158
  ##
@@ -165,16 +181,18 @@ module Google
165
181
 
166
182
  response = @client_stub.make_http_request(
167
183
  verb,
168
- uri: uri,
169
- body: body || "",
170
- params: query_string_params,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ method_name: "create_instance_config",
171
188
  options: options
172
189
  )
173
190
  operation = ::Gapic::Rest::TransportOperation.new response
174
191
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
175
-
176
- yield result, operation if block_given?
177
- result
192
+ catch :response do
193
+ yield result, operation if block_given?
194
+ result
195
+ end
178
196
  end
179
197
 
180
198
  ##
@@ -203,16 +221,18 @@ module Google
203
221
 
204
222
  response = @client_stub.make_http_request(
205
223
  verb,
206
- uri: uri,
207
- body: body || "",
208
- params: query_string_params,
224
+ uri: uri,
225
+ body: body || "",
226
+ params: query_string_params,
227
+ method_name: "update_instance_config",
209
228
  options: options
210
229
  )
211
230
  operation = ::Gapic::Rest::TransportOperation.new response
212
231
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
213
-
214
- yield result, operation if block_given?
215
- result
232
+ catch :response do
233
+ yield result, operation if block_given?
234
+ result
235
+ end
216
236
  end
217
237
 
218
238
  ##
@@ -241,16 +261,18 @@ module Google
241
261
 
242
262
  response = @client_stub.make_http_request(
243
263
  verb,
244
- uri: uri,
245
- body: body || "",
246
- params: query_string_params,
264
+ uri: uri,
265
+ body: body || "",
266
+ params: query_string_params,
267
+ method_name: "delete_instance_config",
247
268
  options: options
248
269
  )
249
270
  operation = ::Gapic::Rest::TransportOperation.new response
250
271
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
251
-
252
- yield result, operation if block_given?
253
- result
272
+ catch :response do
273
+ yield result, operation if block_given?
274
+ result
275
+ end
254
276
  end
255
277
 
256
278
  ##
@@ -279,16 +301,18 @@ module Google
279
301
 
280
302
  response = @client_stub.make_http_request(
281
303
  verb,
282
- uri: uri,
283
- body: body || "",
284
- params: query_string_params,
304
+ uri: uri,
305
+ body: body || "",
306
+ params: query_string_params,
307
+ method_name: "list_instance_config_operations",
285
308
  options: options
286
309
  )
287
310
  operation = ::Gapic::Rest::TransportOperation.new response
288
311
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.decode_json response.body, ignore_unknown_fields: true
289
-
290
- yield result, operation if block_given?
291
- result
312
+ catch :response do
313
+ yield result, operation if block_given?
314
+ result
315
+ end
292
316
  end
293
317
 
294
318
  ##
@@ -317,16 +341,18 @@ module Google
317
341
 
318
342
  response = @client_stub.make_http_request(
319
343
  verb,
320
- uri: uri,
321
- body: body || "",
322
- params: query_string_params,
344
+ uri: uri,
345
+ body: body || "",
346
+ params: query_string_params,
347
+ method_name: "list_instances",
323
348
  options: options
324
349
  )
325
350
  operation = ::Gapic::Rest::TransportOperation.new response
326
351
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
327
-
328
- yield result, operation if block_given?
329
- result
352
+ catch :response do
353
+ yield result, operation if block_given?
354
+ result
355
+ end
330
356
  end
331
357
 
332
358
  ##
@@ -355,16 +381,18 @@ module Google
355
381
 
356
382
  response = @client_stub.make_http_request(
357
383
  verb,
358
- uri: uri,
359
- body: body || "",
360
- params: query_string_params,
384
+ uri: uri,
385
+ body: body || "",
386
+ params: query_string_params,
387
+ method_name: "list_instance_partitions",
361
388
  options: options
362
389
  )
363
390
  operation = ::Gapic::Rest::TransportOperation.new response
364
391
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.decode_json response.body, ignore_unknown_fields: true
365
-
366
- yield result, operation if block_given?
367
- result
392
+ catch :response do
393
+ yield result, operation if block_given?
394
+ result
395
+ end
368
396
  end
369
397
 
370
398
  ##
@@ -393,16 +421,18 @@ module Google
393
421
 
394
422
  response = @client_stub.make_http_request(
395
423
  verb,
396
- uri: uri,
397
- body: body || "",
398
- params: query_string_params,
424
+ uri: uri,
425
+ body: body || "",
426
+ params: query_string_params,
427
+ method_name: "get_instance",
399
428
  options: options
400
429
  )
401
430
  operation = ::Gapic::Rest::TransportOperation.new response
402
431
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.decode_json response.body, ignore_unknown_fields: true
403
-
404
- yield result, operation if block_given?
405
- result
432
+ catch :response do
433
+ yield result, operation if block_given?
434
+ result
435
+ end
406
436
  end
407
437
 
408
438
  ##
@@ -431,16 +461,18 @@ module Google
431
461
 
432
462
  response = @client_stub.make_http_request(
433
463
  verb,
434
- uri: uri,
435
- body: body || "",
436
- params: query_string_params,
464
+ uri: uri,
465
+ body: body || "",
466
+ params: query_string_params,
467
+ method_name: "create_instance",
437
468
  options: options
438
469
  )
439
470
  operation = ::Gapic::Rest::TransportOperation.new response
440
471
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
441
-
442
- yield result, operation if block_given?
443
- result
472
+ catch :response do
473
+ yield result, operation if block_given?
474
+ result
475
+ end
444
476
  end
445
477
 
446
478
  ##
@@ -469,16 +501,18 @@ module Google
469
501
 
470
502
  response = @client_stub.make_http_request(
471
503
  verb,
472
- uri: uri,
473
- body: body || "",
474
- params: query_string_params,
504
+ uri: uri,
505
+ body: body || "",
506
+ params: query_string_params,
507
+ method_name: "update_instance",
475
508
  options: options
476
509
  )
477
510
  operation = ::Gapic::Rest::TransportOperation.new response
478
511
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
479
-
480
- yield result, operation if block_given?
481
- result
512
+ catch :response do
513
+ yield result, operation if block_given?
514
+ result
515
+ end
482
516
  end
483
517
 
484
518
  ##
@@ -507,16 +541,18 @@ module Google
507
541
 
508
542
  response = @client_stub.make_http_request(
509
543
  verb,
510
- uri: uri,
511
- body: body || "",
512
- params: query_string_params,
544
+ uri: uri,
545
+ body: body || "",
546
+ params: query_string_params,
547
+ method_name: "delete_instance",
513
548
  options: options
514
549
  )
515
550
  operation = ::Gapic::Rest::TransportOperation.new response
516
551
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
517
-
518
- yield result, operation if block_given?
519
- result
552
+ catch :response do
553
+ yield result, operation if block_given?
554
+ result
555
+ end
520
556
  end
521
557
 
522
558
  ##
@@ -545,16 +581,18 @@ module Google
545
581
 
546
582
  response = @client_stub.make_http_request(
547
583
  verb,
548
- uri: uri,
549
- body: body || "",
550
- params: query_string_params,
584
+ uri: uri,
585
+ body: body || "",
586
+ params: query_string_params,
587
+ method_name: "set_iam_policy",
551
588
  options: options
552
589
  )
553
590
  operation = ::Gapic::Rest::TransportOperation.new response
554
591
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
555
-
556
- yield result, operation if block_given?
557
- result
592
+ catch :response do
593
+ yield result, operation if block_given?
594
+ result
595
+ end
558
596
  end
559
597
 
560
598
  ##
@@ -583,16 +621,18 @@ module Google
583
621
 
584
622
  response = @client_stub.make_http_request(
585
623
  verb,
586
- uri: uri,
587
- body: body || "",
588
- params: query_string_params,
624
+ uri: uri,
625
+ body: body || "",
626
+ params: query_string_params,
627
+ method_name: "get_iam_policy",
589
628
  options: options
590
629
  )
591
630
  operation = ::Gapic::Rest::TransportOperation.new response
592
631
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
593
-
594
- yield result, operation if block_given?
595
- result
632
+ catch :response do
633
+ yield result, operation if block_given?
634
+ result
635
+ end
596
636
  end
597
637
 
598
638
  ##
@@ -621,16 +661,18 @@ module Google
621
661
 
622
662
  response = @client_stub.make_http_request(
623
663
  verb,
624
- uri: uri,
625
- body: body || "",
626
- params: query_string_params,
664
+ uri: uri,
665
+ body: body || "",
666
+ params: query_string_params,
667
+ method_name: "test_iam_permissions",
627
668
  options: options
628
669
  )
629
670
  operation = ::Gapic::Rest::TransportOperation.new response
630
671
  result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
631
-
632
- yield result, operation if block_given?
633
- result
672
+ catch :response do
673
+ yield result, operation if block_given?
674
+ result
675
+ end
634
676
  end
635
677
 
636
678
  ##
@@ -659,16 +701,18 @@ module Google
659
701
 
660
702
  response = @client_stub.make_http_request(
661
703
  verb,
662
- uri: uri,
663
- body: body || "",
664
- params: query_string_params,
704
+ uri: uri,
705
+ body: body || "",
706
+ params: query_string_params,
707
+ method_name: "get_instance_partition",
665
708
  options: options
666
709
  )
667
710
  operation = ::Gapic::Rest::TransportOperation.new response
668
711
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.decode_json response.body, ignore_unknown_fields: true
669
-
670
- yield result, operation if block_given?
671
- result
712
+ catch :response do
713
+ yield result, operation if block_given?
714
+ result
715
+ end
672
716
  end
673
717
 
674
718
  ##
@@ -697,16 +741,18 @@ module Google
697
741
 
698
742
  response = @client_stub.make_http_request(
699
743
  verb,
700
- uri: uri,
701
- body: body || "",
702
- params: query_string_params,
744
+ uri: uri,
745
+ body: body || "",
746
+ params: query_string_params,
747
+ method_name: "create_instance_partition",
703
748
  options: options
704
749
  )
705
750
  operation = ::Gapic::Rest::TransportOperation.new response
706
751
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
707
-
708
- yield result, operation if block_given?
709
- result
752
+ catch :response do
753
+ yield result, operation if block_given?
754
+ result
755
+ end
710
756
  end
711
757
 
712
758
  ##
@@ -735,16 +781,18 @@ module Google
735
781
 
736
782
  response = @client_stub.make_http_request(
737
783
  verb,
738
- uri: uri,
739
- body: body || "",
740
- params: query_string_params,
784
+ uri: uri,
785
+ body: body || "",
786
+ params: query_string_params,
787
+ method_name: "delete_instance_partition",
741
788
  options: options
742
789
  )
743
790
  operation = ::Gapic::Rest::TransportOperation.new response
744
791
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
745
-
746
- yield result, operation if block_given?
747
- result
792
+ catch :response do
793
+ yield result, operation if block_given?
794
+ result
795
+ end
748
796
  end
749
797
 
750
798
  ##
@@ -773,16 +821,18 @@ module Google
773
821
 
774
822
  response = @client_stub.make_http_request(
775
823
  verb,
776
- uri: uri,
777
- body: body || "",
778
- params: query_string_params,
824
+ uri: uri,
825
+ body: body || "",
826
+ params: query_string_params,
827
+ method_name: "update_instance_partition",
779
828
  options: options
780
829
  )
781
830
  operation = ::Gapic::Rest::TransportOperation.new response
782
831
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
783
-
784
- yield result, operation if block_given?
785
- result
832
+ catch :response do
833
+ yield result, operation if block_given?
834
+ result
835
+ end
786
836
  end
787
837
 
788
838
  ##
@@ -811,16 +861,18 @@ module Google
811
861
 
812
862
  response = @client_stub.make_http_request(
813
863
  verb,
814
- uri: uri,
815
- body: body || "",
816
- params: query_string_params,
864
+ uri: uri,
865
+ body: body || "",
866
+ params: query_string_params,
867
+ method_name: "list_instance_partition_operations",
817
868
  options: options
818
869
  )
819
870
  operation = ::Gapic::Rest::TransportOperation.new response
820
871
  result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.decode_json response.body, ignore_unknown_fields: true
821
-
822
- yield result, operation if block_given?
823
- result
872
+ catch :response do
873
+ yield result, operation if block_given?
874
+ result
875
+ end
824
876
  end
825
877
 
826
878
  ##
@@ -849,16 +901,18 @@ module Google
849
901
 
850
902
  response = @client_stub.make_http_request(
851
903
  verb,
852
- uri: uri,
853
- body: body || "",
854
- params: query_string_params,
904
+ uri: uri,
905
+ body: body || "",
906
+ params: query_string_params,
907
+ method_name: "move_instance",
855
908
  options: options
856
909
  )
857
910
  operation = ::Gapic::Rest::TransportOperation.new response
858
911
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
859
-
860
- yield result, operation if block_given?
861
- result
912
+ catch :response do
913
+ yield result, operation if block_given?
914
+ result
915
+ end
862
916
  end
863
917
 
864
918
  ##
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Instance
25
25
  module V1
26
- VERSION = "1.3.0"
26
+ VERSION = "1.4.0"
27
27
  end
28
28
  end
29
29
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization