google-cloud-memorystore-v1beta 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -939,6 +939,1801 @@ module Google
939
939
  raise ::Google::Cloud::Error.from_error(e)
940
940
  end
941
941
 
942
+ ##
943
+ # Reschedules upcoming maintenance event.
944
+ #
945
+ # @overload reschedule_maintenance(request, options = nil)
946
+ # Pass arguments to `reschedule_maintenance` via a request object, either of type
947
+ # {::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest} or an equivalent Hash.
948
+ #
949
+ # @param request [::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest, ::Hash]
950
+ # A request object representing the call parameters. Required. To specify no
951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
952
+ # @param options [::Gapic::CallOptions, ::Hash]
953
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
954
+ #
955
+ # @overload reschedule_maintenance(name: nil, reschedule_type: nil, schedule_time: nil)
956
+ # Pass arguments to `reschedule_maintenance` via keyword arguments. Note that at
957
+ # least one keyword argument is required. To specify no parameters, or to keep all
958
+ # the default parameter values, pass an empty Hash as a request object (see above).
959
+ #
960
+ # @param name [::String]
961
+ # Required. Name of the instance to reschedule maintenance for:
962
+ # `projects/{project}/locations/{location_id}/instances/{instance}`
963
+ # @param reschedule_type [::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest::RescheduleType]
964
+ # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.
965
+ # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash]
966
+ # Optional. Timestamp when the maintenance shall be rescheduled to if
967
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format.
968
+ # Example: `2012-11-15T16:19:00.094Z`.
969
+ #
970
+ # @yield [response, operation] Access the result along with the RPC operation
971
+ # @yieldparam response [::Gapic::Operation]
972
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
973
+ #
974
+ # @return [::Gapic::Operation]
975
+ #
976
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
977
+ #
978
+ # @example Basic example
979
+ # require "google/cloud/memorystore/v1beta"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest.new
986
+ #
987
+ # # Call the reschedule_maintenance method.
988
+ # result = client.reschedule_maintenance request
989
+ #
990
+ # # The returned object is of type Gapic::Operation. You can use it to
991
+ # # check the status of an operation, cancel it, or wait for results.
992
+ # # Here is how to wait for a response.
993
+ # result.wait_until_done! timeout: 60
994
+ # if result.response?
995
+ # p result.response
996
+ # else
997
+ # puts "No response received."
998
+ # end
999
+ #
1000
+ def reschedule_maintenance request, options = nil
1001
+ raise ::ArgumentError, "request must be provided" if request.nil?
1002
+
1003
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest
1004
+
1005
+ # Converts hash and nil to an options object
1006
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1007
+
1008
+ # Customize the options with defaults
1009
+ metadata = @config.rpcs.reschedule_maintenance.metadata.to_h
1010
+
1011
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1012
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1013
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1014
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1015
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1016
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1018
+ header_params = {}
1019
+ if request.name
1020
+ header_params["name"] = request.name
1021
+ end
1022
+
1023
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1024
+ metadata[:"x-goog-request-params"] ||= request_params_header
1025
+
1026
+ options.apply_defaults timeout: @config.rpcs.reschedule_maintenance.timeout,
1027
+ metadata: metadata,
1028
+ retry_policy: @config.rpcs.reschedule_maintenance.retry_policy
1029
+
1030
+ options.apply_defaults timeout: @config.timeout,
1031
+ metadata: @config.metadata,
1032
+ retry_policy: @config.retry_policy
1033
+
1034
+ @memorystore_stub.call_rpc :reschedule_maintenance, request, options: options do |response, operation|
1035
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1036
+ yield response, operation if block_given?
1037
+ throw :response, response
1038
+ end
1039
+ rescue ::GRPC::BadStatus => e
1040
+ raise ::Google::Cloud::Error.from_error(e)
1041
+ end
1042
+
1043
+ ##
1044
+ # Lists all backup collections owned by a consumer project in either the
1045
+ # specified location (region) or all locations.
1046
+ #
1047
+ # If `location_id` is specified as `-` (wildcard), then all regions
1048
+ # available to the project are queried, and the results are aggregated.
1049
+ #
1050
+ # @overload list_backup_collections(request, options = nil)
1051
+ # Pass arguments to `list_backup_collections` via a request object, either of type
1052
+ # {::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest} or an equivalent Hash.
1053
+ #
1054
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest, ::Hash]
1055
+ # A request object representing the call parameters. Required. To specify no
1056
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1057
+ # @param options [::Gapic::CallOptions, ::Hash]
1058
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1059
+ #
1060
+ # @overload list_backup_collections(parent: nil, page_size: nil, page_token: nil)
1061
+ # Pass arguments to `list_backup_collections` via keyword arguments. Note that at
1062
+ # least one keyword argument is required. To specify no parameters, or to keep all
1063
+ # the default parameter values, pass an empty Hash as a request object (see above).
1064
+ #
1065
+ # @param parent [::String]
1066
+ # Required. The resource name of the backupCollection location using the
1067
+ # form:
1068
+ # `projects/{project_id}/locations/{location_id}`
1069
+ # where `location_id` refers to a Google Cloud region.
1070
+ # @param page_size [::Integer]
1071
+ # Optional. The maximum number of items to return.
1072
+ #
1073
+ # If not specified, a default value of 1000 will be used by the service.
1074
+ # Regardless of the page_size value, the response may include a partial list
1075
+ # and a caller should only rely on response's
1076
+ # `next_page_token`
1077
+ # to determine if there are more clusters left to be queried.
1078
+ # @param page_token [::String]
1079
+ # Optional. The `next_page_token` value returned from a previous
1080
+ # `ListBackupCollections` request, if any.
1081
+ #
1082
+ # @yield [response, operation] Access the result along with the RPC operation
1083
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::BackupCollection>]
1084
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1085
+ #
1086
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::BackupCollection>]
1087
+ #
1088
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1089
+ #
1090
+ # @example Basic example
1091
+ # require "google/cloud/memorystore/v1beta"
1092
+ #
1093
+ # # Create a client object. The client can be reused for multiple calls.
1094
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1095
+ #
1096
+ # # Create a request. To set request fields, pass in keyword arguments.
1097
+ # request = Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest.new
1098
+ #
1099
+ # # Call the list_backup_collections method.
1100
+ # result = client.list_backup_collections request
1101
+ #
1102
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1103
+ # # over elements, and API calls will be issued to fetch pages as needed.
1104
+ # result.each do |item|
1105
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::BackupCollection.
1106
+ # p item
1107
+ # end
1108
+ #
1109
+ def list_backup_collections request, options = nil
1110
+ raise ::ArgumentError, "request must be provided" if request.nil?
1111
+
1112
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest
1113
+
1114
+ # Converts hash and nil to an options object
1115
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1116
+
1117
+ # Customize the options with defaults
1118
+ metadata = @config.rpcs.list_backup_collections.metadata.to_h
1119
+
1120
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1121
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1122
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1123
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1124
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1125
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1126
+
1127
+ header_params = {}
1128
+ if request.parent
1129
+ header_params["parent"] = request.parent
1130
+ end
1131
+
1132
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1133
+ metadata[:"x-goog-request-params"] ||= request_params_header
1134
+
1135
+ options.apply_defaults timeout: @config.rpcs.list_backup_collections.timeout,
1136
+ metadata: metadata,
1137
+ retry_policy: @config.rpcs.list_backup_collections.retry_policy
1138
+
1139
+ options.apply_defaults timeout: @config.timeout,
1140
+ metadata: @config.metadata,
1141
+ retry_policy: @config.retry_policy
1142
+
1143
+ @memorystore_stub.call_rpc :list_backup_collections, request, options: options do |response, operation|
1144
+ response = ::Gapic::PagedEnumerable.new @memorystore_stub, :list_backup_collections, request, response, operation, options
1145
+ yield response, operation if block_given?
1146
+ throw :response, response
1147
+ end
1148
+ rescue ::GRPC::BadStatus => e
1149
+ raise ::Google::Cloud::Error.from_error(e)
1150
+ end
1151
+
1152
+ ##
1153
+ # Get a backup collection.
1154
+ #
1155
+ # @overload get_backup_collection(request, options = nil)
1156
+ # Pass arguments to `get_backup_collection` via a request object, either of type
1157
+ # {::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest} or an equivalent Hash.
1158
+ #
1159
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest, ::Hash]
1160
+ # A request object representing the call parameters. Required. To specify no
1161
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1162
+ # @param options [::Gapic::CallOptions, ::Hash]
1163
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1164
+ #
1165
+ # @overload get_backup_collection(name: nil)
1166
+ # Pass arguments to `get_backup_collection` via keyword arguments. Note that at
1167
+ # least one keyword argument is required. To specify no parameters, or to keep all
1168
+ # the default parameter values, pass an empty Hash as a request object (see above).
1169
+ #
1170
+ # @param name [::String]
1171
+ # Required. Instance backupCollection resource name using the form:
1172
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
1173
+ # where `location_id` refers to a Google Cloud region.
1174
+ #
1175
+ # @yield [response, operation] Access the result along with the RPC operation
1176
+ # @yieldparam response [::Google::Cloud::Memorystore::V1beta::BackupCollection]
1177
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1178
+ #
1179
+ # @return [::Google::Cloud::Memorystore::V1beta::BackupCollection]
1180
+ #
1181
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1182
+ #
1183
+ # @example Basic example
1184
+ # require "google/cloud/memorystore/v1beta"
1185
+ #
1186
+ # # Create a client object. The client can be reused for multiple calls.
1187
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1188
+ #
1189
+ # # Create a request. To set request fields, pass in keyword arguments.
1190
+ # request = Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest.new
1191
+ #
1192
+ # # Call the get_backup_collection method.
1193
+ # result = client.get_backup_collection request
1194
+ #
1195
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::BackupCollection.
1196
+ # p result
1197
+ #
1198
+ def get_backup_collection request, options = nil
1199
+ raise ::ArgumentError, "request must be provided" if request.nil?
1200
+
1201
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest
1202
+
1203
+ # Converts hash and nil to an options object
1204
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1205
+
1206
+ # Customize the options with defaults
1207
+ metadata = @config.rpcs.get_backup_collection.metadata.to_h
1208
+
1209
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1210
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1211
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1212
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1213
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1214
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1215
+
1216
+ header_params = {}
1217
+ if request.name
1218
+ header_params["name"] = request.name
1219
+ end
1220
+
1221
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1222
+ metadata[:"x-goog-request-params"] ||= request_params_header
1223
+
1224
+ options.apply_defaults timeout: @config.rpcs.get_backup_collection.timeout,
1225
+ metadata: metadata,
1226
+ retry_policy: @config.rpcs.get_backup_collection.retry_policy
1227
+
1228
+ options.apply_defaults timeout: @config.timeout,
1229
+ metadata: @config.metadata,
1230
+ retry_policy: @config.retry_policy
1231
+
1232
+ @memorystore_stub.call_rpc :get_backup_collection, request, options: options do |response, operation|
1233
+ yield response, operation if block_given?
1234
+ end
1235
+ rescue ::GRPC::BadStatus => e
1236
+ raise ::Google::Cloud::Error.from_error(e)
1237
+ end
1238
+
1239
+ ##
1240
+ # Lists all backups owned by a backup collection.
1241
+ #
1242
+ # @overload list_backups(request, options = nil)
1243
+ # Pass arguments to `list_backups` via a request object, either of type
1244
+ # {::Google::Cloud::Memorystore::V1beta::ListBackupsRequest} or an equivalent Hash.
1245
+ #
1246
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListBackupsRequest, ::Hash]
1247
+ # A request object representing the call parameters. Required. To specify no
1248
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1249
+ # @param options [::Gapic::CallOptions, ::Hash]
1250
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1251
+ #
1252
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil)
1253
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1254
+ # least one keyword argument is required. To specify no parameters, or to keep all
1255
+ # the default parameter values, pass an empty Hash as a request object (see above).
1256
+ #
1257
+ # @param parent [::String]
1258
+ # Required. The resource name of the backupCollection using the form:
1259
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
1260
+ # @param page_size [::Integer]
1261
+ # Optional. The maximum number of items to return.
1262
+ #
1263
+ # If not specified, a default value of 1000 will be used by the service.
1264
+ # Regardless of the page_size value, the response may include a partial list
1265
+ # and a caller should only rely on response's
1266
+ # `next_page_token`
1267
+ # to determine if there are more clusters left to be queried.
1268
+ # @param page_token [::String]
1269
+ # Optional. The `next_page_token` value returned from a previous
1270
+ # `ListBackupCollections` request, if any.
1271
+ #
1272
+ # @yield [response, operation] Access the result along with the RPC operation
1273
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::Backup>]
1274
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1275
+ #
1276
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::Backup>]
1277
+ #
1278
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1279
+ #
1280
+ # @example Basic example
1281
+ # require "google/cloud/memorystore/v1beta"
1282
+ #
1283
+ # # Create a client object. The client can be reused for multiple calls.
1284
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1285
+ #
1286
+ # # Create a request. To set request fields, pass in keyword arguments.
1287
+ # request = Google::Cloud::Memorystore::V1beta::ListBackupsRequest.new
1288
+ #
1289
+ # # Call the list_backups method.
1290
+ # result = client.list_backups request
1291
+ #
1292
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1293
+ # # over elements, and API calls will be issued to fetch pages as needed.
1294
+ # result.each do |item|
1295
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::Backup.
1296
+ # p item
1297
+ # end
1298
+ #
1299
+ def list_backups request, options = nil
1300
+ raise ::ArgumentError, "request must be provided" if request.nil?
1301
+
1302
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListBackupsRequest
1303
+
1304
+ # Converts hash and nil to an options object
1305
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1306
+
1307
+ # Customize the options with defaults
1308
+ metadata = @config.rpcs.list_backups.metadata.to_h
1309
+
1310
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1311
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1312
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1313
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1314
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1315
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1316
+
1317
+ header_params = {}
1318
+ if request.parent
1319
+ header_params["parent"] = request.parent
1320
+ end
1321
+
1322
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1323
+ metadata[:"x-goog-request-params"] ||= request_params_header
1324
+
1325
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1326
+ metadata: metadata,
1327
+ retry_policy: @config.rpcs.list_backups.retry_policy
1328
+
1329
+ options.apply_defaults timeout: @config.timeout,
1330
+ metadata: @config.metadata,
1331
+ retry_policy: @config.retry_policy
1332
+
1333
+ @memorystore_stub.call_rpc :list_backups, request, options: options do |response, operation|
1334
+ response = ::Gapic::PagedEnumerable.new @memorystore_stub, :list_backups, request, response, operation, options
1335
+ yield response, operation if block_given?
1336
+ throw :response, response
1337
+ end
1338
+ rescue ::GRPC::BadStatus => e
1339
+ raise ::Google::Cloud::Error.from_error(e)
1340
+ end
1341
+
1342
+ ##
1343
+ # Gets the details of a specific backup.
1344
+ #
1345
+ # @overload get_backup(request, options = nil)
1346
+ # Pass arguments to `get_backup` via a request object, either of type
1347
+ # {::Google::Cloud::Memorystore::V1beta::GetBackupRequest} or an equivalent Hash.
1348
+ #
1349
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetBackupRequest, ::Hash]
1350
+ # A request object representing the call parameters. Required. To specify no
1351
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1352
+ # @param options [::Gapic::CallOptions, ::Hash]
1353
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1354
+ #
1355
+ # @overload get_backup(name: nil)
1356
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1357
+ # least one keyword argument is required. To specify no parameters, or to keep all
1358
+ # the default parameter values, pass an empty Hash as a request object (see above).
1359
+ #
1360
+ # @param name [::String]
1361
+ # Required. Instance backup resource name using the form:
1362
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1363
+ #
1364
+ # @yield [response, operation] Access the result along with the RPC operation
1365
+ # @yieldparam response [::Google::Cloud::Memorystore::V1beta::Backup]
1366
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1367
+ #
1368
+ # @return [::Google::Cloud::Memorystore::V1beta::Backup]
1369
+ #
1370
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1371
+ #
1372
+ # @example Basic example
1373
+ # require "google/cloud/memorystore/v1beta"
1374
+ #
1375
+ # # Create a client object. The client can be reused for multiple calls.
1376
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1377
+ #
1378
+ # # Create a request. To set request fields, pass in keyword arguments.
1379
+ # request = Google::Cloud::Memorystore::V1beta::GetBackupRequest.new
1380
+ #
1381
+ # # Call the get_backup method.
1382
+ # result = client.get_backup request
1383
+ #
1384
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::Backup.
1385
+ # p result
1386
+ #
1387
+ def get_backup request, options = nil
1388
+ raise ::ArgumentError, "request must be provided" if request.nil?
1389
+
1390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetBackupRequest
1391
+
1392
+ # Converts hash and nil to an options object
1393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1394
+
1395
+ # Customize the options with defaults
1396
+ metadata = @config.rpcs.get_backup.metadata.to_h
1397
+
1398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1399
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1401
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1402
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1403
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
+
1405
+ header_params = {}
1406
+ if request.name
1407
+ header_params["name"] = request.name
1408
+ end
1409
+
1410
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1411
+ metadata[:"x-goog-request-params"] ||= request_params_header
1412
+
1413
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1414
+ metadata: metadata,
1415
+ retry_policy: @config.rpcs.get_backup.retry_policy
1416
+
1417
+ options.apply_defaults timeout: @config.timeout,
1418
+ metadata: @config.metadata,
1419
+ retry_policy: @config.retry_policy
1420
+
1421
+ @memorystore_stub.call_rpc :get_backup, request, options: options do |response, operation|
1422
+ yield response, operation if block_given?
1423
+ end
1424
+ rescue ::GRPC::BadStatus => e
1425
+ raise ::Google::Cloud::Error.from_error(e)
1426
+ end
1427
+
1428
+ ##
1429
+ # Deletes a specific backup.
1430
+ #
1431
+ # @overload delete_backup(request, options = nil)
1432
+ # Pass arguments to `delete_backup` via a request object, either of type
1433
+ # {::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest} or an equivalent Hash.
1434
+ #
1435
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest, ::Hash]
1436
+ # A request object representing the call parameters. Required. To specify no
1437
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1438
+ # @param options [::Gapic::CallOptions, ::Hash]
1439
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1440
+ #
1441
+ # @overload delete_backup(name: nil, request_id: nil)
1442
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1443
+ # least one keyword argument is required. To specify no parameters, or to keep all
1444
+ # the default parameter values, pass an empty Hash as a request object (see above).
1445
+ #
1446
+ # @param name [::String]
1447
+ # Required. Instance backup resource name using the form:
1448
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1449
+ # @param request_id [::String]
1450
+ # Optional. Idempotent request UUID.
1451
+ #
1452
+ # @yield [response, operation] Access the result along with the RPC operation
1453
+ # @yieldparam response [::Gapic::Operation]
1454
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1455
+ #
1456
+ # @return [::Gapic::Operation]
1457
+ #
1458
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1459
+ #
1460
+ # @example Basic example
1461
+ # require "google/cloud/memorystore/v1beta"
1462
+ #
1463
+ # # Create a client object. The client can be reused for multiple calls.
1464
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1465
+ #
1466
+ # # Create a request. To set request fields, pass in keyword arguments.
1467
+ # request = Google::Cloud::Memorystore::V1beta::DeleteBackupRequest.new
1468
+ #
1469
+ # # Call the delete_backup method.
1470
+ # result = client.delete_backup request
1471
+ #
1472
+ # # The returned object is of type Gapic::Operation. You can use it to
1473
+ # # check the status of an operation, cancel it, or wait for results.
1474
+ # # Here is how to wait for a response.
1475
+ # result.wait_until_done! timeout: 60
1476
+ # if result.response?
1477
+ # p result.response
1478
+ # else
1479
+ # puts "No response received."
1480
+ # end
1481
+ #
1482
+ def delete_backup request, options = nil
1483
+ raise ::ArgumentError, "request must be provided" if request.nil?
1484
+
1485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest
1486
+
1487
+ # Converts hash and nil to an options object
1488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1489
+
1490
+ # Customize the options with defaults
1491
+ metadata = @config.rpcs.delete_backup.metadata.to_h
1492
+
1493
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1494
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1496
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1497
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1498
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1499
+
1500
+ header_params = {}
1501
+ if request.name
1502
+ header_params["name"] = request.name
1503
+ end
1504
+
1505
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1506
+ metadata[:"x-goog-request-params"] ||= request_params_header
1507
+
1508
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1509
+ metadata: metadata,
1510
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1511
+
1512
+ options.apply_defaults timeout: @config.timeout,
1513
+ metadata: @config.metadata,
1514
+ retry_policy: @config.retry_policy
1515
+
1516
+ @memorystore_stub.call_rpc :delete_backup, request, options: options do |response, operation|
1517
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1518
+ yield response, operation if block_given?
1519
+ throw :response, response
1520
+ end
1521
+ rescue ::GRPC::BadStatus => e
1522
+ raise ::Google::Cloud::Error.from_error(e)
1523
+ end
1524
+
1525
+ ##
1526
+ # Exports a specific backup to a customer target Cloud Storage URI.
1527
+ #
1528
+ # @overload export_backup(request, options = nil)
1529
+ # Pass arguments to `export_backup` via a request object, either of type
1530
+ # {::Google::Cloud::Memorystore::V1beta::ExportBackupRequest} or an equivalent Hash.
1531
+ #
1532
+ # @param request [::Google::Cloud::Memorystore::V1beta::ExportBackupRequest, ::Hash]
1533
+ # A request object representing the call parameters. Required. To specify no
1534
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1535
+ # @param options [::Gapic::CallOptions, ::Hash]
1536
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1537
+ #
1538
+ # @overload export_backup(gcs_bucket: nil, name: nil)
1539
+ # Pass arguments to `export_backup` via keyword arguments. Note that at
1540
+ # least one keyword argument is required. To specify no parameters, or to keep all
1541
+ # the default parameter values, pass an empty Hash as a request object (see above).
1542
+ #
1543
+ # @param gcs_bucket [::String]
1544
+ # Google Cloud Storage bucket, like "my-bucket".
1545
+ # @param name [::String]
1546
+ # Required. Instance backup resource name using the form:
1547
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1548
+ #
1549
+ # @yield [response, operation] Access the result along with the RPC operation
1550
+ # @yieldparam response [::Gapic::Operation]
1551
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1552
+ #
1553
+ # @return [::Gapic::Operation]
1554
+ #
1555
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1556
+ #
1557
+ # @example Basic example
1558
+ # require "google/cloud/memorystore/v1beta"
1559
+ #
1560
+ # # Create a client object. The client can be reused for multiple calls.
1561
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1562
+ #
1563
+ # # Create a request. To set request fields, pass in keyword arguments.
1564
+ # request = Google::Cloud::Memorystore::V1beta::ExportBackupRequest.new
1565
+ #
1566
+ # # Call the export_backup method.
1567
+ # result = client.export_backup request
1568
+ #
1569
+ # # The returned object is of type Gapic::Operation. You can use it to
1570
+ # # check the status of an operation, cancel it, or wait for results.
1571
+ # # Here is how to wait for a response.
1572
+ # result.wait_until_done! timeout: 60
1573
+ # if result.response?
1574
+ # p result.response
1575
+ # else
1576
+ # puts "No response received."
1577
+ # end
1578
+ #
1579
+ def export_backup request, options = nil
1580
+ raise ::ArgumentError, "request must be provided" if request.nil?
1581
+
1582
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ExportBackupRequest
1583
+
1584
+ # Converts hash and nil to an options object
1585
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1586
+
1587
+ # Customize the options with defaults
1588
+ metadata = @config.rpcs.export_backup.metadata.to_h
1589
+
1590
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1591
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1592
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1593
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1594
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1595
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1596
+
1597
+ header_params = {}
1598
+ if request.name
1599
+ header_params["name"] = request.name
1600
+ end
1601
+
1602
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1603
+ metadata[:"x-goog-request-params"] ||= request_params_header
1604
+
1605
+ options.apply_defaults timeout: @config.rpcs.export_backup.timeout,
1606
+ metadata: metadata,
1607
+ retry_policy: @config.rpcs.export_backup.retry_policy
1608
+
1609
+ options.apply_defaults timeout: @config.timeout,
1610
+ metadata: @config.metadata,
1611
+ retry_policy: @config.retry_policy
1612
+
1613
+ @memorystore_stub.call_rpc :export_backup, request, options: options do |response, operation|
1614
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1615
+ yield response, operation if block_given?
1616
+ throw :response, response
1617
+ end
1618
+ rescue ::GRPC::BadStatus => e
1619
+ raise ::Google::Cloud::Error.from_error(e)
1620
+ end
1621
+
1622
+ ##
1623
+ # Backup Instance.
1624
+ # If this is the first time a backup is being created, a backup collection
1625
+ # will be created at the backend, and this backup belongs to this collection.
1626
+ # Both collection and backup will have a resource name. Backup will be
1627
+ # executed for each shard. A replica (primary if nonHA) will be selected to
1628
+ # perform the execution. Backup call will be rejected if there is an ongoing
1629
+ # backup or update operation. Be aware that during preview, if the instance's
1630
+ # internal software version is too old, critical update will be performed
1631
+ # before actual backup. Once the internal software version is updated to the
1632
+ # minimum version required by the backup feature, subsequent backups will not
1633
+ # require critical update. After preview, there will be no critical update
1634
+ # needed for backup.
1635
+ #
1636
+ # @overload backup_instance(request, options = nil)
1637
+ # Pass arguments to `backup_instance` via a request object, either of type
1638
+ # {::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest} or an equivalent Hash.
1639
+ #
1640
+ # @param request [::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest, ::Hash]
1641
+ # A request object representing the call parameters. Required. To specify no
1642
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1643
+ # @param options [::Gapic::CallOptions, ::Hash]
1644
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1645
+ #
1646
+ # @overload backup_instance(name: nil, ttl: nil, backup_id: nil)
1647
+ # Pass arguments to `backup_instance` via keyword arguments. Note that at
1648
+ # least one keyword argument is required. To specify no parameters, or to keep all
1649
+ # the default parameter values, pass an empty Hash as a request object (see above).
1650
+ #
1651
+ # @param name [::String]
1652
+ # Required. Instance resource name using the form:
1653
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
1654
+ # where `location_id` refers to a Google Cloud region.
1655
+ # @param ttl [::Google::Protobuf::Duration, ::Hash]
1656
+ # Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
1657
+ # If not specified, the default value is 100 years.
1658
+ # @param backup_id [::String]
1659
+ # Optional. The id of the backup to be created. If not specified, the
1660
+ # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used.
1661
+ #
1662
+ # @yield [response, operation] Access the result along with the RPC operation
1663
+ # @yieldparam response [::Gapic::Operation]
1664
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1665
+ #
1666
+ # @return [::Gapic::Operation]
1667
+ #
1668
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1669
+ #
1670
+ # @example Basic example
1671
+ # require "google/cloud/memorystore/v1beta"
1672
+ #
1673
+ # # Create a client object. The client can be reused for multiple calls.
1674
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1675
+ #
1676
+ # # Create a request. To set request fields, pass in keyword arguments.
1677
+ # request = Google::Cloud::Memorystore::V1beta::BackupInstanceRequest.new
1678
+ #
1679
+ # # Call the backup_instance method.
1680
+ # result = client.backup_instance request
1681
+ #
1682
+ # # The returned object is of type Gapic::Operation. You can use it to
1683
+ # # check the status of an operation, cancel it, or wait for results.
1684
+ # # Here is how to wait for a response.
1685
+ # result.wait_until_done! timeout: 60
1686
+ # if result.response?
1687
+ # p result.response
1688
+ # else
1689
+ # puts "No response received."
1690
+ # end
1691
+ #
1692
+ def backup_instance request, options = nil
1693
+ raise ::ArgumentError, "request must be provided" if request.nil?
1694
+
1695
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest
1696
+
1697
+ # Converts hash and nil to an options object
1698
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1699
+
1700
+ # Customize the options with defaults
1701
+ metadata = @config.rpcs.backup_instance.metadata.to_h
1702
+
1703
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1704
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1705
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1706
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1707
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1708
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1709
+
1710
+ header_params = {}
1711
+ if request.name
1712
+ header_params["name"] = request.name
1713
+ end
1714
+
1715
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1716
+ metadata[:"x-goog-request-params"] ||= request_params_header
1717
+
1718
+ options.apply_defaults timeout: @config.rpcs.backup_instance.timeout,
1719
+ metadata: metadata,
1720
+ retry_policy: @config.rpcs.backup_instance.retry_policy
1721
+
1722
+ options.apply_defaults timeout: @config.timeout,
1723
+ metadata: @config.metadata,
1724
+ retry_policy: @config.retry_policy
1725
+
1726
+ @memorystore_stub.call_rpc :backup_instance, request, options: options do |response, operation|
1727
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1728
+ yield response, operation if block_given?
1729
+ throw :response, response
1730
+ end
1731
+ rescue ::GRPC::BadStatus => e
1732
+ raise ::Google::Cloud::Error.from_error(e)
1733
+ end
1734
+
1735
+ ##
1736
+ # Initiates the migration of a source instance to the target Memorystore
1737
+ # instance.
1738
+ #
1739
+ # After the successful completion of this operation, the target instance
1740
+ # will:
1741
+ # 1. Set up replication with the source instance and replicate any writes to
1742
+ # the source instance.
1743
+ # 2. Only allow reads.
1744
+ #
1745
+ # @overload start_migration(request, options = nil)
1746
+ # Pass arguments to `start_migration` via a request object, either of type
1747
+ # {::Google::Cloud::Memorystore::V1beta::StartMigrationRequest} or an equivalent Hash.
1748
+ #
1749
+ # @param request [::Google::Cloud::Memorystore::V1beta::StartMigrationRequest, ::Hash]
1750
+ # A request object representing the call parameters. Required. To specify no
1751
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1752
+ # @param options [::Gapic::CallOptions, ::Hash]
1753
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1754
+ #
1755
+ # @overload start_migration(self_managed_source: nil, name: nil)
1756
+ # Pass arguments to `start_migration` via keyword arguments. Note that at
1757
+ # least one keyword argument is required. To specify no parameters, or to keep all
1758
+ # the default parameter values, pass an empty Hash as a request object (see above).
1759
+ #
1760
+ # @param self_managed_source [::Google::Cloud::Memorystore::V1beta::SelfManagedSource, ::Hash]
1761
+ # Required. Configuration for migrating from a self-managed Valkey/Redis
1762
+ # instance
1763
+ # @param name [::String]
1764
+ # Required. The resource name of the instance to start migration on.
1765
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1766
+ #
1767
+ # @yield [response, operation] Access the result along with the RPC operation
1768
+ # @yieldparam response [::Gapic::Operation]
1769
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1770
+ #
1771
+ # @return [::Gapic::Operation]
1772
+ #
1773
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1774
+ #
1775
+ # @example Basic example
1776
+ # require "google/cloud/memorystore/v1beta"
1777
+ #
1778
+ # # Create a client object. The client can be reused for multiple calls.
1779
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1780
+ #
1781
+ # # Create a request. To set request fields, pass in keyword arguments.
1782
+ # request = Google::Cloud::Memorystore::V1beta::StartMigrationRequest.new
1783
+ #
1784
+ # # Call the start_migration method.
1785
+ # result = client.start_migration request
1786
+ #
1787
+ # # The returned object is of type Gapic::Operation. You can use it to
1788
+ # # check the status of an operation, cancel it, or wait for results.
1789
+ # # Here is how to wait for a response.
1790
+ # result.wait_until_done! timeout: 60
1791
+ # if result.response?
1792
+ # p result.response
1793
+ # else
1794
+ # puts "No response received."
1795
+ # end
1796
+ #
1797
+ def start_migration request, options = nil
1798
+ raise ::ArgumentError, "request must be provided" if request.nil?
1799
+
1800
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::StartMigrationRequest
1801
+
1802
+ # Converts hash and nil to an options object
1803
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1804
+
1805
+ # Customize the options with defaults
1806
+ metadata = @config.rpcs.start_migration.metadata.to_h
1807
+
1808
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1809
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1810
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1811
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1812
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1813
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1814
+
1815
+ header_params = {}
1816
+ if request.name
1817
+ header_params["name"] = request.name
1818
+ end
1819
+
1820
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1821
+ metadata[:"x-goog-request-params"] ||= request_params_header
1822
+
1823
+ options.apply_defaults timeout: @config.rpcs.start_migration.timeout,
1824
+ metadata: metadata,
1825
+ retry_policy: @config.rpcs.start_migration.retry_policy
1826
+
1827
+ options.apply_defaults timeout: @config.timeout,
1828
+ metadata: @config.metadata,
1829
+ retry_policy: @config.retry_policy
1830
+
1831
+ @memorystore_stub.call_rpc :start_migration, request, options: options do |response, operation|
1832
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1833
+ yield response, operation if block_given?
1834
+ throw :response, response
1835
+ end
1836
+ rescue ::GRPC::BadStatus => e
1837
+ raise ::Google::Cloud::Error.from_error(e)
1838
+ end
1839
+
1840
+ ##
1841
+ # Finalizes the migration process.
1842
+ #
1843
+ # After the successful completion of this operation, the target instance
1844
+ # will:
1845
+ # 1. Stop replicating from the source instance.
1846
+ # 2. Allow both reads and writes.
1847
+ #
1848
+ # @overload finish_migration(request, options = nil)
1849
+ # Pass arguments to `finish_migration` via a request object, either of type
1850
+ # {::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest} or an equivalent Hash.
1851
+ #
1852
+ # @param request [::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest, ::Hash]
1853
+ # A request object representing the call parameters. Required. To specify no
1854
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1855
+ # @param options [::Gapic::CallOptions, ::Hash]
1856
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1857
+ #
1858
+ # @overload finish_migration(name: nil, force: nil)
1859
+ # Pass arguments to `finish_migration` via keyword arguments. Note that at
1860
+ # least one keyword argument is required. To specify no parameters, or to keep all
1861
+ # the default parameter values, pass an empty Hash as a request object (see above).
1862
+ #
1863
+ # @param name [::String]
1864
+ # Required. The resource name of the instance to finalize migration on.
1865
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1866
+ # @param force [::Boolean]
1867
+ # Optional. By default, the `FinishMigration` operation ensures the target
1868
+ # replication offset to catch up to the source offset as of the time of the
1869
+ # call. Set this field to `true` to bypass this offset verification check.
1870
+ #
1871
+ # @yield [response, operation] Access the result along with the RPC operation
1872
+ # @yieldparam response [::Gapic::Operation]
1873
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1874
+ #
1875
+ # @return [::Gapic::Operation]
1876
+ #
1877
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1878
+ #
1879
+ # @example Basic example
1880
+ # require "google/cloud/memorystore/v1beta"
1881
+ #
1882
+ # # Create a client object. The client can be reused for multiple calls.
1883
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1884
+ #
1885
+ # # Create a request. To set request fields, pass in keyword arguments.
1886
+ # request = Google::Cloud::Memorystore::V1beta::FinishMigrationRequest.new
1887
+ #
1888
+ # # Call the finish_migration method.
1889
+ # result = client.finish_migration request
1890
+ #
1891
+ # # The returned object is of type Gapic::Operation. You can use it to
1892
+ # # check the status of an operation, cancel it, or wait for results.
1893
+ # # Here is how to wait for a response.
1894
+ # result.wait_until_done! timeout: 60
1895
+ # if result.response?
1896
+ # p result.response
1897
+ # else
1898
+ # puts "No response received."
1899
+ # end
1900
+ #
1901
+ def finish_migration request, options = nil
1902
+ raise ::ArgumentError, "request must be provided" if request.nil?
1903
+
1904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest
1905
+
1906
+ # Converts hash and nil to an options object
1907
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1908
+
1909
+ # Customize the options with defaults
1910
+ metadata = @config.rpcs.finish_migration.metadata.to_h
1911
+
1912
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1913
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1914
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1915
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
1916
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1917
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1918
+
1919
+ header_params = {}
1920
+ if request.name
1921
+ header_params["name"] = request.name
1922
+ end
1923
+
1924
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1925
+ metadata[:"x-goog-request-params"] ||= request_params_header
1926
+
1927
+ options.apply_defaults timeout: @config.rpcs.finish_migration.timeout,
1928
+ metadata: metadata,
1929
+ retry_policy: @config.rpcs.finish_migration.retry_policy
1930
+
1931
+ options.apply_defaults timeout: @config.timeout,
1932
+ metadata: @config.metadata,
1933
+ retry_policy: @config.retry_policy
1934
+
1935
+ @memorystore_stub.call_rpc :finish_migration, request, options: options do |response, operation|
1936
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1937
+ yield response, operation if block_given?
1938
+ throw :response, response
1939
+ end
1940
+ rescue ::GRPC::BadStatus => e
1941
+ raise ::Google::Cloud::Error.from_error(e)
1942
+ end
1943
+
1944
+ ##
1945
+ # Lists all the token auth users for a token based auth enabled instance.
1946
+ #
1947
+ # @overload list_token_auth_users(request, options = nil)
1948
+ # Pass arguments to `list_token_auth_users` via a request object, either of type
1949
+ # {::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest} or an equivalent Hash.
1950
+ #
1951
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest, ::Hash]
1952
+ # A request object representing the call parameters. Required. To specify no
1953
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1954
+ # @param options [::Gapic::CallOptions, ::Hash]
1955
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1956
+ #
1957
+ # @overload list_token_auth_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1958
+ # Pass arguments to `list_token_auth_users` via keyword arguments. Note that at
1959
+ # least one keyword argument is required. To specify no parameters, or to keep all
1960
+ # the default parameter values, pass an empty Hash as a request object (see above).
1961
+ #
1962
+ # @param parent [::String]
1963
+ # Required. The parent to list token auth users from.
1964
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1965
+ # @param page_size [::Integer]
1966
+ # Optional. The maximum number of items to return. The maximum value is 1000;
1967
+ # values above 1000 will be coerced to 1000. If not specified, a default
1968
+ # value of 1000 will be used by the service. Regardless of the page_size
1969
+ # value, the response may include a partial list and a caller should only
1970
+ # rely on response's `next_page_token` to determine if there are more token
1971
+ # auth users left to be queried.
1972
+ # @param page_token [::String]
1973
+ # Optional. The `next_page_token` value returned from a previous
1974
+ # `ListTokenAuthUsers` request, if any.
1975
+ # @param filter [::String]
1976
+ # Optional. Expression for filtering results.
1977
+ # @param order_by [::String]
1978
+ # Optional. Sort results by a defined order.
1979
+ #
1980
+ # @yield [response, operation] Access the result along with the RPC operation
1981
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::TokenAuthUser>]
1982
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1983
+ #
1984
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::TokenAuthUser>]
1985
+ #
1986
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1987
+ #
1988
+ # @example Basic example
1989
+ # require "google/cloud/memorystore/v1beta"
1990
+ #
1991
+ # # Create a client object. The client can be reused for multiple calls.
1992
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
1993
+ #
1994
+ # # Create a request. To set request fields, pass in keyword arguments.
1995
+ # request = Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest.new
1996
+ #
1997
+ # # Call the list_token_auth_users method.
1998
+ # result = client.list_token_auth_users request
1999
+ #
2000
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2001
+ # # over elements, and API calls will be issued to fetch pages as needed.
2002
+ # result.each do |item|
2003
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::TokenAuthUser.
2004
+ # p item
2005
+ # end
2006
+ #
2007
+ def list_token_auth_users request, options = nil
2008
+ raise ::ArgumentError, "request must be provided" if request.nil?
2009
+
2010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest
2011
+
2012
+ # Converts hash and nil to an options object
2013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2014
+
2015
+ # Customize the options with defaults
2016
+ metadata = @config.rpcs.list_token_auth_users.metadata.to_h
2017
+
2018
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2019
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2021
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2022
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2023
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2024
+
2025
+ header_params = {}
2026
+ if request.parent
2027
+ header_params["parent"] = request.parent
2028
+ end
2029
+
2030
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2031
+ metadata[:"x-goog-request-params"] ||= request_params_header
2032
+
2033
+ options.apply_defaults timeout: @config.rpcs.list_token_auth_users.timeout,
2034
+ metadata: metadata,
2035
+ retry_policy: @config.rpcs.list_token_auth_users.retry_policy
2036
+
2037
+ options.apply_defaults timeout: @config.timeout,
2038
+ metadata: @config.metadata,
2039
+ retry_policy: @config.retry_policy
2040
+
2041
+ @memorystore_stub.call_rpc :list_token_auth_users, request, options: options do |response, operation|
2042
+ response = ::Gapic::PagedEnumerable.new @memorystore_stub, :list_token_auth_users, request, response, operation, options
2043
+ yield response, operation if block_given?
2044
+ throw :response, response
2045
+ end
2046
+ rescue ::GRPC::BadStatus => e
2047
+ raise ::Google::Cloud::Error.from_error(e)
2048
+ end
2049
+
2050
+ ##
2051
+ # Gets a specific token auth user for a token based auth enabled instance.
2052
+ #
2053
+ # @overload get_token_auth_user(request, options = nil)
2054
+ # Pass arguments to `get_token_auth_user` via a request object, either of type
2055
+ # {::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest} or an equivalent Hash.
2056
+ #
2057
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest, ::Hash]
2058
+ # A request object representing the call parameters. Required. To specify no
2059
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2060
+ # @param options [::Gapic::CallOptions, ::Hash]
2061
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2062
+ #
2063
+ # @overload get_token_auth_user(name: nil)
2064
+ # Pass arguments to `get_token_auth_user` via keyword arguments. Note that at
2065
+ # least one keyword argument is required. To specify no parameters, or to keep all
2066
+ # the default parameter values, pass an empty Hash as a request object (see above).
2067
+ #
2068
+ # @param name [::String]
2069
+ # Required. The name of token auth user for a basic auth enabled instance.
2070
+ # Format:
2071
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
2072
+ #
2073
+ # @yield [response, operation] Access the result along with the RPC operation
2074
+ # @yieldparam response [::Google::Cloud::Memorystore::V1beta::TokenAuthUser]
2075
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2076
+ #
2077
+ # @return [::Google::Cloud::Memorystore::V1beta::TokenAuthUser]
2078
+ #
2079
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2080
+ #
2081
+ # @example Basic example
2082
+ # require "google/cloud/memorystore/v1beta"
2083
+ #
2084
+ # # Create a client object. The client can be reused for multiple calls.
2085
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2086
+ #
2087
+ # # Create a request. To set request fields, pass in keyword arguments.
2088
+ # request = Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest.new
2089
+ #
2090
+ # # Call the get_token_auth_user method.
2091
+ # result = client.get_token_auth_user request
2092
+ #
2093
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::TokenAuthUser.
2094
+ # p result
2095
+ #
2096
+ def get_token_auth_user request, options = nil
2097
+ raise ::ArgumentError, "request must be provided" if request.nil?
2098
+
2099
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest
2100
+
2101
+ # Converts hash and nil to an options object
2102
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2103
+
2104
+ # Customize the options with defaults
2105
+ metadata = @config.rpcs.get_token_auth_user.metadata.to_h
2106
+
2107
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2108
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2109
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2110
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2111
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2112
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2113
+
2114
+ header_params = {}
2115
+ if request.name
2116
+ header_params["name"] = request.name
2117
+ end
2118
+
2119
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2120
+ metadata[:"x-goog-request-params"] ||= request_params_header
2121
+
2122
+ options.apply_defaults timeout: @config.rpcs.get_token_auth_user.timeout,
2123
+ metadata: metadata,
2124
+ retry_policy: @config.rpcs.get_token_auth_user.retry_policy
2125
+
2126
+ options.apply_defaults timeout: @config.timeout,
2127
+ metadata: @config.metadata,
2128
+ retry_policy: @config.retry_policy
2129
+
2130
+ @memorystore_stub.call_rpc :get_token_auth_user, request, options: options do |response, operation|
2131
+ yield response, operation if block_given?
2132
+ end
2133
+ rescue ::GRPC::BadStatus => e
2134
+ raise ::Google::Cloud::Error.from_error(e)
2135
+ end
2136
+
2137
+ ##
2138
+ # Lists all the auth tokens for a specific token auth user.
2139
+ #
2140
+ # @overload list_auth_tokens(request, options = nil)
2141
+ # Pass arguments to `list_auth_tokens` via a request object, either of type
2142
+ # {::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest} or an equivalent Hash.
2143
+ #
2144
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest, ::Hash]
2145
+ # A request object representing the call parameters. Required. To specify no
2146
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2147
+ # @param options [::Gapic::CallOptions, ::Hash]
2148
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2149
+ #
2150
+ # @overload list_auth_tokens(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2151
+ # Pass arguments to `list_auth_tokens` via keyword arguments. Note that at
2152
+ # least one keyword argument is required. To specify no parameters, or to keep all
2153
+ # the default parameter values, pass an empty Hash as a request object (see above).
2154
+ #
2155
+ # @param parent [::String]
2156
+ # Required. The parent to list auth tokens from.
2157
+ # Format:
2158
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
2159
+ # @param page_size [::Integer]
2160
+ # Optional. The maximum number of items to return. The maximum value is 1000;
2161
+ # values above 1000 will be coerced to 1000.
2162
+ #
2163
+ # If not specified, a default value of 1000 will be used by the service.
2164
+ # Regardless of the page_size value, the response may include a partial list
2165
+ # and a caller should only rely on response's
2166
+ # `next_page_token`
2167
+ # to determine if there are more auth tokens left to be queried.
2168
+ # @param page_token [::String]
2169
+ # Optional. The `next_page_token` value returned from a previous
2170
+ # `ListAuthTokens` request, if any.
2171
+ # @param filter [::String]
2172
+ # Optional. Expression for filtering results.
2173
+ # @param order_by [::String]
2174
+ # Optional. Sort results by a defined order.
2175
+ #
2176
+ # @yield [response, operation] Access the result along with the RPC operation
2177
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AuthToken>]
2178
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2179
+ #
2180
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AuthToken>]
2181
+ #
2182
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2183
+ #
2184
+ # @example Basic example
2185
+ # require "google/cloud/memorystore/v1beta"
2186
+ #
2187
+ # # Create a client object. The client can be reused for multiple calls.
2188
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2189
+ #
2190
+ # # Create a request. To set request fields, pass in keyword arguments.
2191
+ # request = Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest.new
2192
+ #
2193
+ # # Call the list_auth_tokens method.
2194
+ # result = client.list_auth_tokens request
2195
+ #
2196
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2197
+ # # over elements, and API calls will be issued to fetch pages as needed.
2198
+ # result.each do |item|
2199
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::AuthToken.
2200
+ # p item
2201
+ # end
2202
+ #
2203
+ def list_auth_tokens request, options = nil
2204
+ raise ::ArgumentError, "request must be provided" if request.nil?
2205
+
2206
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest
2207
+
2208
+ # Converts hash and nil to an options object
2209
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2210
+
2211
+ # Customize the options with defaults
2212
+ metadata = @config.rpcs.list_auth_tokens.metadata.to_h
2213
+
2214
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2215
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2216
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2217
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2218
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2219
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2220
+
2221
+ header_params = {}
2222
+ if request.parent
2223
+ header_params["parent"] = request.parent
2224
+ end
2225
+
2226
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2227
+ metadata[:"x-goog-request-params"] ||= request_params_header
2228
+
2229
+ options.apply_defaults timeout: @config.rpcs.list_auth_tokens.timeout,
2230
+ metadata: metadata,
2231
+ retry_policy: @config.rpcs.list_auth_tokens.retry_policy
2232
+
2233
+ options.apply_defaults timeout: @config.timeout,
2234
+ metadata: @config.metadata,
2235
+ retry_policy: @config.retry_policy
2236
+
2237
+ @memorystore_stub.call_rpc :list_auth_tokens, request, options: options do |response, operation|
2238
+ response = ::Gapic::PagedEnumerable.new @memorystore_stub, :list_auth_tokens, request, response, operation, options
2239
+ yield response, operation if block_given?
2240
+ throw :response, response
2241
+ end
2242
+ rescue ::GRPC::BadStatus => e
2243
+ raise ::Google::Cloud::Error.from_error(e)
2244
+ end
2245
+
2246
+ ##
2247
+ # Gets a token based auth enabled instance's auth token for a given user.
2248
+ #
2249
+ # @overload get_auth_token(request, options = nil)
2250
+ # Pass arguments to `get_auth_token` via a request object, either of type
2251
+ # {::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest} or an equivalent Hash.
2252
+ #
2253
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest, ::Hash]
2254
+ # A request object representing the call parameters. Required. To specify no
2255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2256
+ # @param options [::Gapic::CallOptions, ::Hash]
2257
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2258
+ #
2259
+ # @overload get_auth_token(name: nil)
2260
+ # Pass arguments to `get_auth_token` via keyword arguments. Note that at
2261
+ # least one keyword argument is required. To specify no parameters, or to keep all
2262
+ # the default parameter values, pass an empty Hash as a request object (see above).
2263
+ #
2264
+ # @param name [::String]
2265
+ # Required. The name of token auth user for a token auth enabled instance.
2266
+ # Format:
2267
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{auth_token}
2268
+ #
2269
+ # @yield [response, operation] Access the result along with the RPC operation
2270
+ # @yieldparam response [::Google::Cloud::Memorystore::V1beta::AuthToken]
2271
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2272
+ #
2273
+ # @return [::Google::Cloud::Memorystore::V1beta::AuthToken]
2274
+ #
2275
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2276
+ #
2277
+ # @example Basic example
2278
+ # require "google/cloud/memorystore/v1beta"
2279
+ #
2280
+ # # Create a client object. The client can be reused for multiple calls.
2281
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2282
+ #
2283
+ # # Create a request. To set request fields, pass in keyword arguments.
2284
+ # request = Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest.new
2285
+ #
2286
+ # # Call the get_auth_token method.
2287
+ # result = client.get_auth_token request
2288
+ #
2289
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::AuthToken.
2290
+ # p result
2291
+ #
2292
+ def get_auth_token request, options = nil
2293
+ raise ::ArgumentError, "request must be provided" if request.nil?
2294
+
2295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest
2296
+
2297
+ # Converts hash and nil to an options object
2298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2299
+
2300
+ # Customize the options with defaults
2301
+ metadata = @config.rpcs.get_auth_token.metadata.to_h
2302
+
2303
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2304
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2306
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2307
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2308
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2309
+
2310
+ header_params = {}
2311
+ if request.name
2312
+ header_params["name"] = request.name
2313
+ end
2314
+
2315
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2316
+ metadata[:"x-goog-request-params"] ||= request_params_header
2317
+
2318
+ options.apply_defaults timeout: @config.rpcs.get_auth_token.timeout,
2319
+ metadata: metadata,
2320
+ retry_policy: @config.rpcs.get_auth_token.retry_policy
2321
+
2322
+ options.apply_defaults timeout: @config.timeout,
2323
+ metadata: @config.metadata,
2324
+ retry_policy: @config.retry_policy
2325
+
2326
+ @memorystore_stub.call_rpc :get_auth_token, request, options: options do |response, operation|
2327
+ yield response, operation if block_given?
2328
+ end
2329
+ rescue ::GRPC::BadStatus => e
2330
+ raise ::Google::Cloud::Error.from_error(e)
2331
+ end
2332
+
2333
+ ##
2334
+ # Adds a token auth user for a token based auth enabled instance.
2335
+ #
2336
+ # @overload add_token_auth_user(request, options = nil)
2337
+ # Pass arguments to `add_token_auth_user` via a request object, either of type
2338
+ # {::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest} or an equivalent Hash.
2339
+ #
2340
+ # @param request [::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest, ::Hash]
2341
+ # A request object representing the call parameters. Required. To specify no
2342
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2343
+ # @param options [::Gapic::CallOptions, ::Hash]
2344
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2345
+ #
2346
+ # @overload add_token_auth_user(instance: nil, token_auth_user: nil)
2347
+ # Pass arguments to `add_token_auth_user` via keyword arguments. Note that at
2348
+ # least one keyword argument is required. To specify no parameters, or to keep all
2349
+ # the default parameter values, pass an empty Hash as a request object (see above).
2350
+ #
2351
+ # @param instance [::String]
2352
+ # Required. The instance resource that this token auth user will be added
2353
+ # for. Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
2354
+ # @param token_auth_user [::String]
2355
+ # Required. The name of the token auth user to add.
2356
+ #
2357
+ # @yield [response, operation] Access the result along with the RPC operation
2358
+ # @yieldparam response [::Gapic::Operation]
2359
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2360
+ #
2361
+ # @return [::Gapic::Operation]
2362
+ #
2363
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2364
+ #
2365
+ # @example Basic example
2366
+ # require "google/cloud/memorystore/v1beta"
2367
+ #
2368
+ # # Create a client object. The client can be reused for multiple calls.
2369
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2370
+ #
2371
+ # # Create a request. To set request fields, pass in keyword arguments.
2372
+ # request = Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest.new
2373
+ #
2374
+ # # Call the add_token_auth_user method.
2375
+ # result = client.add_token_auth_user request
2376
+ #
2377
+ # # The returned object is of type Gapic::Operation. You can use it to
2378
+ # # check the status of an operation, cancel it, or wait for results.
2379
+ # # Here is how to wait for a response.
2380
+ # result.wait_until_done! timeout: 60
2381
+ # if result.response?
2382
+ # p result.response
2383
+ # else
2384
+ # puts "No response received."
2385
+ # end
2386
+ #
2387
+ def add_token_auth_user request, options = nil
2388
+ raise ::ArgumentError, "request must be provided" if request.nil?
2389
+
2390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest
2391
+
2392
+ # Converts hash and nil to an options object
2393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2394
+
2395
+ # Customize the options with defaults
2396
+ metadata = @config.rpcs.add_token_auth_user.metadata.to_h
2397
+
2398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2399
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2401
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2402
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2403
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2404
+
2405
+ header_params = {}
2406
+ if request.instance
2407
+ header_params["instance"] = request.instance
2408
+ end
2409
+
2410
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2411
+ metadata[:"x-goog-request-params"] ||= request_params_header
2412
+
2413
+ options.apply_defaults timeout: @config.rpcs.add_token_auth_user.timeout,
2414
+ metadata: metadata,
2415
+ retry_policy: @config.rpcs.add_token_auth_user.retry_policy
2416
+
2417
+ options.apply_defaults timeout: @config.timeout,
2418
+ metadata: @config.metadata,
2419
+ retry_policy: @config.retry_policy
2420
+
2421
+ @memorystore_stub.call_rpc :add_token_auth_user, request, options: options do |response, operation|
2422
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2423
+ yield response, operation if block_given?
2424
+ throw :response, response
2425
+ end
2426
+ rescue ::GRPC::BadStatus => e
2427
+ raise ::Google::Cloud::Error.from_error(e)
2428
+ end
2429
+
2430
+ ##
2431
+ # Deletes a token auth user for a token based auth enabled instance.
2432
+ #
2433
+ # @overload delete_token_auth_user(request, options = nil)
2434
+ # Pass arguments to `delete_token_auth_user` via a request object, either of type
2435
+ # {::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest} or an equivalent Hash.
2436
+ #
2437
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest, ::Hash]
2438
+ # A request object representing the call parameters. Required. To specify no
2439
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2440
+ # @param options [::Gapic::CallOptions, ::Hash]
2441
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2442
+ #
2443
+ # @overload delete_token_auth_user(name: nil, request_id: nil, force: nil)
2444
+ # Pass arguments to `delete_token_auth_user` via keyword arguments. Note that at
2445
+ # least one keyword argument is required. To specify no parameters, or to keep all
2446
+ # the default parameter values, pass an empty Hash as a request object (see above).
2447
+ #
2448
+ # @param name [::String]
2449
+ # Required. The name of the token auth user to delete.
2450
+ # Format:
2451
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
2452
+ # @param request_id [::String]
2453
+ # Optional. An optional request ID to identify requests. Specify a unique
2454
+ # request ID so that if you must retry your request, the server will know to
2455
+ # ignore the request if it has already been completed. The server will
2456
+ # guarantee that for at least 60 minutes after the first request.
2457
+ #
2458
+ # For example, consider a situation where you make an initial request and the
2459
+ # request times out. If you make the request again with the same request
2460
+ # ID, the server can check if original operation with the same request ID
2461
+ # was received, and if so, will ignore the second request. This prevents
2462
+ # clients from accidentally creating duplicate commitments.
2463
+ #
2464
+ # The request ID must be a valid UUID with the exception that zero UUID is
2465
+ # not supported (00000000-0000-0000-0000-000000000000).
2466
+ # @param force [::Boolean]
2467
+ # Optional. If set to true, any auth tokens from this user will also be
2468
+ # deleted. Otherwise, the request will only work if the user has no auth
2469
+ # tokens.
2470
+ #
2471
+ # @yield [response, operation] Access the result along with the RPC operation
2472
+ # @yieldparam response [::Gapic::Operation]
2473
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2474
+ #
2475
+ # @return [::Gapic::Operation]
2476
+ #
2477
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2478
+ #
2479
+ # @example Basic example
2480
+ # require "google/cloud/memorystore/v1beta"
2481
+ #
2482
+ # # Create a client object. The client can be reused for multiple calls.
2483
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2484
+ #
2485
+ # # Create a request. To set request fields, pass in keyword arguments.
2486
+ # request = Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest.new
2487
+ #
2488
+ # # Call the delete_token_auth_user method.
2489
+ # result = client.delete_token_auth_user request
2490
+ #
2491
+ # # The returned object is of type Gapic::Operation. You can use it to
2492
+ # # check the status of an operation, cancel it, or wait for results.
2493
+ # # Here is how to wait for a response.
2494
+ # result.wait_until_done! timeout: 60
2495
+ # if result.response?
2496
+ # p result.response
2497
+ # else
2498
+ # puts "No response received."
2499
+ # end
2500
+ #
2501
+ def delete_token_auth_user request, options = nil
2502
+ raise ::ArgumentError, "request must be provided" if request.nil?
2503
+
2504
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest
2505
+
2506
+ # Converts hash and nil to an options object
2507
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2508
+
2509
+ # Customize the options with defaults
2510
+ metadata = @config.rpcs.delete_token_auth_user.metadata.to_h
2511
+
2512
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2513
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2514
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2515
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2516
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2517
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2518
+
2519
+ header_params = {}
2520
+ if request.name
2521
+ header_params["name"] = request.name
2522
+ end
2523
+
2524
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2525
+ metadata[:"x-goog-request-params"] ||= request_params_header
2526
+
2527
+ options.apply_defaults timeout: @config.rpcs.delete_token_auth_user.timeout,
2528
+ metadata: metadata,
2529
+ retry_policy: @config.rpcs.delete_token_auth_user.retry_policy
2530
+
2531
+ options.apply_defaults timeout: @config.timeout,
2532
+ metadata: @config.metadata,
2533
+ retry_policy: @config.retry_policy
2534
+
2535
+ @memorystore_stub.call_rpc :delete_token_auth_user, request, options: options do |response, operation|
2536
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2537
+ yield response, operation if block_given?
2538
+ throw :response, response
2539
+ end
2540
+ rescue ::GRPC::BadStatus => e
2541
+ raise ::Google::Cloud::Error.from_error(e)
2542
+ end
2543
+
2544
+ ##
2545
+ # Adds a token for a user of a token based auth enabled instance.
2546
+ #
2547
+ # @overload add_auth_token(request, options = nil)
2548
+ # Pass arguments to `add_auth_token` via a request object, either of type
2549
+ # {::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest} or an equivalent Hash.
2550
+ #
2551
+ # @param request [::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest, ::Hash]
2552
+ # A request object representing the call parameters. Required. To specify no
2553
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2554
+ # @param options [::Gapic::CallOptions, ::Hash]
2555
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2556
+ #
2557
+ # @overload add_auth_token(token_auth_user: nil, auth_token: nil)
2558
+ # Pass arguments to `add_auth_token` via keyword arguments. Note that at
2559
+ # least one keyword argument is required. To specify no parameters, or to keep all
2560
+ # the default parameter values, pass an empty Hash as a request object (see above).
2561
+ #
2562
+ # @param token_auth_user [::String]
2563
+ # Required. The name of the token auth user resource that this token will be
2564
+ # added for.
2565
+ # @param auth_token [::Google::Cloud::Memorystore::V1beta::AuthToken, ::Hash]
2566
+ # Required. The auth token to add.
2567
+ #
2568
+ # @yield [response, operation] Access the result along with the RPC operation
2569
+ # @yieldparam response [::Gapic::Operation]
2570
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2571
+ #
2572
+ # @return [::Gapic::Operation]
2573
+ #
2574
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2575
+ #
2576
+ # @example Basic example
2577
+ # require "google/cloud/memorystore/v1beta"
2578
+ #
2579
+ # # Create a client object. The client can be reused for multiple calls.
2580
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2581
+ #
2582
+ # # Create a request. To set request fields, pass in keyword arguments.
2583
+ # request = Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest.new
2584
+ #
2585
+ # # Call the add_auth_token method.
2586
+ # result = client.add_auth_token request
2587
+ #
2588
+ # # The returned object is of type Gapic::Operation. You can use it to
2589
+ # # check the status of an operation, cancel it, or wait for results.
2590
+ # # Here is how to wait for a response.
2591
+ # result.wait_until_done! timeout: 60
2592
+ # if result.response?
2593
+ # p result.response
2594
+ # else
2595
+ # puts "No response received."
2596
+ # end
2597
+ #
2598
+ def add_auth_token request, options = nil
2599
+ raise ::ArgumentError, "request must be provided" if request.nil?
2600
+
2601
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest
2602
+
2603
+ # Converts hash and nil to an options object
2604
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2605
+
2606
+ # Customize the options with defaults
2607
+ metadata = @config.rpcs.add_auth_token.metadata.to_h
2608
+
2609
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2610
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2611
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2612
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2613
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2614
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2615
+
2616
+ header_params = {}
2617
+ if request.token_auth_user
2618
+ header_params["token_auth_user"] = request.token_auth_user
2619
+ end
2620
+
2621
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2622
+ metadata[:"x-goog-request-params"] ||= request_params_header
2623
+
2624
+ options.apply_defaults timeout: @config.rpcs.add_auth_token.timeout,
2625
+ metadata: metadata,
2626
+ retry_policy: @config.rpcs.add_auth_token.retry_policy
2627
+
2628
+ options.apply_defaults timeout: @config.timeout,
2629
+ metadata: @config.metadata,
2630
+ retry_policy: @config.retry_policy
2631
+
2632
+ @memorystore_stub.call_rpc :add_auth_token, request, options: options do |response, operation|
2633
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2634
+ yield response, operation if block_given?
2635
+ throw :response, response
2636
+ end
2637
+ rescue ::GRPC::BadStatus => e
2638
+ raise ::Google::Cloud::Error.from_error(e)
2639
+ end
2640
+
2641
+ ##
2642
+ # Deletes a token for a user of a token based auth enabled instance.
2643
+ #
2644
+ # @overload delete_auth_token(request, options = nil)
2645
+ # Pass arguments to `delete_auth_token` via a request object, either of type
2646
+ # {::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest} or an equivalent Hash.
2647
+ #
2648
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest, ::Hash]
2649
+ # A request object representing the call parameters. Required. To specify no
2650
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2651
+ # @param options [::Gapic::CallOptions, ::Hash]
2652
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2653
+ #
2654
+ # @overload delete_auth_token(name: nil)
2655
+ # Pass arguments to `delete_auth_token` via keyword arguments. Note that at
2656
+ # least one keyword argument is required. To specify no parameters, or to keep all
2657
+ # the default parameter values, pass an empty Hash as a request object (see above).
2658
+ #
2659
+ # @param name [::String]
2660
+ # Required. The name of the token auth user resource that this token will be
2661
+ # deleted from. Format:
2662
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{name}
2663
+ #
2664
+ # @yield [response, operation] Access the result along with the RPC operation
2665
+ # @yieldparam response [::Gapic::Operation]
2666
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2667
+ #
2668
+ # @return [::Gapic::Operation]
2669
+ #
2670
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2671
+ #
2672
+ # @example Basic example
2673
+ # require "google/cloud/memorystore/v1beta"
2674
+ #
2675
+ # # Create a client object. The client can be reused for multiple calls.
2676
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new
2677
+ #
2678
+ # # Create a request. To set request fields, pass in keyword arguments.
2679
+ # request = Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest.new
2680
+ #
2681
+ # # Call the delete_auth_token method.
2682
+ # result = client.delete_auth_token request
2683
+ #
2684
+ # # The returned object is of type Gapic::Operation. You can use it to
2685
+ # # check the status of an operation, cancel it, or wait for results.
2686
+ # # Here is how to wait for a response.
2687
+ # result.wait_until_done! timeout: 60
2688
+ # if result.response?
2689
+ # p result.response
2690
+ # else
2691
+ # puts "No response received."
2692
+ # end
2693
+ #
2694
+ def delete_auth_token request, options = nil
2695
+ raise ::ArgumentError, "request must be provided" if request.nil?
2696
+
2697
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest
2698
+
2699
+ # Converts hash and nil to an options object
2700
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2701
+
2702
+ # Customize the options with defaults
2703
+ metadata = @config.rpcs.delete_auth_token.metadata.to_h
2704
+
2705
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2706
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2707
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2708
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION
2709
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2710
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2711
+
2712
+ header_params = {}
2713
+ if request.name
2714
+ header_params["name"] = request.name
2715
+ end
2716
+
2717
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2718
+ metadata[:"x-goog-request-params"] ||= request_params_header
2719
+
2720
+ options.apply_defaults timeout: @config.rpcs.delete_auth_token.timeout,
2721
+ metadata: metadata,
2722
+ retry_policy: @config.rpcs.delete_auth_token.retry_policy
2723
+
2724
+ options.apply_defaults timeout: @config.timeout,
2725
+ metadata: @config.metadata,
2726
+ retry_policy: @config.retry_policy
2727
+
2728
+ @memorystore_stub.call_rpc :delete_auth_token, request, options: options do |response, operation|
2729
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2730
+ yield response, operation if block_given?
2731
+ throw :response, response
2732
+ end
2733
+ rescue ::GRPC::BadStatus => e
2734
+ raise ::Google::Cloud::Error.from_error(e)
2735
+ end
2736
+
942
2737
  ##
