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.
@@ -162,7 +162,7 @@ module Google
162
162
  credentials = @config.credentials
163
163
  # Use self-signed JWT if the endpoint is unchanged from default,
164
164
  # but only if the default endpoint does not have a region prefix.
165
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
165
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
166
166
  !@config.endpoint.split(".").first.include?("-")
167
167
  credentials ||= Credentials.default scope: @config.scope,
168
168
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -337,7 +337,7 @@ module Google
337
337
  # @param options [::Gapic::CallOptions, ::Hash]
338
338
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
339
339
  #
340
- # @overload get_cluster(name: nil)
340
+ # @overload get_cluster(name: nil, view: nil)
341
341
  # Pass arguments to `get_cluster` via keyword arguments. Note that at
342
342
  # least one keyword argument is required. To specify no parameters, or to keep all
343
343
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -345,6 +345,9 @@ module Google
345
345
  # @param name [::String]
346
346
  # Required. The name of the resource. For the required format, see the
347
347
  # comment on the Cluster.name field.
348
+ # @param view [::Google::Cloud::AlloyDB::V1::ClusterView]
349
+ # Optional. The view of the cluster to return. Returns all default fields if
350
+ # not set.
348
351
  #
349
352
  # @yield [response, operation] Access the result along with the RPC operation
350
353
  # @yieldparam response [::Google::Cloud::AlloyDB::V1::Cluster]
@@ -429,7 +432,7 @@ module Google
429
432
  # the default parameter values, pass an empty Hash as a request object (see above).
430
433
  #
431
434
  # @param parent [::String]
432
- # Required. The name of the parent resource. For the required format, see the
435
+ # Required. The location of the new cluster. For the required format, see the
433
436
  # comment on the Cluster.name field.
434
437
  # @param cluster_id [::String]
435
438
  # Required. ID of the requesting object.
@@ -763,6 +766,124 @@ module Google
763
766
  raise ::Google::Cloud::Error.from_error(e)
764
767
  end
765
768
 
769
+ ##
770
+ # Promotes a SECONDARY cluster. This turns down replication
771
+ # from the PRIMARY cluster and promotes a secondary cluster
772
+ # into its own standalone cluster.
773
+ # Imperative only.
774
+ #
775
+ # @overload promote_cluster(request, options = nil)
776
+ # Pass arguments to `promote_cluster` via a request object, either of type
777
+ # {::Google::Cloud::AlloyDB::V1::PromoteClusterRequest} or an equivalent Hash.
778
+ #
779
+ # @param request [::Google::Cloud::AlloyDB::V1::PromoteClusterRequest, ::Hash]
780
+ # A request object representing the call parameters. Required. To specify no
781
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
782
+ # @param options [::Gapic::CallOptions, ::Hash]
783
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
784
+ #
785
+ # @overload promote_cluster(name: nil, request_id: nil, etag: nil, validate_only: nil)
786
+ # Pass arguments to `promote_cluster` via keyword arguments. Note that at
787
+ # least one keyword argument is required. To specify no parameters, or to keep all
788
+ # the default parameter values, pass an empty Hash as a request object (see above).
789
+ #
790
+ # @param name [::String]
791
+ # Required. The name of the resource. For the required format, see the
792
+ # comment on the Cluster.name field
793
+ # @param request_id [::String]
794
+ # Optional. An optional request ID to identify requests. Specify a unique
795
+ # request ID so that if you must retry your request, the server will know to
796
+ # ignore the request if it has already been completed. The server will
797
+ # guarantee that for at least 60 minutes after the first request.
798
+ #
799
+ # For example, consider a situation where you make an initial request and
800
+ # the request times out. If you make the request again with the same request
801
+ # ID, the server can check if original operation with the same request ID
802
+ # was received, and if so, will ignore the second request. This prevents
803
+ # clients from accidentally creating duplicate commitments.
804
+ #
805
+ # The request ID must be a valid UUID with the exception that zero UUID is
806
+ # not supported (00000000-0000-0000-0000-000000000000).
807
+ # @param etag [::String]
808
+ # Optional. The current etag of the Cluster.
809
+ # If an etag is provided and does not match the current etag of the Cluster,
810
+ # deletion will be blocked and an ABORTED error will be returned.
811
+ # @param validate_only [::Boolean]
812
+ # Optional. If set, performs request validation (e.g. permission checks and
813
+ # any other type of validation), but do not actually execute the delete.
814
+ #
815
+ # @yield [response, operation] Access the result along with the RPC operation
816
+ # @yieldparam response [::Gapic::Operation]
817
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
818
+ #
819
+ # @return [::Gapic::Operation]
820
+ #
821
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
822
+ #
823
+ # @example Basic example
824
+ # require "google/cloud/alloy_db/v1"
825
+ #
826
+ # # Create a client object. The client can be reused for multiple calls.
827
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
828
+ #
829
+ # # Create a request. To set request fields, pass in keyword arguments.
830
+ # request = Google::Cloud::AlloyDB::V1::PromoteClusterRequest.new
831
+ #
832
+ # # Call the promote_cluster method.
833
+ # result = client.promote_cluster request
834
+ #
835
+ # # The returned object is of type Gapic::Operation. You can use it to
836
+ # # check the status of an operation, cancel it, or wait for results.
837
+ # # Here is how to wait for a response.
838
+ # result.wait_until_done! timeout: 60
839
+ # if result.response?
840
+ # p result.response
841
+ # else
842
+ # puts "No response received."
843
+ # end
844
+ #
845
+ def promote_cluster request, options = nil
846
+ raise ::ArgumentError, "request must be provided" if request.nil?
847
+
848
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::PromoteClusterRequest
849
+
850
+ # Converts hash and nil to an options object
851
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
852
+
853
+ # Customize the options with defaults
854
+ metadata = @config.rpcs.promote_cluster.metadata.to_h
855
+
856
+ # Set x-goog-api-client and x-goog-user-project headers
857
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
858
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
859
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
860
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
861
+
862
+ header_params = {}
863
+ if request.name
864
+ header_params["name"] = request.name
865
+ end
866
+
867
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
868
+ metadata[:"x-goog-request-params"] ||= request_params_header
869
+
870
+ options.apply_defaults timeout: @config.rpcs.promote_cluster.timeout,
871
+ metadata: metadata,
872
+ retry_policy: @config.rpcs.promote_cluster.retry_policy
873
+
874
+ options.apply_defaults timeout: @config.timeout,
875
+ metadata: @config.metadata,
876
+ retry_policy: @config.retry_policy
877
+
878
+ @alloy_db_admin_stub.call_rpc :promote_cluster, request, options: options do |response, operation|
879
+ response = ::Gapic::Operation.new response, @operations_client, options: options
880
+ yield response, operation if block_given?
881
+ return response
882
+ end
883
+ rescue ::GRPC::BadStatus => e
884
+ raise ::Google::Cloud::Error.from_error(e)
885
+ end
886
+
766
887
  ##
767
888
  # Creates a new Cluster in a given project and location, with a volume
768
889
  # restored from the provided source, either a backup ID or a point-in-time
@@ -778,13 +899,16 @@ module Google
778
899
  # @param options [::Gapic::CallOptions, ::Hash]
779
900
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
780
901
  #
781
- # @overload restore_cluster(backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
902
+ # @overload restore_cluster(backup_source: nil, continuous_backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
782
903
  # Pass arguments to `restore_cluster` via keyword arguments. Note that at
783
904
  # least one keyword argument is required. To specify no parameters, or to keep all
784
905
  # the default parameter values, pass an empty Hash as a request object (see above).
785
906
  #
786
907
  # @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash]
