google-cloud-alloy_db-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +1114 -73
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/operations.rb +3 -1
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/paths.rb +21 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +839 -38
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/operations.rb +7 -5
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +557 -20
- data/lib/google/cloud/alloy_db/v1/version.rb +1 -1
- data/lib/google/cloud/alloydb/v1/resources_pb.rb +35 -252
- data/lib/google/cloud/alloydb/v1/service_pb.rb +39 -179
- data/lib/google/cloud/alloydb/v1/service_services_pb.rb +23 -0
- data/proto_docs/google/api/client.rb +58 -1
- data/proto_docs/google/cloud/alloydb/v1/resources.rb +142 -18
- data/proto_docs/google/cloud/alloydb/v1/service.rb +307 -1
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_clusters_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_cluster_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_cluster_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_cluster_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,45 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_cluster_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
|
+
else
|
216
|
+
{}
|
217
|
+
end
|
218
|
+
|
219
|
+
response = @client_stub.make_http_request(
|
220
|
+
verb,
|
221
|
+
uri: uri,
|
222
|
+
body: body || "",
|
223
|
+
params: query_string_params,
|
224
|
+
options: options
|
225
|
+
)
|
226
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
227
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
228
|
+
|
229
|
+
yield result, operation if block_given?
|
230
|
+
result
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# Baseline implementation for the promote_cluster REST call
|
235
|
+
#
|
236
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::PromoteClusterRequest]
|
237
|
+
# A request object representing the call parameters. Required.
|
238
|
+
# @param options [::Gapic::CallOptions]
|
239
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
240
|
+
#
|
241
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
242
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
243
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
244
|
+
#
|
245
|
+
# @return [::Google::Longrunning::Operation]
|
246
|
+
# A result object deserialized from the server's reply
|
247
|
+
def promote_cluster request_pb, options = nil
|
248
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
249
|
+
|
250
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_promote_cluster_request request_pb
|
251
|
+
query_string_params = if query_string_params.any?
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
253
|
else
|
216
254
|
{}
|
217
255
|
end
|
@@ -249,7 +287,45 @@ module Google
|
|
249
287
|
|
250
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_restore_cluster_request request_pb
|
251
289
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
|
+
else
|
292
|
+
{}
|
293
|
+
end
|
294
|
+
|
295
|
+
response = @client_stub.make_http_request(
|
296
|
+
verb,
|
297
|
+
uri: uri,
|
298
|
+
body: body || "",
|
299
|
+
params: query_string_params,
|
300
|
+
options: options
|
301
|
+
)
|
302
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
303
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
304
|
+
|
305
|
+
yield result, operation if block_given?
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
309
|
+
##
|
310
|
+
# Baseline implementation for the create_secondary_cluster REST call
|
311
|
+
#
|
312
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest]
|
313
|
+
# A request object representing the call parameters. Required.
|
314
|
+
# @param options [::Gapic::CallOptions]
|
315
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
316
|
+
#
|
317
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
318
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
319
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
320
|
+
#
|
321
|
+
# @return [::Google::Longrunning::Operation]
|
322
|
+
# A result object deserialized from the server's reply
|
323
|
+
def create_secondary_cluster request_pb, options = nil
|
324
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
325
|
+
|
326
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_secondary_cluster_request request_pb
|
327
|
+
query_string_params = if query_string_params.any?
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
329
|
else
|
254
330
|
{}
|
255
331
|
end
|
@@ -287,7 +363,7 @@ module Google
|
|
287
363
|
|
288
364
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb
|
289
365
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
366
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
367
|
else
|
292
368
|
{}
|
293
369
|
end
|
@@ -325,7 +401,7 @@ module Google
|
|
325
401
|
|
326
402
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb
|
327
403
|
query_string_params = if query_string_params.any?
|
328
|
-
query_string_params.to_h { |p| p.split
|
404
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
405
|
else
|
330
406
|
{}
|
331
407
|
end
|
@@ -363,7 +439,45 @@ module Google
|
|
363
439
|
|
364
440
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb
|
365
441
|
query_string_params = if query_string_params.any?
|
366
|
-
query_string_params.to_h { |p| p.split
|
442
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
|
+
else
|
444
|
+
{}
|
445
|
+
end
|
446
|
+
|
447
|
+
response = @client_stub.make_http_request(
|
448
|
+
verb,
|
449
|
+
uri: uri,
|
450
|
+
body: body || "",
|
451
|
+
params: query_string_params,
|
452
|
+
options: options
|
453
|
+
)
|
454
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
455
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
456
|
+
|
457
|
+
yield result, operation if block_given?
|
458
|
+
result
|
459
|
+
end
|
460
|
+
|
461
|
+
##
|
462
|
+
# Baseline implementation for the create_secondary_instance REST call
|
463
|
+
#
|
464
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest]
|
465
|
+
# A request object representing the call parameters. Required.
|
466
|
+
# @param options [::Gapic::CallOptions]
|
467
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
468
|
+
#
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
470
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Longrunning::Operation]
|
474
|
+
# A result object deserialized from the server's reply
|
475
|
+
def create_secondary_instance request_pb, options = nil
|
476
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
477
|
+
|
478
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_secondary_instance_request request_pb
|
479
|
+
query_string_params = if query_string_params.any?
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
367
481
|
else
|
368
482
|
{}
|
369
483
|
end
|
@@ -401,7 +515,7 @@ module Google
|
|
401
515
|
|
402
516
|
verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_instances_request request_pb
|
403
517
|
query_string_params = if query_string_params.any?
|
404
|
-
query_string_params.to_h { |p| p.split
|
518
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
405
519
|
else
|
406
520
|
{}
|
407
521
|
end
|
@@ -439,7 +553,7 @@ module Google
|
|
439
553
|
|
440
554
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb
|
441
555
|
query_string_params = if query_string_params.any?
|
442
|
-
query_string_params.to_h { |p| p.split
|
556
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
557
|
else
|
444
558
|
{}
|
445
559
|
end
|
@@ -477,7 +591,7 @@ module Google
|
|
477
591
|
|
478
592
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb
|
479
593
|
query_string_params = if query_string_params.any?
|
480
|
-
query_string_params.to_h { |p| p.split
|
594
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
595
|
else
|
482
596
|
{}
|
483
597
|
end
|
@@ -515,7 +629,45 @@ module Google
|
|
515
629
|
|
516
630
|
verb, uri, query_string_params, body = ServiceStub.transcode_failover_instance_request request_pb
|
517
631
|
query_string_params = if query_string_params.any?
|
518
|
-
query_string_params.to_h { |p| p.split
|
632
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
633
|
+
else
|
634
|
+
{}
|
635
|
+
end
|
636
|
+
|
637
|
+
response = @client_stub.make_http_request(
|
638
|
+
verb,
|
639
|
+
uri: uri,
|
640
|
+
body: body || "",
|
641
|
+
params: query_string_params,
|
642
|
+
options: options
|
643
|
+
)
|
644
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
645
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
646
|
+
|
647
|
+
yield result, operation if block_given?
|
648
|
+
result
|
649
|
+
end
|
650
|
+
|
651
|
+
##
|
652
|
+
# Baseline implementation for the inject_fault REST call
|
653
|
+
#
|
654
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::InjectFaultRequest]
|
655
|
+
# A request object representing the call parameters. Required.
|
656
|
+
# @param options [::Gapic::CallOptions]
|
657
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
658
|
+
#
|
659
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
660
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
661
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
662
|
+
#
|
663
|
+
# @return [::Google::Longrunning::Operation]
|
664
|
+
# A result object deserialized from the server's reply
|
665
|
+
def inject_fault request_pb, options = nil
|
666
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
667
|
+
|
668
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_inject_fault_request request_pb
|
669
|
+
query_string_params = if query_string_params.any?
|
670
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
519
671
|
else
|
520
672
|
{}
|
521
673
|
end
|
@@ -553,7 +705,7 @@ module Google
|
|
553
705
|
|
554
706
|
verb, uri, query_string_params, body = ServiceStub.transcode_restart_instance_request request_pb
|
555
707
|
query_string_params = if query_string_params.any?
|
556
|
-
query_string_params.to_h { |p| p.split
|
708
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
557
709
|
else
|
558
710
|
{}
|
559
711
|
end
|
@@ -591,7 +743,7 @@ module Google
|
|
591
743
|
|
592
744
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb
|
593
745
|
query_string_params = if query_string_params.any?
|
594
|
-
query_string_params.to_h { |p| p.split
|
746
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
595
747
|
else
|
596
748
|
{}
|
597
749
|
end
|
@@ -629,7 +781,7 @@ module Google
|
|
629
781
|
|
630
782
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb
|
631
783
|
query_string_params = if query_string_params.any?
|
632
|
-
query_string_params.to_h { |p| p.split
|
784
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
633
785
|
else
|
634
786
|
{}
|
635
787
|
end
|
@@ -667,7 +819,7 @@ module Google
|
|
667
819
|
|
668
820
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb
|
669
821
|
query_string_params = if query_string_params.any?
|
670
|
-
query_string_params.to_h { |p| p.split
|
822
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
671
823
|
else
|
672
824
|
{}
|
673
825
|
end
|
@@ -705,7 +857,7 @@ module Google
|
|
705
857
|
|
706
858
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb
|
707
859
|
query_string_params = if query_string_params.any?
|
708
|
-
query_string_params.to_h { |p| p.split
|
860
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
709
861
|
else
|
710
862
|
{}
|
711
863
|
end
|
@@ -743,7 +895,7 @@ module Google
|
|
743
895
|
|
744
896
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb
|
745
897
|
query_string_params = if query_string_params.any?
|
746
|
-
query_string_params.to_h { |p| p.split
|
898
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
747
899
|
else
|
748
900
|
{}
|
749
901
|
end
|
@@ -781,7 +933,7 @@ module Google
|
|
781
933
|
|
782
934
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_supported_database_flags_request request_pb
|
783
935
|
query_string_params = if query_string_params.any?
|
784
|
-
query_string_params.to_h { |p| p.split
|
936
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
785
937
|
else
|
786
938
|
{}
|
787
939
|
end
|
@@ -800,6 +952,196 @@ module Google
|
|
800
952
|
result
|
801
953
|
end
|
802
954
|
|
955
|
+
##
|
956
|
+
# Baseline implementation for the list_users REST call
|
957
|
+
#
|
958
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::ListUsersRequest]
|
959
|
+
# A request object representing the call parameters. Required.
|
960
|
+
# @param options [::Gapic::CallOptions]
|
961
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
962
|
+
#
|
963
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
964
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListUsersResponse]
|
965
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
966
|
+
#
|
967
|
+
# @return [::Google::Cloud::AlloyDB::V1::ListUsersResponse]
|
968
|
+
# A result object deserialized from the server's reply
|
969
|
+
def list_users request_pb, options = nil
|
970
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
971
|
+
|
972
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb
|
973
|
+
query_string_params = if query_string_params.any?
|
974
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
975
|
+
else
|
976
|
+
{}
|
977
|
+
end
|
978
|
+
|
979
|
+
response = @client_stub.make_http_request(
|
980
|
+
verb,
|
981
|
+
uri: uri,
|
982
|
+
body: body || "",
|
983
|
+
params: query_string_params,
|
984
|
+
options: options
|
985
|
+
)
|
986
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
987
|
+
result = ::Google::Cloud::AlloyDB::V1::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true
|
988
|
+
|
989
|
+
yield result, operation if block_given?
|
990
|
+
result
|
991
|
+
end
|
992
|
+
|
993
|
+
##
|
994
|
+
# Baseline implementation for the get_user REST call
|
995
|
+
#
|
996
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::GetUserRequest]
|
997
|
+
# A request object representing the call parameters. Required.
|
998
|
+
# @param options [::Gapic::CallOptions]
|
999
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1000
|
+
#
|
1001
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1002
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
1003
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1004
|
+
#
|
1005
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
1006
|
+
# A result object deserialized from the server's reply
|
1007
|
+
def get_user request_pb, options = nil
|
1008
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1009
|
+
|
1010
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb
|
1011
|
+
query_string_params = if query_string_params.any?
|
1012
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1013
|
+
else
|
1014
|
+
{}
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
response = @client_stub.make_http_request(
|
1018
|
+
verb,
|
1019
|
+
uri: uri,
|
1020
|
+
body: body || "",
|
1021
|
+
params: query_string_params,
|
1022
|
+
options: options
|
1023
|
+
)
|
1024
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1025
|
+
result = ::Google::Cloud::AlloyDB::V1::User.decode_json response.body, ignore_unknown_fields: true
|
1026
|
+
|
1027
|
+
yield result, operation if block_given?
|
1028
|
+
result
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
##
|
1032
|
+
# Baseline implementation for the create_user REST call
|
1033
|
+
#
|
1034
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateUserRequest]
|
1035
|
+
# A request object representing the call parameters. Required.
|
1036
|
+
# @param options [::Gapic::CallOptions]
|
1037
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1038
|
+
#
|
1039
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1040
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
1041
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1042
|
+
#
|
1043
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
1044
|
+
# A result object deserialized from the server's reply
|
1045
|
+
def create_user request_pb, options = nil
|
1046
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1047
|
+
|
1048
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb
|
1049
|
+
query_string_params = if query_string_params.any?
|
1050
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1051
|
+
else
|
1052
|
+
{}
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
response = @client_stub.make_http_request(
|
1056
|
+
verb,
|
1057
|
+
uri: uri,
|
1058
|
+
body: body || "",
|
1059
|
+
params: query_string_params,
|
1060
|
+
options: options
|
1061
|
+
)
|
1062
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1063
|
+
result = ::Google::Cloud::AlloyDB::V1::User.decode_json response.body, ignore_unknown_fields: true
|
1064
|
+
|
1065
|
+
yield result, operation if block_given?
|
1066
|
+
result
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
##
|
1070
|
+
# Baseline implementation for the update_user REST call
|
1071
|
+
#
|
1072
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::UpdateUserRequest]
|
1073
|
+
# A request object representing the call parameters. Required.
|
1074
|
+
# @param options [::Gapic::CallOptions]
|
1075
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1076
|
+
#
|
1077
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1078
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
1079
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1080
|
+
#
|
1081
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
1082
|
+
# A result object deserialized from the server's reply
|
1083
|
+
def update_user request_pb, options = nil
|
1084
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1085
|
+
|
1086
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb
|
1087
|
+
query_string_params = if query_string_params.any?
|
1088
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1089
|
+
else
|
1090
|
+
{}
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
response = @client_stub.make_http_request(
|
1094
|
+
verb,
|
1095
|
+
uri: uri,
|
1096
|
+
body: body || "",
|
1097
|
+
params: query_string_params,
|
1098
|
+
options: options
|
1099
|
+
)
|
1100
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1101
|
+
result = ::Google::Cloud::AlloyDB::V1::User.decode_json response.body, ignore_unknown_fields: true
|
1102
|
+
|
1103
|
+
yield result, operation if block_given?
|
1104
|
+
result
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
##
|
1108
|
+
# Baseline implementation for the delete_user REST call
|
1109
|
+
#
|
1110
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::DeleteUserRequest]
|
1111
|
+
# A request object representing the call parameters. Required.
|
1112
|
+
# @param options [::Gapic::CallOptions]
|
1113
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1114
|
+
#
|
1115
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1116
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1117
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1118
|
+
#
|
1119
|
+
# @return [::Google::Protobuf::Empty]
|
1120
|
+
# A result object deserialized from the server's reply
|
1121
|
+
def delete_user request_pb, options = nil
|
1122
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1123
|
+
|
1124
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb
|
1125
|
+
query_string_params = if query_string_params.any?
|
1126
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1127
|
+
else
|
1128
|
+
{}
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
response = @client_stub.make_http_request(
|
1132
|
+
verb,
|
1133
|
+
uri: uri,
|
1134
|
+
body: body || "",
|
1135
|
+
params: query_string_params,
|
1136
|
+
options: options
|
1137
|
+
)
|
1138
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1139
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
1140
|
+
|
1141
|
+
yield result, operation if block_given?
|
1142
|
+
result
|
1143
|
+
end
|
1144
|
+
|
803
1145
|
##
|
804
1146
|
# @private
|
805
1147
|
#
|
@@ -907,6 +1249,28 @@ module Google
|
|
907
1249
|
transcoder.transcode request_pb
|
908
1250
|
end
|
909
1251
|
|
1252
|
+
##
|
1253
|
+
# @private
|
1254
|
+
#
|
1255
|
+
# GRPC transcoding helper method for the promote_cluster REST call
|
1256
|
+
#
|
1257
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::PromoteClusterRequest]
|
1258
|
+
# A request object representing the call parameters. Required.
|
1259
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1260
|
+
# Uri, Body, Query string parameters
|
1261
|
+
def self.transcode_promote_cluster_request request_pb
|
1262
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1263
|
+
.with_bindings(
|
1264
|
+
uri_method: :post,
|
1265
|
+
uri_template: "/v1/{name}:promote",
|
1266
|
+
body: "*",
|
1267
|
+
matches: [
|
1268
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1269
|
+
]
|
1270
|
+
)
|
1271
|
+
transcoder.transcode request_pb
|
1272
|
+
end
|
1273
|
+
|
910
1274
|
##
|
911
1275
|
# @private
|
912
1276
|
#
|
@@ -929,6 +1293,28 @@ module Google
|
|
929
1293
|
transcoder.transcode request_pb
|
930
1294
|
end
|
931
1295
|
|
1296
|
+
##
|
1297
|
+
# @private
|
1298
|
+
#
|
1299
|
+
# GRPC transcoding helper method for the create_secondary_cluster REST call
|
1300
|
+
#
|
1301
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest]
|
1302
|
+
# A request object representing the call parameters. Required.
|
1303
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1304
|
+
# Uri, Body, Query string parameters
|
1305
|
+
def self.transcode_create_secondary_cluster_request request_pb
|
1306
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1307
|
+
.with_bindings(
|
1308
|
+
uri_method: :post,
|
1309
|
+
uri_template: "/v1/{parent}/clusters:createsecondary",
|
1310
|
+
body: "cluster",
|
1311
|
+
matches: [
|
1312
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1313
|
+
]
|
1314
|
+
)
|
1315
|
+
transcoder.transcode request_pb
|
1316
|
+
end
|
1317
|
+
|
932
1318
|
##
|
933
1319
|
# @private
|
934
1320
|
#
|
@@ -993,6 +1379,28 @@ module Google
|
|
993
1379
|
transcoder.transcode request_pb
|
994
1380
|
end
|
995
1381
|
|
1382
|
+
##
|
1383
|
+
# @private
|
1384
|
+
#
|
1385
|
+
# GRPC transcoding helper method for the create_secondary_instance REST call
|
1386
|
+
#
|
1387
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest]
|
1388
|
+
# A request object representing the call parameters. Required.
|
1389
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1390
|
+
# Uri, Body, Query string parameters
|
1391
|
+
def self.transcode_create_secondary_instance_request request_pb
|
1392
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1393
|
+
.with_bindings(
|
1394
|
+
uri_method: :post,
|
1395
|
+
uri_template: "/v1/{parent}/instances:createsecondary",
|
1396
|
+
body: "instance",
|
1397
|
+
matches: [
|
1398
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1399
|
+
]
|
1400
|
+
)
|
1401
|
+
transcoder.transcode request_pb
|
1402
|
+
end
|
1403
|
+
|
996
1404
|
##
|
997
1405
|
# @private
|
998
1406
|
#
|
@@ -1080,6 +1488,28 @@ module Google
|
|
1080
1488
|
transcoder.transcode request_pb
|
1081
1489
|
end
|
1082
1490
|
|
1491
|
+
##
|
1492
|
+
# @private
|
1493
|
+
#
|
1494
|
+
# GRPC transcoding helper method for the inject_fault REST call
|
1495
|
+
#
|
1496
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::InjectFaultRequest]
|
1497
|
+
# A request object representing the call parameters. Required.
|
1498
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1499
|
+
# Uri, Body, Query string parameters
|
1500
|
+
def self.transcode_inject_fault_request request_pb
|
1501
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1502
|
+
.with_bindings(
|
1503
|
+
uri_method: :post,
|
1504
|
+
uri_template: "/v1/{name}:injectFault",
|
1505
|
+
body: "*",
|
1506
|
+
matches: [
|
1507
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+/?$}, false]
|
1508
|
+
]
|
1509
|
+
)
|
1510
|
+
transcoder.transcode request_pb
|
1511
|
+
end
|
1512
|
+
|
1083
1513
|
##
|
1084
1514
|
# @private
|
1085
1515
|
#
|
@@ -1229,6 +1659,113 @@ module Google
|
|
1229
1659
|
)
|
1230
1660
|
transcoder.transcode request_pb
|
1231
1661
|
end
|
1662
|
+
|
1663
|
+
##
|
1664
|
+
# @private
|
1665
|
+
#
|
1666
|
+
# GRPC transcoding helper method for the list_users REST call
|
1667
|
+
#
|
1668
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::ListUsersRequest]
|
1669
|
+
# A request object representing the call parameters. Required.
|
1670
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1671
|
+
# Uri, Body, Query string parameters
|
1672
|
+
def self.transcode_list_users_request request_pb
|
1673
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1674
|
+
.with_bindings(
|
1675
|
+
uri_method: :get,
|
1676
|
+
uri_template: "/v1/{parent}/users",
|
1677
|
+
matches: [
|
1678
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1679
|
+
]
|
1680
|
+
)
|
1681
|
+
transcoder.transcode request_pb
|
1682
|
+
end
|
1683
|
+
|
1684
|
+
##
|
1685
|
+
# @private
|
1686
|
+
#
|
1687
|
+
# GRPC transcoding helper method for the get_user REST call
|
1688
|
+
#
|
1689
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::GetUserRequest]
|
1690
|
+
# A request object representing the call parameters. Required.
|
1691
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1692
|
+
# Uri, Body, Query string parameters
|
1693
|
+
def self.transcode_get_user_request request_pb
|
1694
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1695
|
+
.with_bindings(
|
1696
|
+
uri_method: :get,
|
1697
|
+
uri_template: "/v1/{name}",
|
1698
|
+
matches: [
|
1699
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+/?$}, false]
|
1700
|
+
]
|
1701
|
+
)
|
1702
|
+
transcoder.transcode request_pb
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
##
|
1706
|
+
# @private
|
1707
|
+
#
|
1708
|
+
# GRPC transcoding helper method for the create_user REST call
|
1709
|
+
#
|
1710
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::CreateUserRequest]
|
1711
|
+
# A request object representing the call parameters. Required.
|
1712
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1713
|
+
# Uri, Body, Query string parameters
|
1714
|
+
def self.transcode_create_user_request request_pb
|
1715
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1716
|
+
.with_bindings(
|
1717
|
+
uri_method: :post,
|
1718
|
+
uri_template: "/v1/{parent}/users",
|
1719
|
+
body: "user",
|
1720
|
+
matches: [
|
1721
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1722
|
+
]
|
1723
|
+
)
|
1724
|
+
transcoder.transcode request_pb
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
##
|
1728
|
+
# @private
|
1729
|
+
#
|
1730
|
+
# GRPC transcoding helper method for the update_user REST call
|
1731
|
+
#
|
1732
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::UpdateUserRequest]
|
1733
|
+
# A request object representing the call parameters. Required.
|
1734
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1735
|
+
# Uri, Body, Query string parameters
|
1736
|
+
def self.transcode_update_user_request request_pb
|
1737
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1738
|
+
.with_bindings(
|
1739
|
+
uri_method: :patch,
|
1740
|
+
uri_template: "/v1/{user.name}",
|
1741
|
+
body: "user",
|
1742
|
+
matches: [
|
1743
|
+
["user.name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+/?$}, false]
|
1744
|
+
]
|
1745
|
+
)
|
1746
|
+
transcoder.transcode request_pb
|
1747
|
+
end
|
1748
|
+
|
1749
|
+
##
|
1750
|
+
# @private
|
1751
|
+
#
|
1752
|
+
# GRPC transcoding helper method for the delete_user REST call
|
1753
|
+
#
|
1754
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::DeleteUserRequest]
|
1755
|
+
# A request object representing the call parameters. Required.
|
1756
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1757
|
+
# Uri, Body, Query string parameters
|
1758
|
+
def self.transcode_delete_user_request request_pb
|
1759
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1760
|
+
.with_bindings(
|
1761
|
+
uri_method: :delete,
|
1762
|
+
uri_template: "/v1/{name}",
|
1763
|
+
matches: [
|
1764
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+/?$}, false]
|
1765
|
+
]
|
1766
|
+
)
|
1767
|
+
transcoder.transcode request_pb
|
1768
|
+
end
|
1232
1769
|
end
|
1233
1770
|
end
|
1234
1771
|
end
|