943
2738
  # Configuration class for the Memorystore API.
944
2739
  #
@@ -1035,6 +2830,7 @@ module Google
1035
2830
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1036
2831
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1037
2832
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2833
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1038
2834
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1039
2835
  # trigger a retry.
1040
2836
  # @return [::Hash]
@@ -1118,6 +2914,7 @@ module Google
1118
2914
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1119
2915
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1120
2916
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2917
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1121
2918
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1122
2919
  # trigger a retry.
1123
2920
  #
@@ -1157,6 +2954,96 @@ module Google
1157
2954
  # @return [::Gapic::Config::Method]
1158
2955
  #
1159
2956
  attr_reader :get_shared_regional_certificate_authority
2957
+ ##
2958
+ # RPC-specific configuration for `reschedule_maintenance`
2959
+ # @return [::Gapic::Config::Method]
2960
+ #
2961
+ attr_reader :reschedule_maintenance
2962
+ ##
2963
+ # RPC-specific configuration for `list_backup_collections`
2964
+ # @return [::Gapic::Config::Method]
2965
+ #
2966
+ attr_reader :list_backup_collections
2967
+ ##
2968
+ # RPC-specific configuration for `get_backup_collection`
2969
+ # @return [::Gapic::Config::Method]
2970
+ #
2971
+ attr_reader :get_backup_collection
2972
+ ##
2973
+ # RPC-specific configuration for `list_backups`
2974
+ # @return [::Gapic::Config::Method]
2975
+ #
2976
+ attr_reader :list_backups
2977
+ ##
2978
+ # RPC-specific configuration for `get_backup`
2979
+ # @return [::Gapic::Config::Method]
2980
+ #
2981
+ attr_reader :get_backup
2982
+ ##
2983
+ # RPC-specific configuration for `delete_backup`
2984
+ # @return [::Gapic::Config::Method]
2985
+ #
2986
+ attr_reader :delete_backup
2987
+ ##
2988
+ # RPC-specific configuration for `export_backup`
2989
+ # @return [::Gapic::Config::Method]
2990
+ #
2991
+ attr_reader :export_backup
2992
+ ##
2993
+ # RPC-specific configuration for `backup_instance`
2994
+ # @return [::Gapic::Config::Method]
2995
+ #
2996
+ attr_reader :backup_instance
2997
+ ##
2998
+ # RPC-specific configuration for `start_migration`
2999
+ # @return [::Gapic::Config::Method]
3000
+ #
3001
+ attr_reader :start_migration
3002
+ ##
3003
+ # RPC-specific configuration for `finish_migration`
3004
+ # @return [::Gapic::Config::Method]
3005
+ #
3006
+ attr_reader :finish_migration
3007
+ ##
3008
+ # RPC-specific configuration for `list_token_auth_users`
3009
+ # @return [::Gapic::Config::Method]
3010
+ #
3011
+ attr_reader :list_token_auth_users
3012
+ ##
3013
+ # RPC-specific configuration for `get_token_auth_user`
3014
+ # @return [::Gapic::Config::Method]
3015
+ #
3016
+ attr_reader :get_token_auth_user
3017
+ ##
3018
+ # RPC-specific configuration for `list_auth_tokens`
3019
+ # @return [::Gapic::Config::Method]
3020
+ #
3021
+ attr_reader :list_auth_tokens
3022
+ ##
3023
+ # RPC-specific configuration for `get_auth_token`
3024
+ # @return [::Gapic::Config::Method]
3025
+ #
3026
+ attr_reader :get_auth_token
3027
+ ##
3028
+ # RPC-specific configuration for `add_token_auth_user`
3029
+ # @return [::Gapic::Config::Method]
3030
+ #
3031
+ attr_reader :add_token_auth_user
3032
+ ##
3033
+ # RPC-specific configuration for `delete_token_auth_user`
3034
+ # @return [::Gapic::Config::Method]
3035
+ #
3036
+ attr_reader :delete_token_auth_user
3037
+ ##
3038
+ # RPC-specific configuration for `add_auth_token`
3039
+ # @return [::Gapic::Config::Method]
3040
+ #
3041
+ attr_reader :add_auth_token
3042
+ ##
3043
+ # RPC-specific configuration for `delete_auth_token`
3044
+ # @return [::Gapic::Config::Method]
3045
+ #
3046
+ attr_reader :delete_auth_token
1160
3047
 