787
908
  # Backup source.
909
+ # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash]
910
+ # ContinuousBackup source. Continuous backup needs to be enabled in the
911
+ # source cluster for this operation to succeed.
788
912
  # @param parent [::String]
789
913
  # Required. The name of the parent resource. For the required format, see the
790
914
  # comment on the Cluster.name field.
@@ -883,6 +1007,123 @@ module Google
883
1007
  raise ::Google::Cloud::Error.from_error(e)
884
1008
  end
885
1009
 
1010
+ ##
1011
+ # Creates a cluster of type SECONDARY in the given location using
1012
+ # the primary cluster as the source.
1013
+ #
1014
+ # @overload create_secondary_cluster(request, options = nil)
1015
+ # Pass arguments to `create_secondary_cluster` via a request object, either of type
1016
+ # {::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest} or an equivalent Hash.
1017
+ #
1018
+ # @param request [::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest, ::Hash]
1019
+ # A request object representing the call parameters. Required. To specify no
1020
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1021
+ # @param options [::Gapic::CallOptions, ::Hash]
1022
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1023
+ #
1024
+ # @overload create_secondary_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
1025
+ # Pass arguments to `create_secondary_cluster` via keyword arguments. Note that at
1026
+ # least one keyword argument is required. To specify no parameters, or to keep all
1027
+ # the default parameter values, pass an empty Hash as a request object (see above).
1028
+ #
1029
+ # @param parent [::String]
1030
+ # Required. The location of the new cluster. For the required
1031
+ # format, see the comment on the Cluster.name field.
1032
+ # @param cluster_id [::String]
1033
+ # Required. ID of the requesting object (the secondary cluster).
1034
+ # @param cluster [::Google::Cloud::AlloyDB::V1::Cluster, ::Hash]
1035
+ # Required. Configuration of the requesting object (the secondary cluster).
1036
+ # @param request_id [::String]
1037
+ # Optional. An optional request ID to identify requests. Specify a unique
1038
+ # request ID so that if you must retry your request, the server will know to
1039
+ # ignore the request if it has already been completed. The server will
1040
+ # guarantee that for at least 60 minutes since the first request.
1041
+ #
1042
+ # For example, consider a situation where you make an initial request and
1043
+ # the request times out. If you make the request again with the same request
1044
+ # ID, the server can check if original operation with the same request ID
1045
+ # was received, and if so, will ignore the second request. This prevents
1046
+ # clients from accidentally creating duplicate commitments.
1047
+ #
1048
+ # The request ID must be a valid UUID with the exception that zero UUID is
1049
+ # not supported (00000000-0000-0000-0000-000000000000).
1050
+ # @param validate_only [::Boolean]
1051
+ # Optional. If set, performs request validation (e.g. permission checks and
1052
+ # any other type of validation), but do not actually execute the create
1053
+ # request.
1054
+ #
1055
+ # @yield [response, operation] Access the result along with the RPC operation
1056
+ # @yieldparam response [::Gapic::Operation]
1057
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1058
+ #
1059
+ # @return [::Gapic::Operation]
1060
+ #
1061
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1062
+ #
1063
+ # @example Basic example
1064
+ # require "google/cloud/alloy_db/v1"
1065
+ #
1066
+ # # Create a client object. The client can be reused for multiple calls.
1067
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
1068
+ #
1069
+ # # Create a request. To set request fields, pass in keyword arguments.
1070
+ # request = Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest.new
1071
+ #
1072
+ # # Call the create_secondary_cluster method.
1073
+ # result = client.create_secondary_cluster request
1074
+ #
1075
+ # # The returned object is of type Gapic::Operation. You can use it to
1076
+ # # check the status of an operation, cancel it, or wait for results.
1077
+ # # Here is how to wait for a response.
1078
+ # result.wait_until_done! timeout: 60
1079
+ # if result.response?
1080
+ # p result.response
1081
+ # else
1082
+ # puts "No response received."
1083
+ # end
1084
+ #
1085
+ def create_secondary_cluster request, options = nil
1086
+ raise ::ArgumentError, "request must be provided" if request.nil?
1087
+
1088
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest
1089
+
1090
+ # Converts hash and nil to an options object
1091
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1092
+
1093
+ # Customize the options with defaults
1094
+ metadata = @config.rpcs.create_secondary_cluster.metadata.to_h
1095
+
1096
+ # Set x-goog-api-client and x-goog-user-project headers
1097
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1098
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1099
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
1100
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1101
+
1102
+ header_params = {}
1103
+ if request.parent
1104
+ header_params["parent"] = request.parent
1105
+ end
1106
+
1107
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1108
+ metadata[:"x-goog-request-params"] ||= request_params_header
1109
+
1110
+ options.apply_defaults timeout: @config.rpcs.create_secondary_cluster.timeout,
1111
+ metadata: metadata,
1112
+ retry_policy: @config.rpcs.create_secondary_cluster.retry_policy
1113
+
1114
+ options.apply_defaults timeout: @config.timeout,
1115
+ metadata: @config.metadata,
1116
+ retry_policy: @config.retry_policy
1117
+
1118
+ @alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
1119
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1120
+ yield response, operation if block_given?
1121
+ return response
1122
+ end
1123
+ rescue ::GRPC::BadStatus => e
1124
+ raise ::Google::Cloud::Error.from_error(e)
1125
+ end
1126
+
886
1127
  ##
887
1128
  # Lists Instances in a given project and location.
888
1129
  #
@@ -1192,36 +1433,30 @@ module Google
1192
1433
  end
1193
1434
 
1194
1435
  ##
1195
- # Creates new instances under the given project, location and cluster.
1196
- # There can be only one primary instance in a cluster. If the primary
1197
- # instance exists in the cluster as well as this request, then API will
1198
- # throw an error.
1199
- # The primary instance should exist before any read pool instance is
1200
- # created. If the primary instance is a part of the request payload, then
1201
- # the API will take care of creating instances in the correct order.
1202
- # This method is here to support Google-internal use cases, and is not meant
1203
- # for external customers to consume. Please do not start relying on it; its
1204
- # behavior is subject to change without notice.
1436
+ # Creates a new SECONDARY Instance in a given project and location.
1205
1437
  #
1206
- # @overload batch_create_instances(request, options = nil)
1207
- # Pass arguments to `batch_create_instances` via a request object, either of type
1208
- # {::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest} or an equivalent Hash.
1438
+ # @overload create_secondary_instance(request, options = nil)
1439
+ # Pass arguments to `create_secondary_instance` via a request object, either of type
1440
+ # {::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest} or an equivalent Hash.
1209
1441
  #
1210
- # @param request [::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest, ::Hash]
1442
+ # @param request [::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest, ::Hash]
1211
1443
  # A request object representing the call parameters. Required. To specify no
1212
1444
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1213
1445
  # @param options [::Gapic::CallOptions, ::Hash]
1214
1446
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1215
1447
  #
1216
- # @overload batch_create_instances(parent: nil, requests: nil, request_id: nil)
1217
- # Pass arguments to `batch_create_instances` via keyword arguments. Note that at
1448
+ # @overload create_secondary_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil, validate_only: nil)
1449
+ # Pass arguments to `create_secondary_instance` via keyword arguments. Note that at
1218
1450
  # least one keyword argument is required. To specify no parameters, or to keep all
1219
1451
  # the default parameter values, pass an empty Hash as a request object (see above).
1220
1452
  #
1221
1453
  # @param parent [::String]
1222
- # Required. The name of the parent resource.
1223
- # @param requests [::Google::Cloud::AlloyDB::V1::CreateInstanceRequests, ::Hash]
1224
- # Required. Resources being created.
1454
+ # Required. The name of the parent resource. For the required format, see the
1455
+ # comment on the Instance.name field.
1456
+ # @param instance_id [::String]
1457
+ # Required. ID of the requesting object.
1458
+ # @param instance [::Google::Cloud::AlloyDB::V1::Instance, ::Hash]
1459
+ # Required. The resource being created
1225
1460
  # @param request_id [::String]
1226
1461
  # Optional. An optional request ID to identify requests. Specify a unique
1227
1462
  # request ID so that if you must retry your request, the server will know to
@@ -1236,6 +1471,10 @@ module Google
1236
1471
  #
1237
1472
  # The request ID must be a valid UUID with the exception that zero UUID is
1238
1473
  # not supported (00000000-0000-0000-0000-000000000000).
1474
+ # @param validate_only [::Boolean]
1475
+ # Optional. If set, performs request validation (e.g. permission checks and
1476
+ # any other type of validation), but do not actually execute the create
1477
+ # request.
1239
1478
  #
1240
1479
  # @yield [response, operation] Access the result along with the RPC operation
1241
1480
  # @yieldparam response [::Gapic::Operation]
@@ -1252,10 +1491,10 @@ module Google
1252
1491
  # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
1253
1492
  #
1254
1493
  # # Create a request. To set request fields, pass in keyword arguments.
1255
- # request = Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest.new
1494
+ # request = Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest.new
1256
1495
  #
1257
- # # Call the batch_create_instances method.
1258
- # result = client.batch_create_instances request
1496
+ # # Call the create_secondary_instance method.
1497
+ # result = client.create_secondary_instance request
1259
1498
  #
1260
1499
  # # The returned object is of type Gapic::Operation. You can use it to
1261
1500
  # # check the status of an operation, cancel it, or wait for results.
@@ -1267,16 +1506,16 @@ module Google
1267
1506
  # puts "No response received."
1268
1507
  # end
1269
1508
  #
1270
- def batch_create_instances request, options = nil
1509
+ def create_secondary_instance request, options = nil
1271
1510
  raise ::ArgumentError, "request must be provided" if request.nil?
1272
1511
 
1273
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest
1512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest
1274
1513
 
1275
1514
  # Converts hash and nil to an options object
1276
1515
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1277
1516
 
1278
1517
  # Customize the options with defaults
1279
- metadata = @config.rpcs.batch_create_instances.metadata.to_h
1518
+ metadata = @config.rpcs.create_secondary_instance.metadata.to_h
1280
1519
 
1281
1520
  # Set x-goog-api-client and x-goog-user-project headers
1282
1521
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1292,15 +1531,15 @@ module Google
1292
1531
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1293
1532
  metadata[:"x-goog-request-params"] ||= request_params_header
1294
1533
 
1295
- options.apply_defaults timeout: @config.rpcs.batch_create_instances.timeout,
1534
+ options.apply_defaults timeout: @config.rpcs.create_secondary_instance.timeout,
1296
1535
  metadata: metadata,
1297
- retry_policy: @config.rpcs.batch_create_instances.retry_policy
1536
+ retry_policy: @config.rpcs.create_secondary_instance.retry_policy
1298
1537
 
1299
1538
  options.apply_defaults timeout: @config.timeout,
1300
1539
  metadata: @config.metadata,
1301
1540
  retry_policy: @config.retry_policy
1302
1541
 
1303
- @alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
1542
+ @alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
1304
1543
  response = ::Gapic::Operation.new response, @operations_client, options: options
1305
1544
  yield response, operation if block_given?
1306
1545
  return response
@@ -1310,21 +1549,139 @@ module Google
1310
1549
  end
1311
1550
 
1312
1551
  ##
1313
- # Updates the parameters of a single Instance.
1552
+ # Creates new instances under the given project, location and cluster.
1553
+ # There can be only one primary instance in a cluster. If the primary
1554
+ # instance exists in the cluster as well as this request, then API will
1555
+ # throw an error.
1556
+ # The primary instance should exist before any read pool instance is
1557
+ # created. If the primary instance is a part of the request payload, then
1558
+ # the API will take care of creating instances in the correct order.
1559
+ # This method is here to support Google-internal use cases, and is not meant
1560
+ # for external customers to consume. Please do not start relying on it; its
1561
+ # behavior is subject to change without notice.
1314
1562
  #
1315
- # @overload update_instance(request, options = nil)
1316
- # Pass arguments to `update_instance` via a request object, either of type
1317
- # {::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest} or an equivalent Hash.
1563
+ # @overload batch_create_instances(request, options = nil)
1564
+ # Pass arguments to `batch_create_instances` via a request object, either of type
1565
+ # {::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest} or an equivalent Hash.
1318
1566
  #
1319
- # @param request [::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest, ::Hash]
1567
+ # @param request [::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest, ::Hash]
1320
1568
  # A request object representing the call parameters. Required. To specify no
1321
1569
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1322
1570
  # @param options [::Gapic::CallOptions, ::Hash]
1323
1571
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1324
1572
  #
1325
- # @overload update_instance(update_mask: nil, instance: nil, request_id: nil, validate_only: nil, allow_missing: nil)
1326
- # Pass arguments to `update_instance` via keyword arguments. Note that at
1327
- # least one keyword argument is required. To specify no parameters, or to keep all
1573
+ # @overload batch_create_instances(parent: nil, requests: nil, request_id: nil)
1574
+ # Pass arguments to `batch_create_instances` via keyword arguments. Note that at
1575
+ # least one keyword argument is required. To specify no parameters, or to keep all
1576
+ # the default parameter values, pass an empty Hash as a request object (see above).
1577
+ #
1578
+ # @param parent [::String]
1579
+ # Required. The name of the parent resource.
1580
+ # @param requests [::Google::Cloud::AlloyDB::V1::CreateInstanceRequests, ::Hash]
1581
+ # Required. Resources being created.
1582
+ # @param request_id [::String]
1583
+ # Optional. An optional request ID to identify requests. Specify a unique
1584
+ # request ID so that if you must retry your request, the server will know to
1585
+ # ignore the request if it has already been completed. The server will
1586
+ # guarantee that for at least 60 minutes since the first request.
1587
+ #
1588
+ # For example, consider a situation where you make an initial request and
1589
+ # the request times out. If you make the request again with the same request
1590
+ # ID, the server can check if original operation with the same request ID
1591
+ # was received, and if so, will ignore the second request. This prevents
1592
+ # clients from accidentally creating duplicate commitments.
1593
+ #
1594
+ # The request ID must be a valid UUID with the exception that zero UUID is
1595
+ # not supported (00000000-0000-0000-0000-000000000000).
1596
+ #
1597
+ # @yield [response, operation] Access the result along with the RPC operation
1598
+ # @yieldparam response [::Gapic::Operation]
1599
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1600
+ #
1601
+ # @return [::Gapic::Operation]
1602
+ #
1603
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1604
+ #
1605
+ # @example Basic example
1606
+ # require "google/cloud/alloy_db/v1"
1607
+ #
1608
+ # # Create a client object. The client can be reused for multiple calls.
1609
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
1610
+ #
1611
+ # # Create a request. To set request fields, pass in keyword arguments.
1612
+ # request = Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest.new
1613
+ #
1614
+ # # Call the batch_create_instances method.
1615
+ # result = client.batch_create_instances request
1616
+ #
1617
+ # # The returned object is of type Gapic::Operation. You can use it to
1618
+ # # check the status of an operation, cancel it, or wait for results.
1619
+ # # Here is how to wait for a response.
1620
+ # result.wait_until_done! timeout: 60
1621
+ # if result.response?
1622
+ # p result.response
1623
+ # else
1624
+ # puts "No response received."
1625
+ # end
1626
+ #
1627
+ def batch_create_instances request, options = nil
1628
+ raise ::ArgumentError, "request must be provided" if request.nil?
1629
+
1630
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest
1631
+
1632
+ # Converts hash and nil to an options object
1633
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1634
+
1635
+ # Customize the options with defaults
1636
+ metadata = @config.rpcs.batch_create_instances.metadata.to_h
1637
+
1638
+ # Set x-goog-api-client and x-goog-user-project headers
1639
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1640
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1641
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
1642
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1643
+
1644
+ header_params = {}
1645
+ if request.parent
1646
+ header_params["parent"] = request.parent
1647
+ end
1648
+
1649
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1650
+ metadata[:"x-goog-request-params"] ||= request_params_header
1651
+
1652
+ options.apply_defaults timeout: @config.rpcs.batch_create_instances.timeout,
1653
+ metadata: metadata,
1654
+ retry_policy: @config.rpcs.batch_create_instances.retry_policy
1655
+
1656
+ options.apply_defaults timeout: @config.timeout,
1657
+ metadata: @config.metadata,
1658
+ retry_policy: @config.retry_policy
1659
+
1660
+ @alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
1661
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1662
+ yield response, operation if block_given?
1663
+ return response
1664
+ end
1665
+ rescue ::GRPC::BadStatus => e
1666
+ raise ::Google::Cloud::Error.from_error(e)
1667
+ end
1668
+
1669
+ ##
1670
+ # Updates the parameters of a single Instance.
1671
+ #
1672
+ # @overload update_instance(request, options = nil)
1673
+ # Pass arguments to `update_instance` via a request object, either of type
1674
+ # {::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest} or an equivalent Hash.
1675
+ #
1676
+ # @param request [::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest, ::Hash]
1677
+ # A request object representing the call parameters. Required. To specify no
1678
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1679
+ # @param options [::Gapic::CallOptions, ::Hash]
1680
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1681
+ #
1682
+ # @overload update_instance(update_mask: nil, instance: nil, request_id: nil, validate_only: nil, allow_missing: nil)
1683
+ # Pass arguments to `update_instance` via keyword arguments. Note that at
1684
+ # least one keyword argument is required. To specify no parameters, or to keep all
1328
1685
  # the default parameter values, pass an empty Hash as a request object (see above).