1161
3048
  # @private
1162
3049
  def initialize parent_rpcs = nil
@@ -1174,6 +3061,42 @@ module Google
1174
3061
  @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config
1175
3062
  get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority
1176
3063
  @get_shared_regional_certificate_authority = ::Gapic::Config::Method.new get_shared_regional_certificate_authority_config
3064
+ reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance
3065
+ @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config
3066
+ list_backup_collections_config = parent_rpcs.list_backup_collections if parent_rpcs.respond_to? :list_backup_collections
3067
+ @list_backup_collections = ::Gapic::Config::Method.new list_backup_collections_config
3068
+ get_backup_collection_config = parent_rpcs.get_backup_collection if parent_rpcs.respond_to? :get_backup_collection
3069
+ @get_backup_collection = ::Gapic::Config::Method.new get_backup_collection_config
3070
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
3071
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
3072
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
3073
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
3074
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
3075
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
3076
+ export_backup_config = parent_rpcs.export_backup if parent_rpcs.respond_to? :export_backup
3077
+ @export_backup = ::Gapic::Config::Method.new export_backup_config
3078
+ backup_instance_config = parent_rpcs.backup_instance if parent_rpcs.respond_to? :backup_instance
3079
+ @backup_instance = ::Gapic::Config::Method.new backup_instance_config
3080
+ start_migration_config = parent_rpcs.start_migration if parent_rpcs.respond_to? :start_migration
3081
+ @start_migration = ::Gapic::Config::Method.new start_migration_config
3082
+ finish_migration_config = parent_rpcs.finish_migration if parent_rpcs.respond_to? :finish_migration
3083
+ @finish_migration = ::Gapic::Config::Method.new finish_migration_config
3084
+ list_token_auth_users_config = parent_rpcs.list_token_auth_users if parent_rpcs.respond_to? :list_token_auth_users
3085
+ @list_token_auth_users = ::Gapic::Config::Method.new list_token_auth_users_config
3086
+ get_token_auth_user_config = parent_rpcs.get_token_auth_user if parent_rpcs.respond_to? :get_token_auth_user
3087
+ @get_token_auth_user = ::Gapic::Config::Method.new get_token_auth_user_config
3088
+ list_auth_tokens_config = parent_rpcs.list_auth_tokens if parent_rpcs.respond_to? :list_auth_tokens
3089
+ @list_auth_tokens = ::Gapic::Config::Method.new list_auth_tokens_config
3090
+ get_auth_token_config = parent_rpcs.get_auth_token if parent_rpcs.respond_to? :get_auth_token
3091
+ @get_auth_token = ::Gapic::Config::Method.new get_auth_token_config
3092
+ add_token_auth_user_config = parent_rpcs.add_token_auth_user if parent_rpcs.respond_to? :add_token_auth_user
3093
+ @add_token_auth_user = ::Gapic::Config::Method.new add_token_auth_user_config
3094
+ delete_token_auth_user_config = parent_rpcs.delete_token_auth_user if parent_rpcs.respond_to? :delete_token_auth_user
3095
+ @delete_token_auth_user = ::Gapic::Config::Method.new delete_token_auth_user_config
3096
+ add_auth_token_config = parent_rpcs.add_auth_token if parent_rpcs.respond_to? :add_auth_token
3097
+ @add_auth_token = ::Gapic::Config::Method.new add_auth_token_config
3098
+ delete_auth_token_config = parent_rpcs.delete_auth_token if parent_rpcs.respond_to? :delete_auth_token
3099
+ @delete_auth_token = ::Gapic::Config::Method.new delete_auth_token_config
1177
3100
 
1178
3101
  yield self if block_given?
1179
3102
  end