1329
1686
  #
1330
1687
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
@@ -1657,6 +2014,121 @@ module Google
1657
2014
  raise ::Google::Cloud::Error.from_error(e)
1658
2015
  end
1659
2016
 
2017
+ ##
2018
+ # Injects fault in an instance.
2019
+ # Imperative only.
2020
+ #
2021
+ # @overload inject_fault(request, options = nil)
2022
+ # Pass arguments to `inject_fault` via a request object, either of type
2023
+ # {::Google::Cloud::AlloyDB::V1::InjectFaultRequest} or an equivalent Hash.
2024
+ #
2025
+ # @param request [::Google::Cloud::AlloyDB::V1::InjectFaultRequest, ::Hash]
2026
+ # A request object representing the call parameters. Required. To specify no
2027
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2028
+ # @param options [::Gapic::CallOptions, ::Hash]
2029
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2030
+ #
2031
+ # @overload inject_fault(fault_type: nil, name: nil, request_id: nil, validate_only: nil)
2032
+ # Pass arguments to `inject_fault` via keyword arguments. Note that at
2033
+ # least one keyword argument is required. To specify no parameters, or to keep all
2034
+ # the default parameter values, pass an empty Hash as a request object (see above).
2035
+ #
2036
+ # @param fault_type [::Google::Cloud::AlloyDB::V1::InjectFaultRequest::FaultType]
2037
+ # Required. The type of fault to be injected in an instance.
2038
+ # @param name [::String]
2039
+ # Required. The name of the resource. For the required format, see the
2040
+ # comment on the Instance.name field.
2041
+ # @param request_id [::String]
2042
+ # Optional. An optional request ID to identify requests. Specify a unique
2043
+ # request ID so that if you must retry your request, the server will know to
2044
+ # ignore the request if it has already been completed. The server will
2045
+ # guarantee that for at least 60 minutes after the first request.
2046
+ #
2047
+ # For example, consider a situation where you make an initial request and
2048
+ # the request times out. If you make the request again with the same request
2049
+ # ID, the server can check if original operation with the same request ID
2050
+ # was received, and if so, will ignore the second request. This prevents
2051
+ # clients from accidentally creating duplicate commitments.
2052
+ #
2053
+ # The request ID must be a valid UUID with the exception that zero UUID is
2054
+ # not supported (00000000-0000-0000-0000-000000000000).
2055
+ # @param validate_only [::Boolean]
2056
+ # Optional. If set, performs request validation (e.g. permission checks and
2057
+ # any other type of validation), but do not actually execute the fault
2058
+ # injection.
2059
+ #
2060
+ # @yield [response, operation] Access the result along with the RPC operation
2061
+ # @yieldparam response [::Gapic::Operation]
2062
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2063
+ #
2064
+ # @return [::Gapic::Operation]
2065
+ #
2066
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2067
+ #
2068
+ # @example Basic example
2069
+ # require "google/cloud/alloy_db/v1"
2070
+ #
2071
+ # # Create a client object. The client can be reused for multiple calls.
2072
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
2073
+ #
2074
+ # # Create a request. To set request fields, pass in keyword arguments.
2075
+ # request = Google::Cloud::AlloyDB::V1::InjectFaultRequest.new
2076
+ #
2077
+ # # Call the inject_fault method.
2078
+ # result = client.inject_fault request
2079
+ #
2080
+ # # The returned object is of type Gapic::Operation. You can use it to
2081
+ # # check the status of an operation, cancel it, or wait for results.
2082
+ # # Here is how to wait for a response.
2083
+ # result.wait_until_done! timeout: 60
2084
+ # if result.response?
2085
+ # p result.response
2086
+ # else
2087
+ # puts "No response received."
2088
+ # end
2089
+ #
2090
+ def inject_fault request, options = nil
2091
+ raise ::ArgumentError, "request must be provided" if request.nil?
2092
+
2093
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::InjectFaultRequest
2094
+
2095
+ # Converts hash and nil to an options object
2096
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2097
+
2098
+ # Customize the options with defaults
2099
+ metadata = @config.rpcs.inject_fault.metadata.to_h
2100
+
2101
+ # Set x-goog-api-client and x-goog-user-project headers
2102
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2103
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2104
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
2105
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2106
+
2107
+ header_params = {}
2108
+ if request.name
2109
+ header_params["name"] = request.name
2110
+ end
2111
+
2112
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2113
+ metadata[:"x-goog-request-params"] ||= request_params_header
2114
+
2115
+ options.apply_defaults timeout: @config.rpcs.inject_fault.timeout,
2116
+ metadata: metadata,
2117
+ retry_policy: @config.rpcs.inject_fault.retry_policy
2118
+
2119
+ options.apply_defaults timeout: @config.timeout,
2120
+ metadata: @config.metadata,
2121
+ retry_policy: @config.retry_policy
2122
+
2123
+ @alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
2124
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2125
+ yield response, operation if block_given?
2126
+ return response
2127
+ end
2128
+ rescue ::GRPC::BadStatus => e
2129
+ raise ::Google::Cloud::Error.from_error(e)
2130
+ end
2131
+
1660
2132
  ##
1661
2133
  # Restart an Instance in a cluster.
1662
2134
  # Imperative only.
@@ -2403,44 +2875,548 @@ module Google
2403
2875
  end
2404
2876
 
2405
2877
  ##
2406
- # Configuration class for the AlloyDBAdmin API.
2878
+ # Lists Users in a given project and location.
2407
2879
  #
2408
- # This class represents the configuration for AlloyDBAdmin,
2409
- # providing control over timeouts, retry behavior, logging, transport
2410
- # parameters, and other low-level controls. Certain parameters can also be
2411
- # applied individually to specific RPCs. See
2412
- # {::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client::Configuration::Rpcs}
2413
- # for a list of RPCs that can be configured independently.
2880
+ # @overload list_users(request, options = nil)
2881
+ # Pass arguments to `list_users` via a request object, either of type
2882
+ # {::Google::Cloud::AlloyDB::V1::ListUsersRequest} or an equivalent Hash.
2414
2883
  #
2415
- # Configuration can be applied globally to all clients, or to a single client
2416
- # on construction.
2884
+ # @param request [::Google::Cloud::AlloyDB::V1::ListUsersRequest, ::Hash]
2885
+ # A request object representing the call parameters. Required. To specify no
2886
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2887
+ # @param options [::Gapic::CallOptions, ::Hash]
2888
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2417
2889
  #
2418
- # @example
2890
+ # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2891
+ # Pass arguments to `list_users` via keyword arguments. Note that at
2892
+ # least one keyword argument is required. To specify no parameters, or to keep all
2893
+ # the default parameter values, pass an empty Hash as a request object (see above).
2419
2894
  #
2420
- # # Modify the global config, setting the timeout for
2421
- # # list_clusters to 20 seconds,
2422
- # # and all remaining timeouts to 10 seconds.
2423
- # ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.configure do |config|
2424
- # config.timeout = 10.0
2425
- # config.rpcs.list_clusters.timeout = 20.0
2426
- # end
2895
+ # @param parent [::String]
2896
+ # Required. Parent value for ListUsersRequest
2897
+ # @param page_size [::Integer]
2898
+ # Optional. Requested page size. Server may return fewer items than
2899
+ # requested. If unspecified, server will pick an appropriate default.
2900
+ # @param page_token [::String]
2901
+ # Optional. A token identifying a page of results the server should return.
2902
+ # @param filter [::String]
2903
+ # Optional. Filtering results
2904
+ # @param order_by [::String]
2905
+ # Optional. Hint for how to order the results
2427
2906
  #
2428
- # # Apply the above configuration only to a new client.
2429
- # client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new do |config|
2430
- # config.timeout = 10.0
2431
- # config.rpcs.list_clusters.timeout = 20.0
2432
- # end
2907
+ # @yield [response, operation] Access the result along with the RPC operation
2908
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1::User>]
2909
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2433
2910
  #
2434
- # @!attribute [rw] endpoint
2435
- # The hostname or hostname:port of the service endpoint.
2436
- # Defaults to `"alloydb.googleapis.com"`.
2437
- # @return [::String]
2438
- # @!attribute [rw] credentials
2439
- # Credentials to send with calls. You may provide any of the following types:
2440
- # * (`String`) The path to a service account key file in JSON format
2441
- # * (`Hash`) A service account key as a Hash
2442
- # * (`Google::Auth::Credentials`) A googleauth credentials object
2443
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2911
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1::User>]
2912
+ #
2913
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2914
+ #
2915
+ # @example Basic example
2916
+ # require "google/cloud/alloy_db/v1"
2917
+ #
2918
+ # # Create a client object. The client can be reused for multiple calls.
2919
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
2920
+ #
2921
+ # # Create a request. To set request fields, pass in keyword arguments.
2922
+ # request = Google::Cloud::AlloyDB::V1::ListUsersRequest.new
2923
+ #
2924
+ # # Call the list_users method.
2925
+ # result = client.list_users request
2926
+ #
2927
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2928
+ # # over elements, and API calls will be issued to fetch pages as needed.
2929
+ # result.each do |item|
2930
+ # # Each element is of type ::Google::Cloud::AlloyDB::V1::User.
2931
+ # p item
2932
+ # end
2933
+ #
2934
+ def list_users request, options = nil
2935
+ raise ::ArgumentError, "request must be provided" if request.nil?
2936
+
2937
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListUsersRequest
2938
+
2939
+ # Converts hash and nil to an options object
2940
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2941
+
2942
+ # Customize the options with defaults
2943
+ metadata = @config.rpcs.list_users.metadata.to_h
2944
+
2945
+ # Set x-goog-api-client and x-goog-user-project headers
2946
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2947
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2948
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
2949
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2950
+
2951
+ header_params = {}
2952
+ if request.parent
2953
+ header_params["parent"] = request.parent
2954
+ end
2955
+
2956
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2957
+ metadata[:"x-goog-request-params"] ||= request_params_header
2958
+
2959
+ options.apply_defaults timeout: @config.rpcs.list_users.timeout,
2960
+ metadata: metadata,
2961
+ retry_policy: @config.rpcs.list_users.retry_policy
2962
+
2963
+ options.apply_defaults timeout: @config.timeout,
2964
+ metadata: @config.metadata,
2965
+ retry_policy: @config.retry_policy
2966
+
2967
+ @alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
2968
+ response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
2969
+ yield response, operation if block_given?
2970
+ return response
2971
+ end
2972
+ rescue ::GRPC::BadStatus => e
2973
+ raise ::Google::Cloud::Error.from_error(e)
2974
+ end
2975
+
2976
+ ##
2977
+ # Gets details of a single User.
2978
+ #
2979
+ # @overload get_user(request, options = nil)
2980
+ # Pass arguments to `get_user` via a request object, either of type
2981
+ # {::Google::Cloud::AlloyDB::V1::GetUserRequest} or an equivalent Hash.
2982
+ #
2983
+ # @param request [::Google::Cloud::AlloyDB::V1::GetUserRequest, ::Hash]
2984
+ # A request object representing the call parameters. Required. To specify no
2985
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2986
+ # @param options [::Gapic::CallOptions, ::Hash]
2987
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2988
+ #
2989
+ # @overload get_user(name: nil)
2990
+ # Pass arguments to `get_user` via keyword arguments. Note that at
2991
+ # least one keyword argument is required. To specify no parameters, or to keep all
2992
+ # the default parameter values, pass an empty Hash as a request object (see above).
2993
+ #
2994
+ # @param name [::String]
2995
+ # Required. The name of the resource. For the required format, see the
2996
+ # comment on the User.name field.
2997
+ #
2998
+ # @yield [response, operation] Access the result along with the RPC operation
2999
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1::User]
3000
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3001
+ #
3002
+ # @return [::Google::Cloud::AlloyDB::V1::User]
3003
+ #
3004
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3005
+ #
3006
+ # @example Basic example
3007
+ # require "google/cloud/alloy_db/v1"
3008
+ #
3009
+ # # Create a client object. The client can be reused for multiple calls.
3010
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
3011
+ #
3012
+ # # Create a request. To set request fields, pass in keyword arguments.
3013
+ # request = Google::Cloud::AlloyDB::V1::GetUserRequest.new
3014
+ #
3015
+ # # Call the get_user method.
3016
+ # result = client.get_user request
3017
+ #
3018
+ # # The returned object is of type Google::Cloud::AlloyDB::V1::User.
3019
+ # p result
3020
+ #
3021
+ def get_user request, options = nil
3022
+ raise ::ArgumentError, "request must be provided" if request.nil?
3023
+
3024
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetUserRequest
3025
+
3026
+ # Converts hash and nil to an options object
3027
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3028
+
3029
+ # Customize the options with defaults
3030
+ metadata = @config.rpcs.get_user.metadata.to_h
3031
+
3032
+ # Set x-goog-api-client and x-goog-user-project headers
3033
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3034
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3035
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
3036
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3037
+
3038
+ header_params = {}
3039
+ if request.name
3040
+ header_params["name"] = request.name
3041
+ end
3042
+
3043
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3044
+ metadata[:"x-goog-request-params"] ||= request_params_header
3045
+
3046
+ options.apply_defaults timeout: @config.rpcs.get_user.timeout,
3047
+ metadata: metadata,
3048
+ retry_policy: @config.rpcs.get_user.retry_policy
3049
+
3050
+ options.apply_defaults timeout: @config.timeout,
3051
+ metadata: @config.metadata,
3052
+ retry_policy: @config.retry_policy
3053
+
3054
+ @alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
3055
+ yield response, operation if block_given?
3056
+ return response
3057
+ end
3058
+ rescue ::GRPC::BadStatus => e
3059
+ raise ::Google::Cloud::Error.from_error(e)
3060
+ end
3061
+
3062
+ ##
3063
+ # Creates a new User in a given project, location, and cluster.
3064
+ #
3065
+ # @overload create_user(request, options = nil)
3066
+ # Pass arguments to `create_user` via a request object, either of type
3067
+ # {::Google::Cloud::AlloyDB::V1::CreateUserRequest} or an equivalent Hash.
3068
+ #
3069
+ # @param request [::Google::Cloud::AlloyDB::V1::CreateUserRequest, ::Hash]
3070
+ # A request object representing the call parameters. Required. To specify no
3071
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3072
+ # @param options [::Gapic::CallOptions, ::Hash]
3073
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3074
+ #
3075
+ # @overload create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil)
3076
+ # Pass arguments to `create_user` via keyword arguments. Note that at
3077
+ # least one keyword argument is required. To specify no parameters, or to keep all
3078
+ # the default parameter values, pass an empty Hash as a request object (see above).
3079
+ #
3080
+ # @param parent [::String]
3081
+ # Required. Value for parent.
3082
+ # @param user_id [::String]
3083
+ # Required. ID of the requesting object.
3084
+ # @param user [::Google::Cloud::AlloyDB::V1::User, ::Hash]
3085
+ # Required. The resource being created
3086
+ # @param request_id [::String]
3087
+ # Optional. An optional request ID to identify requests. Specify a unique
3088
+ # request ID so that if you must retry your request, the server will know to
3089
+ # ignore the request if it has already been completed. The server will
3090
+ # guarantee that for at least 60 minutes since the first request.
3091
+ #
3092
+ # For example, consider a situation where you make an initial request and
3093
+ # the request times out. If you make the request again with the same request
3094
+ # ID, the server can check if original operation with the same request ID
3095
+ # was received, and if so, will ignore the second request. This prevents
3096
+ # clients from accidentally creating duplicate commitments.
3097
+ #
3098
+ # The request ID must be a valid UUID with the exception that zero UUID is
3099
+ # not supported (00000000-0000-0000-0000-000000000000).
3100
+ # @param validate_only [::Boolean]
3101
+ # Optional. If set, the backend validates the request, but doesn't actually
3102
+ # execute it.
3103
+ #
3104
+ # @yield [response, operation] Access the result along with the RPC operation
3105
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1::User]
3106
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3107
+ #
3108
+ # @return [::Google::Cloud::AlloyDB::V1::User]
3109
+ #
3110
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3111
+ #
3112
+ # @example Basic example
3113
+ # require "google/cloud/alloy_db/v1"
3114
+ #
3115
+ # # Create a client object. The client can be reused for multiple calls.
3116
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
3117
+ #
3118
+ # # Create a request. To set request fields, pass in keyword arguments.
3119
+ # request = Google::Cloud::AlloyDB::V1::CreateUserRequest.new
3120
+ #
3121
+ # # Call the create_user method.
3122
+ # result = client.create_user request
3123
+ #
3124
+ # # The returned object is of type Google::Cloud::AlloyDB::V1::User.
3125
+ # p result
3126
+ #
3127
+ def create_user request, options = nil
3128
+ raise ::ArgumentError, "request must be provided" if request.nil?
3129
+
3130
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateUserRequest
3131
+
3132
+ # Converts hash and nil to an options object
3133
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3134
+
3135
+ # Customize the options with defaults
3136
+ metadata = @config.rpcs.create_user.metadata.to_h
3137
+
3138
+ # Set x-goog-api-client and x-goog-user-project headers
3139
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3140
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3141
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
3142
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3143
+
3144
+ header_params = {}
3145
+ if request.parent
3146
+ header_params["parent"] = request.parent
3147
+ end
3148
+
3149
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3150
+ metadata[:"x-goog-request-params"] ||= request_params_header
3151
+
3152
+ options.apply_defaults timeout: @config.rpcs.create_user.timeout,
3153
+ metadata: metadata,
3154
+ retry_policy: @config.rpcs.create_user.retry_policy
3155
+
3156
+ options.apply_defaults timeout: @config.timeout,
3157
+ metadata: @config.metadata,
3158
+ retry_policy: @config.retry_policy
3159
+
3160
+ @alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
3161
+ yield response, operation if block_given?
3162
+ return response
3163
+ end
3164
+ rescue ::GRPC::BadStatus => e
3165
+ raise ::Google::Cloud::Error.from_error(e)
3166
+ end
3167
+
3168
+ ##
3169
+ # Updates the parameters of a single User.
3170
+ #
3171
+ # @overload update_user(request, options = nil)
3172
+ # Pass arguments to `update_user` via a request object, either of type
3173
+ # {::Google::Cloud::AlloyDB::V1::UpdateUserRequest} or an equivalent Hash.
3174
+ #
3175
+ # @param request [::Google::Cloud::AlloyDB::V1::UpdateUserRequest, ::Hash]
3176
+ # A request object representing the call parameters. Required. To specify no
3177
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3178
+ # @param options [::Gapic::CallOptions, ::Hash]
3179
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3180
+ #
3181
+ # @overload update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil)
3182
+ # Pass arguments to `update_user` via keyword arguments. Note that at
3183
+ # least one keyword argument is required. To specify no parameters, or to keep all
3184
+ # the default parameter values, pass an empty Hash as a request object (see above).
3185
+ #
3186
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3187
+ # Optional. Field mask is used to specify the fields to be overwritten in the
3188
+ # User resource by the update.
3189
+ # The fields specified in the update_mask are relative to the resource, not
3190
+ # the full request. A field will be overwritten if it is in the mask. If the
3191
+ # user does not provide a mask then all fields will be overwritten.
3192
+ # @param user [::Google::Cloud::AlloyDB::V1::User, ::Hash]
3193
+ # Required. The resource being updated
3194
+ # @param request_id [::String]
3195
+ # Optional. An optional request ID to identify requests. Specify a unique
3196
+ # request ID so that if you must retry your request, the server will know to
3197
+ # ignore the request if it has already been completed. The server will
3198
+ # guarantee that for at least 60 minutes since the first request.
3199
+ #
3200
+ # For example, consider a situation where you make an initial request and
3201
+ # the request times out. If you make the request again with the same request
3202
+ # ID, the server can check if original operation with the same request ID
3203
+ # was received, and if so, will ignore the second request. This prevents
3204
+ # clients from accidentally creating duplicate commitments.
3205
+ #
3206
+ # The request ID must be a valid UUID with the exception that zero UUID is
3207
+ # not supported (00000000-0000-0000-0000-000000000000).
3208
+ # @param validate_only [::Boolean]
3209
+ # Optional. If set, the backend validates the request, but doesn't actually
3210
+ # execute it.
3211
+ # @param allow_missing [::Boolean]
3212
+ # Optional. Allow missing fields in the update mask.
3213
+ #
3214
+ # @yield [response, operation] Access the result along with the RPC operation
3215
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1::User]
3216
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3217
+ #
3218
+ # @return [::Google::Cloud::AlloyDB::V1::User]
3219
+ #
3220
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3221
+ #
3222
+ # @example Basic example
3223
+ # require "google/cloud/alloy_db/v1"
3224
+ #
3225
+ # # Create a client object. The client can be reused for multiple calls.
3226
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
3227
+ #
3228
+ # # Create a request. To set request fields, pass in keyword arguments.
3229
+ # request = Google::Cloud::AlloyDB::V1::UpdateUserRequest.new
3230
+ #
3231
+ # # Call the update_user method.
3232
+ # result = client.update_user request
3233
+ #
3234
+ # # The returned object is of type Google::Cloud::AlloyDB::V1::User.
3235
+ # p result
3236
+ #
3237
+ def update_user request, options = nil
3238
+ raise ::ArgumentError, "request must be provided" if request.nil?
3239
+
3240
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateUserRequest
3241
+
3242
+ # Converts hash and nil to an options object
3243
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3244
+
3245
+ # Customize the options with defaults
3246
+ metadata = @config.rpcs.update_user.metadata.to_h
3247
+
3248
+ # Set x-goog-api-client and x-goog-user-project headers
3249
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3250
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3251
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
3252
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3253
+
3254
+ header_params = {}
3255
+ if request.user&.name
3256
+ header_params["user.name"] = request.user.name
3257
+ end
3258
+
3259
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3260
+ metadata[:"x-goog-request-params"] ||= request_params_header
3261
+
3262
+ options.apply_defaults timeout: @config.rpcs.update_user.timeout,
3263
+ metadata: metadata,
3264
+ retry_policy: @config.rpcs.update_user.retry_policy
3265
+
3266
+ options.apply_defaults timeout: @config.timeout,
3267
+ metadata: @config.metadata,
3268
+ retry_policy: @config.retry_policy
3269
+
3270
+ @alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
3271
+ yield response, operation if block_given?
3272
+ return response
3273
+ end
3274
+ rescue ::GRPC::BadStatus => e
3275
+ raise ::Google::Cloud::Error.from_error(e)
3276
+ end
3277
+
3278
+ ##
3279
+ # Deletes a single User.
3280
+ #
3281
+ # @overload delete_user(request, options = nil)
3282
+ # Pass arguments to `delete_user` via a request object, either of type
3283
+ # {::Google::Cloud::AlloyDB::V1::DeleteUserRequest} or an equivalent Hash.
3284
+ #
3285
+ # @param request [::Google::Cloud::AlloyDB::V1::DeleteUserRequest, ::Hash]
3286
+ # A request object representing the call parameters. Required. To specify no
3287
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3288
+ # @param options [::Gapic::CallOptions, ::Hash]
3289
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3290
+ #
3291
+ # @overload delete_user(name: nil, request_id: nil, validate_only: nil)
3292
+ # Pass arguments to `delete_user` via keyword arguments. Note that at
3293
+ # least one keyword argument is required. To specify no parameters, or to keep all
3294
+ # the default parameter values, pass an empty Hash as a request object (see above).
3295
+ #
3296
+ # @param name [::String]
3297
+ # Required. The name of the resource. For the required format, see the
3298
+ # comment on the User.name field.
3299
+ # @param request_id [::String]
3300
+ # Optional. An optional request ID to identify requests. Specify a unique
3301
+ # request ID so that if you must retry your request, the server will know to
3302
+ # ignore the request if it has already been completed. The server will
3303
+ # guarantee that for at least 60 minutes after the first request.
3304
+ #
3305
+ # For example, consider a situation where you make an initial request and
3306
+ # the request times out. If you make the request again with the same request
3307
+ # ID, the server can check if original operation with the same request ID
3308
+ # was received, and if so, will ignore the second request. This prevents
3309
+ # clients from accidentally creating duplicate commitments.
3310
+ #
3311
+ # The request ID must be a valid UUID with the exception that zero UUID is
3312
+ # not supported (00000000-0000-0000-0000-000000000000).
3313
+ # @param validate_only [::Boolean]
3314
+ # Optional. If set, the backend validates the request, but doesn't actually
3315
+ # execute it.
3316
+ #
3317
+ # @yield [response, operation] Access the result along with the RPC operation
3318
+ # @yieldparam response [::Google::Protobuf::Empty]
3319
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3320
+ #
3321
+ # @return [::Google::Protobuf::Empty]
3322
+ #
3323
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3324
+ #
3325
+ # @example Basic example
3326
+ # require "google/cloud/alloy_db/v1"
3327
+ #
3328
+ # # Create a client object. The client can be reused for multiple calls.
3329
+ # client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new
3330
+ #
3331
+ # # Create a request. To set request fields, pass in keyword arguments.
3332
+ # request = Google::Cloud::AlloyDB::V1::DeleteUserRequest.new
3333
+ #
3334
+ # # Call the delete_user method.
3335
+ # result = client.delete_user request
3336
+ #
3337
+ # # The returned object is of type Google::Protobuf::Empty.
3338
+ # p result
3339
+ #
3340
+ def delete_user request, options = nil
3341
+ raise ::ArgumentError, "request must be provided" if request.nil?
3342
+
3343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteUserRequest
3344
+
3345
+ # Converts hash and nil to an options object
3346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3347
+
3348
+ # Customize the options with defaults
3349
+ metadata = @config.rpcs.delete_user.metadata.to_h
3350
+
3351
+ # Set x-goog-api-client and x-goog-user-project headers
3352
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3354
+ gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION
3355
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3356
+
3357
+ header_params = {}
3358
+ if request.name
3359
+ header_params["name"] = request.name
3360
+ end
3361
+
3362
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3363
+ metadata[:"x-goog-request-params"] ||= request_params_header
3364
+
3365
+ options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
3366
+ metadata: metadata,
3367
+ retry_policy: @config.rpcs.delete_user.retry_policy
3368
+
3369
+ options.apply_defaults timeout: @config.timeout,
3370
+ metadata: @config.metadata,
3371
+ retry_policy: @config.retry_policy
3372
+
3373
+ @alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
3374
+ yield response, operation if block_given?
3375
+ return response
3376
+ end
3377
+ rescue ::GRPC::BadStatus => e
3378
+ raise ::Google::Cloud::Error.from_error(e)
3379
+ end
3380
+
3381
+ ##
3382
+ # Configuration class for the AlloyDBAdmin API.
3383
+ #
3384
+ # This class represents the configuration for AlloyDBAdmin,
3385
+ # providing control over timeouts, retry behavior, logging, transport
3386
+ # parameters, and other low-level controls. Certain parameters can also be
3387
+ # applied individually to specific RPCs. See
3388
+ # {::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client::Configuration::Rpcs}
3389
+ # for a list of RPCs that can be configured independently.
3390
+ #
3391
+ # Configuration can be applied globally to all clients, or to a single client
3392
+ # on construction.
3393
+ #
3394
+ # @example
3395
+ #
3396
+ # # Modify the global config, setting the timeout for
3397
+ # # list_clusters to 20 seconds,
3398
+ # # and all remaining timeouts to 10 seconds.
3399
+ # ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.configure do |config|
3400
+ # config.timeout = 10.0
3401
+ # config.rpcs.list_clusters.timeout = 20.0
3402
+ # end
3403
+ #
3404
+ # # Apply the above configuration only to a new client.
3405
+ # client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new do |config|
3406
+ # config.timeout = 10.0
3407
+ # config.rpcs.list_clusters.timeout = 20.0
3408
+ # end
3409
+ #
3410
+ # @!attribute [rw] endpoint
3411
+ # The hostname or hostname:port of the service endpoint.
3412
+ # Defaults to `"alloydb.googleapis.com"`.
3413
+ # @return [::String]
3414
+ # @!attribute [rw] credentials
3415
+ # Credentials to send with calls. You may provide any of the following types:
3416
+ # * (`String`) The path to a service account key file in JSON format
3417
+ # * (`Hash`) A service account key as a Hash
3418
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3419
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2444
3420
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2445
3421
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2446
3422
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
@@ -2484,7 +3460,9 @@ module Google
2484
3460
  class Configuration
2485
3461
  extend ::Gapic::Config
2486
3462
 
2487
- config_attr :endpoint, "alloydb.googleapis.com", ::String
3463
+ DEFAULT_ENDPOINT = "alloydb.googleapis.com"
3464
+
3465
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2488
3466
  config_attr :credentials, nil do |value|
2489
3467
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2490
3468
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -2563,11 +3541,21 @@ module Google
2563
3541
  #
2564
3542
  attr_reader :delete_cluster
2565
3543
  ##
3544
+ # RPC-specific configuration for `promote_cluster`
3545
+ # @return [::Gapic::Config::Method]
3546
+ #
3547
+ attr_reader :promote_cluster
3548
+ ##
2566
3549
  # RPC-specific configuration for `restore_cluster`
2567
3550
  # @return [::Gapic::Config::Method]
2568
3551
  #
2569
3552
  attr_reader :restore_cluster
2570
3553
  ##
3554
+ # RPC-specific configuration for `create_secondary_cluster`
3555
+ # @return [::Gapic::Config::Method]
3556
+ #
3557
+ attr_reader :create_secondary_cluster
3558
+ ##
2571
3559
  # RPC-specific configuration for `list_instances`
2572
3560
  # @return [::Gapic::Config::Method]
2573
3561
  #
@@ -2583,6 +3571,11 @@ module Google
2583
3571
  #
2584
3572
  attr_reader :create_instance
2585
3573
  ##
3574
+ # RPC-specific configuration for `create_secondary_instance`
3575
+ # @return [::Gapic::Config::Method]
3576
+ #
3577
+ attr_reader :create_secondary_instance
3578
+ ##
2586
3579
  # RPC-specific configuration for `batch_create_instances`
2587
3580
  # @return [::Gapic::Config::Method]
2588
3581
  #
@@ -2603,6 +3596,11 @@ module Google
2603
3596
  #
2604
3597
  attr_reader :failover_instance
2605
3598
  ##
3599
+ # RPC-specific configuration for `inject_fault`
3600
+ # @return [::Gapic::Config::Method]
3601
+ #
3602
+ attr_reader :inject_fault
3603
+ ##
2606
3604
  # RPC-specific configuration for `restart_instance`
2607
3605
  # @return [::Gapic::Config::Method]
2608
3606
  #
@@ -2637,6 +3635,31 @@ module Google
2637
3635
  # @return [::Gapic::Config::Method]
2638
3636
  #
2639
3637
  attr_reader :list_supported_database_flags
3638
+ ##
3639
+ # RPC-specific configuration for `list_users`
3640
+ # @return [::Gapic::Config::Method]
3641
+ #
3642
+ attr_reader :list_users
3643
+ ##
3644
+ # RPC-specific configuration for `get_user`
3645
+ # @return [::Gapic::Config::Method]
3646
+ #
3647
+ attr_reader :get_user
3648
+ ##
3649
+ # RPC-specific configuration for `create_user`
3650
+ # @return [::Gapic::Config::Method]
3651
+ #
3652
+ attr_reader :create_user
3653
+ ##
3654
+ # RPC-specific configuration for `update_user`
3655
+ # @return [::Gapic::Config::Method]
3656
+ #
3657
+ attr_reader :update_user
3658
+ ##
3659
+ # RPC-specific configuration for `delete_user`
3660
+ # @return [::Gapic::Config::Method]
3661
+ #
3662
+ attr_reader :delete_user
2640
3663
 
2641
3664
  # @private
2642
3665
  def initialize parent_rpcs = nil
@@ -2650,14 +3673,20 @@ module Google
2650
3673
  @update_cluster = ::Gapic::Config::Method.new update_cluster_config
2651
3674
  delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
2652
3675
  @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
3676
+ promote_cluster_config = parent_rpcs.promote_cluster if parent_rpcs.respond_to? :promote_cluster
3677
+ @promote_cluster = ::Gapic::Config::Method.new promote_cluster_config
2653
3678
  restore_cluster_config = parent_rpcs.restore_cluster if parent_rpcs.respond_to? :restore_cluster
2654
3679
  @restore_cluster = ::Gapic::Config::Method.new restore_cluster_config
3680
+ create_secondary_cluster_config = parent_rpcs.create_secondary_cluster if parent_rpcs.respond_to? :create_secondary_cluster
3681
+ @create_secondary_cluster = ::Gapic::Config::Method.new create_secondary_cluster_config
2655
3682
  list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
2656
3683
  @list_instances = ::Gapic::Config::Method.new list_instances_config
2657
3684
  get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
2658
3685
  @get_instance = ::Gapic::Config::Method.new get_instance_config
2659
3686
  create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
2660
3687
  @create_instance = ::Gapic::Config::Method.new create_instance_config
3688
+ create_secondary_instance_config = parent_rpcs.create_secondary_instance if parent_rpcs.respond_to? :create_secondary_instance
3689
+ @create_secondary_instance = ::Gapic::Config::Method.new create_secondary_instance_config
2661
3690
  batch_create_instances_config = parent_rpcs.batch_create_instances if parent_rpcs.respond_to? :batch_create_instances
2662
3691
  @batch_create_instances = ::Gapic::Config::Method.new batch_create_instances_config
2663
3692
  update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
@@ -2666,6 +3695,8 @@ module Google
2666
3695
  @delete_instance = ::Gapic::Config::Method.new delete_instance_config
2667
3696
  failover_instance_config = parent_rpcs.failover_instance if parent_rpcs.respond_to? :failover_instance
2668
3697
  @failover_instance = ::Gapic::Config::Method.new failover_instance_config
3698
+ inject_fault_config = parent_rpcs.inject_fault if parent_rpcs.respond_to? :inject_fault
3699
+ @inject_fault = ::Gapic::Config::Method.new inject_fault_config
2669
3700
  restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
2670
3701
  @restart_instance = ::Gapic::Config::Method.new restart_instance_config
2671
3702
  list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
@@ -2680,6 +3711,16 @@ module Google
2680
3711
  @delete_backup = ::Gapic::Config::Method.new delete_backup_config
2681
3712
  list_supported_database_flags_config = parent_rpcs.list_supported_database_flags if parent_rpcs.respond_to? :list_supported_database_flags
2682
3713
  @list_supported_database_flags = ::Gapic::Config::Method.new list_supported_database_flags_config
3714
+ list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
3715
+ @list_users = ::Gapic::Config::Method.new list_users_config
3716
+ get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
3717
+ @get_user = ::Gapic::Config::Method.new get_user_config
3718
+ create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
3719
+ @create_user = ::Gapic::Config::Method.new create_user_config
3720
+ update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
3721
+ @update_user = ::Gapic::Config::Method.new update_user_config
3722
+ delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
3723
+ @delete_user = ::Gapic::Config::Method.new delete_user_config
2683
3724
 
2684
3725
  yield self if block_given?
2685
3726
  end