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.
@@ -884,6 +884,1675 @@ module Google
884
884
  raise ::Google::Cloud::Error.from_error(e)
885
885
  end
886
886
 
887
+ ##
888
+ # Reschedules upcoming maintenance event.
889
+ #
890
+ # @overload reschedule_maintenance(request, options = nil)
891
+ # Pass arguments to `reschedule_maintenance` via a request object, either of type
892
+ # {::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest} or an equivalent Hash.
893
+ #
894
+ # @param request [::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest, ::Hash]
895
+ # A request object representing the call parameters. Required. To specify no
896
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
897
+ # @param options [::Gapic::CallOptions, ::Hash]
898
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
899
+ #
900
+ # @overload reschedule_maintenance(name: nil, reschedule_type: nil, schedule_time: nil)
901
+ # Pass arguments to `reschedule_maintenance` via keyword arguments. Note that at
902
+ # least one keyword argument is required. To specify no parameters, or to keep all
903
+ # the default parameter values, pass an empty Hash as a request object (see above).
904
+ #
905
+ # @param name [::String]
906
+ # Required. Name of the instance to reschedule maintenance for:
907
+ # `projects/{project}/locations/{location_id}/instances/{instance}`
908
+ # @param reschedule_type [::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest::RescheduleType]
909
+ # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.
910
+ # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash]
911
+ # Optional. Timestamp when the maintenance shall be rescheduled to if
912
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format.
913
+ # Example: `2012-11-15T16:19:00.094Z`.
914
+ # @yield [result, operation] Access the result along with the TransportOperation object
915
+ # @yieldparam result [::Gapic::Operation]
916
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
917
+ #
918
+ # @return [::Gapic::Operation]
919
+ #
920
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
921
+ #
922
+ # @example Basic example
923
+ # require "google/cloud/memorystore/v1beta"
924
+ #
925
+ # # Create a client object. The client can be reused for multiple calls.
926
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
927
+ #
928
+ # # Create a request. To set request fields, pass in keyword arguments.
929
+ # request = Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest.new
930
+ #
931
+ # # Call the reschedule_maintenance method.
932
+ # result = client.reschedule_maintenance request
933
+ #
934
+ # # The returned object is of type Gapic::Operation. You can use it to
935
+ # # check the status of an operation, cancel it, or wait for results.
936
+ # # Here is how to wait for a response.
937
+ # result.wait_until_done! timeout: 60
938
+ # if result.response?
939
+ # p result.response
940
+ # else
941
+ # puts "No response received."
942
+ # end
943
+ #
944
+ def reschedule_maintenance request, options = nil
945
+ raise ::ArgumentError, "request must be provided" if request.nil?
946
+
947
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::RescheduleMaintenanceRequest
948
+
949
+ # Converts hash and nil to an options object
950
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
951
+
952
+ # Customize the options with defaults
953
+ call_metadata = @config.rpcs.reschedule_maintenance.metadata.to_h
954
+
955
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
956
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
957
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
958
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
959
+ transports_version_send: [:rest]
960
+
961
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
962
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
963
+
964
+ options.apply_defaults timeout: @config.rpcs.reschedule_maintenance.timeout,
965
+ metadata: call_metadata,
966
+ retry_policy: @config.rpcs.reschedule_maintenance.retry_policy
967
+
968
+ options.apply_defaults timeout: @config.timeout,
969
+ metadata: @config.metadata,
970
+ retry_policy: @config.retry_policy
971
+
972
+ @memorystore_stub.reschedule_maintenance request, options do |result, operation|
973
+ result = ::Gapic::Operation.new result, @operations_client, options: options
974
+ yield result, operation if block_given?
975
+ throw :response, result
976
+ end
977
+ rescue ::Gapic::Rest::Error => e
978
+ raise ::Google::Cloud::Error.from_error(e)
979
+ end
980
+
981
+ ##
982
+ # Lists all backup collections owned by a consumer project in either the
983
+ # specified location (region) or all locations.
984
+ #
985
+ # If `location_id` is specified as `-` (wildcard), then all regions
986
+ # available to the project are queried, and the results are aggregated.
987
+ #
988
+ # @overload list_backup_collections(request, options = nil)
989
+ # Pass arguments to `list_backup_collections` via a request object, either of type
990
+ # {::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest} or an equivalent Hash.
991
+ #
992
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest, ::Hash]
993
+ # A request object representing the call parameters. Required. To specify no
994
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
995
+ # @param options [::Gapic::CallOptions, ::Hash]
996
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
997
+ #
998
+ # @overload list_backup_collections(parent: nil, page_size: nil, page_token: nil)
999
+ # Pass arguments to `list_backup_collections` via keyword arguments. Note that at
1000
+ # least one keyword argument is required. To specify no parameters, or to keep all
1001
+ # the default parameter values, pass an empty Hash as a request object (see above).
1002
+ #
1003
+ # @param parent [::String]
1004
+ # Required. The resource name of the backupCollection location using the
1005
+ # form:
1006
+ # `projects/{project_id}/locations/{location_id}`
1007
+ # where `location_id` refers to a Google Cloud region.
1008
+ # @param page_size [::Integer]
1009
+ # Optional. The maximum number of items to return.
1010
+ #
1011
+ # If not specified, a default value of 1000 will be used by the service.
1012
+ # Regardless of the page_size value, the response may include a partial list
1013
+ # and a caller should only rely on response's
1014
+ # `next_page_token`
1015
+ # to determine if there are more clusters left to be queried.
1016
+ # @param page_token [::String]
1017
+ # Optional. The `next_page_token` value returned from a previous
1018
+ # `ListBackupCollections` request, if any.
1019
+ # @yield [result, operation] Access the result along with the TransportOperation object
1020
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::BackupCollection>]
1021
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1022
+ #
1023
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::BackupCollection>]
1024
+ #
1025
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1026
+ #
1027
+ # @example Basic example
1028
+ # require "google/cloud/memorystore/v1beta"
1029
+ #
1030
+ # # Create a client object. The client can be reused for multiple calls.
1031
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1032
+ #
1033
+ # # Create a request. To set request fields, pass in keyword arguments.
1034
+ # request = Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest.new
1035
+ #
1036
+ # # Call the list_backup_collections method.
1037
+ # result = client.list_backup_collections request
1038
+ #
1039
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1040
+ # # over elements, and API calls will be issued to fetch pages as needed.
1041
+ # result.each do |item|
1042
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::BackupCollection.
1043
+ # p item
1044
+ # end
1045
+ #
1046
+ def list_backup_collections request, options = nil
1047
+ raise ::ArgumentError, "request must be provided" if request.nil?
1048
+
1049
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListBackupCollectionsRequest
1050
+
1051
+ # Converts hash and nil to an options object
1052
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1053
+
1054
+ # Customize the options with defaults
1055
+ call_metadata = @config.rpcs.list_backup_collections.metadata.to_h
1056
+
1057
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1058
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1059
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1060
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1061
+ transports_version_send: [:rest]
1062
+
1063
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1064
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1065
+
1066
+ options.apply_defaults timeout: @config.rpcs.list_backup_collections.timeout,
1067
+ metadata: call_metadata,
1068
+ retry_policy: @config.rpcs.list_backup_collections.retry_policy
1069
+
1070
+ options.apply_defaults timeout: @config.timeout,
1071
+ metadata: @config.metadata,
1072
+ retry_policy: @config.retry_policy
1073
+
1074
+ @memorystore_stub.list_backup_collections request, options do |result, operation|
1075
+ result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backup_collections, "backup_collections", request, result, options
1076
+ yield result, operation if block_given?
1077
+ throw :response, result
1078
+ end
1079
+ rescue ::Gapic::Rest::Error => e
1080
+ raise ::Google::Cloud::Error.from_error(e)
1081
+ end
1082
+
1083
+ ##
1084
+ # Get a backup collection.
1085
+ #
1086
+ # @overload get_backup_collection(request, options = nil)
1087
+ # Pass arguments to `get_backup_collection` via a request object, either of type
1088
+ # {::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest} or an equivalent Hash.
1089
+ #
1090
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest, ::Hash]
1091
+ # A request object representing the call parameters. Required. To specify no
1092
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1093
+ # @param options [::Gapic::CallOptions, ::Hash]
1094
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1095
+ #
1096
+ # @overload get_backup_collection(name: nil)
1097
+ # Pass arguments to `get_backup_collection` via keyword arguments. Note that at
1098
+ # least one keyword argument is required. To specify no parameters, or to keep all
1099
+ # the default parameter values, pass an empty Hash as a request object (see above).
1100
+ #
1101
+ # @param name [::String]
1102
+ # Required. Instance backupCollection resource name using the form:
1103
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
1104
+ # where `location_id` refers to a Google Cloud region.
1105
+ # @yield [result, operation] Access the result along with the TransportOperation object
1106
+ # @yieldparam result [::Google::Cloud::Memorystore::V1beta::BackupCollection]
1107
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1108
+ #
1109
+ # @return [::Google::Cloud::Memorystore::V1beta::BackupCollection]
1110
+ #
1111
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1112
+ #
1113
+ # @example Basic example
1114
+ # require "google/cloud/memorystore/v1beta"
1115
+ #
1116
+ # # Create a client object. The client can be reused for multiple calls.
1117
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1118
+ #
1119
+ # # Create a request. To set request fields, pass in keyword arguments.
1120
+ # request = Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest.new
1121
+ #
1122
+ # # Call the get_backup_collection method.
1123
+ # result = client.get_backup_collection request
1124
+ #
1125
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::BackupCollection.
1126
+ # p result
1127
+ #
1128
+ def get_backup_collection request, options = nil
1129
+ raise ::ArgumentError, "request must be provided" if request.nil?
1130
+
1131
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetBackupCollectionRequest
1132
+
1133
+ # Converts hash and nil to an options object
1134
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1135
+
1136
+ # Customize the options with defaults
1137
+ call_metadata = @config.rpcs.get_backup_collection.metadata.to_h
1138
+
1139
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1140
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1141
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1142
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1143
+ transports_version_send: [:rest]
1144
+
1145
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1146
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1147
+
1148
+ options.apply_defaults timeout: @config.rpcs.get_backup_collection.timeout,
1149
+ metadata: call_metadata,
1150
+ retry_policy: @config.rpcs.get_backup_collection.retry_policy
1151
+
1152
+ options.apply_defaults timeout: @config.timeout,
1153
+ metadata: @config.metadata,
1154
+ retry_policy: @config.retry_policy
1155
+
1156
+ @memorystore_stub.get_backup_collection request, options do |result, operation|
1157
+ yield result, operation if block_given?
1158
+ end
1159
+ rescue ::Gapic::Rest::Error => e
1160
+ raise ::Google::Cloud::Error.from_error(e)
1161
+ end
1162
+
1163
+ ##
1164
+ # Lists all backups owned by a backup collection.
1165
+ #
1166
+ # @overload list_backups(request, options = nil)
1167
+ # Pass arguments to `list_backups` via a request object, either of type
1168
+ # {::Google::Cloud::Memorystore::V1beta::ListBackupsRequest} or an equivalent Hash.
1169
+ #
1170
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListBackupsRequest, ::Hash]
1171
+ # A request object representing the call parameters. Required. To specify no
1172
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1173
+ # @param options [::Gapic::CallOptions, ::Hash]
1174
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1175
+ #
1176
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil)
1177
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1178
+ # least one keyword argument is required. To specify no parameters, or to keep all
1179
+ # the default parameter values, pass an empty Hash as a request object (see above).
1180
+ #
1181
+ # @param parent [::String]
1182
+ # Required. The resource name of the backupCollection using the form:
1183
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
1184
+ # @param page_size [::Integer]
1185
+ # Optional. The maximum number of items to return.
1186
+ #
1187
+ # If not specified, a default value of 1000 will be used by the service.
1188
+ # Regardless of the page_size value, the response may include a partial list
1189
+ # and a caller should only rely on response's
1190
+ # `next_page_token`
1191
+ # to determine if there are more clusters left to be queried.
1192
+ # @param page_token [::String]
1193
+ # Optional. The `next_page_token` value returned from a previous
1194
+ # `ListBackupCollections` request, if any.
1195
+ # @yield [result, operation] Access the result along with the TransportOperation object
1196
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::Backup>]
1197
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1198
+ #
1199
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::Backup>]
1200
+ #
1201
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1202
+ #
1203
+ # @example Basic example
1204
+ # require "google/cloud/memorystore/v1beta"
1205
+ #
1206
+ # # Create a client object. The client can be reused for multiple calls.
1207
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1208
+ #
1209
+ # # Create a request. To set request fields, pass in keyword arguments.
1210
+ # request = Google::Cloud::Memorystore::V1beta::ListBackupsRequest.new
1211
+ #
1212
+ # # Call the list_backups method.
1213
+ # result = client.list_backups request
1214
+ #
1215
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1216
+ # # over elements, and API calls will be issued to fetch pages as needed.
1217
+ # result.each do |item|
1218
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::Backup.
1219
+ # p item
1220
+ # end
1221
+ #
1222
+ def list_backups request, options = nil
1223
+ raise ::ArgumentError, "request must be provided" if request.nil?
1224
+
1225
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListBackupsRequest
1226
+
1227
+ # Converts hash and nil to an options object
1228
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1229
+
1230
+ # Customize the options with defaults
1231
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
1232
+
1233
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1234
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1235
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1236
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1237
+ transports_version_send: [:rest]
1238
+
1239
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1240
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1241
+
1242
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1243
+ metadata: call_metadata,
1244
+ retry_policy: @config.rpcs.list_backups.retry_policy
1245
+
1246
+ options.apply_defaults timeout: @config.timeout,
1247
+ metadata: @config.metadata,
1248
+ retry_policy: @config.retry_policy
1249
+
1250
+ @memorystore_stub.list_backups request, options do |result, operation|
1251
+ result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backups, "backups", request, result, options
1252
+ yield result, operation if block_given?
1253
+ throw :response, result
1254
+ end
1255
+ rescue ::Gapic::Rest::Error => e
1256
+ raise ::Google::Cloud::Error.from_error(e)
1257
+ end
1258
+
1259
+ ##
1260
+ # Gets the details of a specific backup.
1261
+ #
1262
+ # @overload get_backup(request, options = nil)
1263
+ # Pass arguments to `get_backup` via a request object, either of type
1264
+ # {::Google::Cloud::Memorystore::V1beta::GetBackupRequest} or an equivalent Hash.
1265
+ #
1266
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetBackupRequest, ::Hash]
1267
+ # A request object representing the call parameters. Required. To specify no
1268
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1269
+ # @param options [::Gapic::CallOptions, ::Hash]
1270
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1271
+ #
1272
+ # @overload get_backup(name: nil)
1273
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1274
+ # least one keyword argument is required. To specify no parameters, or to keep all
1275
+ # the default parameter values, pass an empty Hash as a request object (see above).
1276
+ #
1277
+ # @param name [::String]
1278
+ # Required. Instance backup resource name using the form:
1279
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1280
+ # @yield [result, operation] Access the result along with the TransportOperation object
1281
+ # @yieldparam result [::Google::Cloud::Memorystore::V1beta::Backup]
1282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1283
+ #
1284
+ # @return [::Google::Cloud::Memorystore::V1beta::Backup]
1285
+ #
1286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1287
+ #
1288
+ # @example Basic example
1289
+ # require "google/cloud/memorystore/v1beta"
1290
+ #
1291
+ # # Create a client object. The client can be reused for multiple calls.
1292
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1293
+ #
1294
+ # # Create a request. To set request fields, pass in keyword arguments.
1295
+ # request = Google::Cloud::Memorystore::V1beta::GetBackupRequest.new
1296
+ #
1297
+ # # Call the get_backup method.
1298
+ # result = client.get_backup request
1299
+ #
1300
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::Backup.
1301
+ # p result
1302
+ #
1303
+ def get_backup request, options = nil
1304
+ raise ::ArgumentError, "request must be provided" if request.nil?
1305
+
1306
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetBackupRequest
1307
+
1308
+ # Converts hash and nil to an options object
1309
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1310
+
1311
+ # Customize the options with defaults
1312
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
1313
+
1314
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1315
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1316
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1317
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1318
+ transports_version_send: [:rest]
1319
+
1320
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1321
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1322
+
1323
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1324
+ metadata: call_metadata,
1325
+ retry_policy: @config.rpcs.get_backup.retry_policy
1326
+
1327
+ options.apply_defaults timeout: @config.timeout,
1328
+ metadata: @config.metadata,
1329
+ retry_policy: @config.retry_policy
1330
+
1331
+ @memorystore_stub.get_backup request, options do |result, operation|
1332
+ yield result, operation if block_given?
1333
+ end
1334
+ rescue ::Gapic::Rest::Error => e
1335
+ raise ::Google::Cloud::Error.from_error(e)
1336
+ end
1337
+
1338
+ ##
1339
+ # Deletes a specific backup.
1340
+ #
1341
+ # @overload delete_backup(request, options = nil)
1342
+ # Pass arguments to `delete_backup` via a request object, either of type
1343
+ # {::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest} or an equivalent Hash.
1344
+ #
1345
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest, ::Hash]
1346
+ # A request object representing the call parameters. Required. To specify no
1347
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1348
+ # @param options [::Gapic::CallOptions, ::Hash]
1349
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1350
+ #
1351
+ # @overload delete_backup(name: nil, request_id: nil)
1352
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1353
+ # least one keyword argument is required. To specify no parameters, or to keep all
1354
+ # the default parameter values, pass an empty Hash as a request object (see above).
1355
+ #
1356
+ # @param name [::String]
1357
+ # Required. Instance backup resource name using the form:
1358
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1359
+ # @param request_id [::String]
1360
+ # Optional. Idempotent request UUID.
1361
+ # @yield [result, operation] Access the result along with the TransportOperation object
1362
+ # @yieldparam result [::Gapic::Operation]
1363
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1364
+ #
1365
+ # @return [::Gapic::Operation]
1366
+ #
1367
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1368
+ #
1369
+ # @example Basic example
1370
+ # require "google/cloud/memorystore/v1beta"
1371
+ #
1372
+ # # Create a client object. The client can be reused for multiple calls.
1373
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1374
+ #
1375
+ # # Create a request. To set request fields, pass in keyword arguments.
1376
+ # request = Google::Cloud::Memorystore::V1beta::DeleteBackupRequest.new
1377
+ #
1378
+ # # Call the delete_backup method.
1379
+ # result = client.delete_backup request
1380
+ #
1381
+ # # The returned object is of type Gapic::Operation. You can use it to
1382
+ # # check the status of an operation, cancel it, or wait for results.
1383
+ # # Here is how to wait for a response.
1384
+ # result.wait_until_done! timeout: 60
1385
+ # if result.response?
1386
+ # p result.response
1387
+ # else
1388
+ # puts "No response received."
1389
+ # end
1390
+ #
1391
+ def delete_backup request, options = nil
1392
+ raise ::ArgumentError, "request must be provided" if request.nil?
1393
+
1394
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteBackupRequest
1395
+
1396
+ # Converts hash and nil to an options object
1397
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1398
+
1399
+ # Customize the options with defaults
1400
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
1401
+
1402
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1403
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1404
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1405
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1406
+ transports_version_send: [:rest]
1407
+
1408
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1409
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1410
+
1411
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1412
+ metadata: call_metadata,
1413
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1414
+
1415
+ options.apply_defaults timeout: @config.timeout,
1416
+ metadata: @config.metadata,
1417
+ retry_policy: @config.retry_policy
1418
+
1419
+ @memorystore_stub.delete_backup request, options do |result, operation|
1420
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1421
+ yield result, operation if block_given?
1422
+ throw :response, result
1423
+ end
1424
+ rescue ::Gapic::Rest::Error => e
1425
+ raise ::Google::Cloud::Error.from_error(e)
1426
+ end
1427
+
1428
+ ##
1429
+ # Exports a specific backup to a customer target Cloud Storage URI.
1430
+ #
1431
+ # @overload export_backup(request, options = nil)
1432
+ # Pass arguments to `export_backup` via a request object, either of type
1433
+ # {::Google::Cloud::Memorystore::V1beta::ExportBackupRequest} or an equivalent Hash.
1434
+ #
1435
+ # @param request [::Google::Cloud::Memorystore::V1beta::ExportBackupRequest, ::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 export_backup(gcs_bucket: nil, name: nil)
1442
+ # Pass arguments to `export_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 gcs_bucket [::String]
1447
+ # Google Cloud Storage bucket, like "my-bucket".
1448
+ # @param name [::String]
1449
+ # Required. Instance backup resource name using the form:
1450
+ # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
1451
+ # @yield [result, operation] Access the result along with the TransportOperation object
1452
+ # @yieldparam result [::Gapic::Operation]
1453
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1454
+ #
1455
+ # @return [::Gapic::Operation]
1456
+ #
1457
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1458
+ #
1459
+ # @example Basic example
1460
+ # require "google/cloud/memorystore/v1beta"
1461
+ #
1462
+ # # Create a client object. The client can be reused for multiple calls.
1463
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1464
+ #
1465
+ # # Create a request. To set request fields, pass in keyword arguments.
1466
+ # request = Google::Cloud::Memorystore::V1beta::ExportBackupRequest.new
1467
+ #
1468
+ # # Call the export_backup method.
1469
+ # result = client.export_backup request
1470
+ #
1471
+ # # The returned object is of type Gapic::Operation. You can use it to
1472
+ # # check the status of an operation, cancel it, or wait for results.
1473
+ # # Here is how to wait for a response.
1474
+ # result.wait_until_done! timeout: 60
1475
+ # if result.response?
1476
+ # p result.response
1477
+ # else
1478
+ # puts "No response received."
1479
+ # end
1480
+ #
1481
+ def export_backup request, options = nil
1482
+ raise ::ArgumentError, "request must be provided" if request.nil?
1483
+
1484
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ExportBackupRequest
1485
+
1486
+ # Converts hash and nil to an options object
1487
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1488
+
1489
+ # Customize the options with defaults
1490
+ call_metadata = @config.rpcs.export_backup.metadata.to_h
1491
+
1492
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1493
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1494
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1495
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1496
+ transports_version_send: [:rest]
1497
+
1498
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1499
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1500
+
1501
+ options.apply_defaults timeout: @config.rpcs.export_backup.timeout,
1502
+ metadata: call_metadata,
1503
+ retry_policy: @config.rpcs.export_backup.retry_policy
1504
+
1505
+ options.apply_defaults timeout: @config.timeout,
1506
+ metadata: @config.metadata,
1507
+ retry_policy: @config.retry_policy
1508
+
1509
+ @memorystore_stub.export_backup request, options do |result, operation|
1510
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1511
+ yield result, operation if block_given?
1512
+ throw :response, result
1513
+ end
1514
+ rescue ::Gapic::Rest::Error => e
1515
+ raise ::Google::Cloud::Error.from_error(e)
1516
+ end
1517
+
1518
+ ##
1519
+ # Backup Instance.
1520
+ # If this is the first time a backup is being created, a backup collection
1521
+ # will be created at the backend, and this backup belongs to this collection.
1522
+ # Both collection and backup will have a resource name. Backup will be
1523
+ # executed for each shard. A replica (primary if nonHA) will be selected to
1524
+ # perform the execution. Backup call will be rejected if there is an ongoing
1525
+ # backup or update operation. Be aware that during preview, if the instance's
1526
+ # internal software version is too old, critical update will be performed
1527
+ # before actual backup. Once the internal software version is updated to the
1528
+ # minimum version required by the backup feature, subsequent backups will not
1529
+ # require critical update. After preview, there will be no critical update
1530
+ # needed for backup.
1531
+ #
1532
+ # @overload backup_instance(request, options = nil)
1533
+ # Pass arguments to `backup_instance` via a request object, either of type
1534
+ # {::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest} or an equivalent Hash.
1535
+ #
1536
+ # @param request [::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest, ::Hash]
1537
+ # A request object representing the call parameters. Required. To specify no
1538
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1539
+ # @param options [::Gapic::CallOptions, ::Hash]
1540
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1541
+ #
1542
+ # @overload backup_instance(name: nil, ttl: nil, backup_id: nil)
1543
+ # Pass arguments to `backup_instance` via keyword arguments. Note that at
1544
+ # least one keyword argument is required. To specify no parameters, or to keep all
1545
+ # the default parameter values, pass an empty Hash as a request object (see above).
1546
+ #
1547
+ # @param name [::String]
1548
+ # Required. Instance resource name using the form:
1549
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
1550
+ # where `location_id` refers to a Google Cloud region.
1551
+ # @param ttl [::Google::Protobuf::Duration, ::Hash]
1552
+ # Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
1553
+ # If not specified, the default value is 100 years.
1554
+ # @param backup_id [::String]
1555
+ # Optional. The id of the backup to be created. If not specified, the
1556
+ # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used.
1557
+ # @yield [result, operation] Access the result along with the TransportOperation object
1558
+ # @yieldparam result [::Gapic::Operation]
1559
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1560
+ #
1561
+ # @return [::Gapic::Operation]
1562
+ #
1563
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1564
+ #
1565
+ # @example Basic example
1566
+ # require "google/cloud/memorystore/v1beta"
1567
+ #
1568
+ # # Create a client object. The client can be reused for multiple calls.
1569
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1570
+ #
1571
+ # # Create a request. To set request fields, pass in keyword arguments.
1572
+ # request = Google::Cloud::Memorystore::V1beta::BackupInstanceRequest.new
1573
+ #
1574
+ # # Call the backup_instance method.
1575
+ # result = client.backup_instance request
1576
+ #
1577
+ # # The returned object is of type Gapic::Operation. You can use it to
1578
+ # # check the status of an operation, cancel it, or wait for results.
1579
+ # # Here is how to wait for a response.
1580
+ # result.wait_until_done! timeout: 60
1581
+ # if result.response?
1582
+ # p result.response
1583
+ # else
1584
+ # puts "No response received."
1585
+ # end
1586
+ #
1587
+ def backup_instance request, options = nil
1588
+ raise ::ArgumentError, "request must be provided" if request.nil?
1589
+
1590
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::BackupInstanceRequest
1591
+
1592
+ # Converts hash and nil to an options object
1593
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1594
+
1595
+ # Customize the options with defaults
1596
+ call_metadata = @config.rpcs.backup_instance.metadata.to_h
1597
+
1598
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1599
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1600
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1601
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1602
+ transports_version_send: [:rest]
1603
+
1604
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1605
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1606
+
1607
+ options.apply_defaults timeout: @config.rpcs.backup_instance.timeout,
1608
+ metadata: call_metadata,
1609
+ retry_policy: @config.rpcs.backup_instance.retry_policy
1610
+
1611
+ options.apply_defaults timeout: @config.timeout,
1612
+ metadata: @config.metadata,
1613
+ retry_policy: @config.retry_policy
1614
+
1615
+ @memorystore_stub.backup_instance request, options do |result, operation|
1616
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1617
+ yield result, operation if block_given?
1618
+ throw :response, result
1619
+ end
1620
+ rescue ::Gapic::Rest::Error => e
1621
+ raise ::Google::Cloud::Error.from_error(e)
1622
+ end
1623
+
1624
+ ##
1625
+ # Initiates the migration of a source instance to the target Memorystore
1626
+ # instance.
1627
+ #
1628
+ # After the successful completion of this operation, the target instance
1629
+ # will:
1630
+ # 1. Set up replication with the source instance and replicate any writes to
1631
+ # the source instance.
1632
+ # 2. Only allow reads.
1633
+ #
1634
+ # @overload start_migration(request, options = nil)
1635
+ # Pass arguments to `start_migration` via a request object, either of type
1636
+ # {::Google::Cloud::Memorystore::V1beta::StartMigrationRequest} or an equivalent Hash.
1637
+ #
1638
+ # @param request [::Google::Cloud::Memorystore::V1beta::StartMigrationRequest, ::Hash]
1639
+ # A request object representing the call parameters. Required. To specify no
1640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1641
+ # @param options [::Gapic::CallOptions, ::Hash]
1642
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1643
+ #
1644
+ # @overload start_migration(self_managed_source: nil, name: nil)
1645
+ # Pass arguments to `start_migration` via keyword arguments. Note that at
1646
+ # least one keyword argument is required. To specify no parameters, or to keep all
1647
+ # the default parameter values, pass an empty Hash as a request object (see above).
1648
+ #
1649
+ # @param self_managed_source [::Google::Cloud::Memorystore::V1beta::SelfManagedSource, ::Hash]
1650
+ # Required. Configuration for migrating from a self-managed Valkey/Redis
1651
+ # instance
1652
+ # @param name [::String]
1653
+ # Required. The resource name of the instance to start migration on.
1654
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1655
+ # @yield [result, operation] Access the result along with the TransportOperation object
1656
+ # @yieldparam result [::Gapic::Operation]
1657
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1658
+ #
1659
+ # @return [::Gapic::Operation]
1660
+ #
1661
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1662
+ #
1663
+ # @example Basic example
1664
+ # require "google/cloud/memorystore/v1beta"
1665
+ #
1666
+ # # Create a client object. The client can be reused for multiple calls.
1667
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1668
+ #
1669
+ # # Create a request. To set request fields, pass in keyword arguments.
1670
+ # request = Google::Cloud::Memorystore::V1beta::StartMigrationRequest.new
1671
+ #
1672
+ # # Call the start_migration method.
1673
+ # result = client.start_migration request
1674
+ #
1675
+ # # The returned object is of type Gapic::Operation. You can use it to
1676
+ # # check the status of an operation, cancel it, or wait for results.
1677
+ # # Here is how to wait for a response.
1678
+ # result.wait_until_done! timeout: 60
1679
+ # if result.response?
1680
+ # p result.response
1681
+ # else
1682
+ # puts "No response received."
1683
+ # end
1684
+ #
1685
+ def start_migration request, options = nil
1686
+ raise ::ArgumentError, "request must be provided" if request.nil?
1687
+
1688
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::StartMigrationRequest
1689
+
1690
+ # Converts hash and nil to an options object
1691
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1692
+
1693
+ # Customize the options with defaults
1694
+ call_metadata = @config.rpcs.start_migration.metadata.to_h
1695
+
1696
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1697
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1698
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1699
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1700
+ transports_version_send: [:rest]
1701
+
1702
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1703
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1704
+
1705
+ options.apply_defaults timeout: @config.rpcs.start_migration.timeout,
1706
+ metadata: call_metadata,
1707
+ retry_policy: @config.rpcs.start_migration.retry_policy
1708
+
1709
+ options.apply_defaults timeout: @config.timeout,
1710
+ metadata: @config.metadata,
1711
+ retry_policy: @config.retry_policy
1712
+
1713
+ @memorystore_stub.start_migration request, options do |result, operation|
1714
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1715
+ yield result, operation if block_given?
1716
+ throw :response, result
1717
+ end
1718
+ rescue ::Gapic::Rest::Error => e
1719
+ raise ::Google::Cloud::Error.from_error(e)
1720
+ end
1721
+
1722
+ ##
1723
+ # Finalizes the migration process.
1724
+ #
1725
+ # After the successful completion of this operation, the target instance
1726
+ # will:
1727
+ # 1. Stop replicating from the source instance.
1728
+ # 2. Allow both reads and writes.
1729
+ #
1730
+ # @overload finish_migration(request, options = nil)
1731
+ # Pass arguments to `finish_migration` via a request object, either of type
1732
+ # {::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest} or an equivalent Hash.
1733
+ #
1734
+ # @param request [::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest, ::Hash]
1735
+ # A request object representing the call parameters. Required. To specify no
1736
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1737
+ # @param options [::Gapic::CallOptions, ::Hash]
1738
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1739
+ #
1740
+ # @overload finish_migration(name: nil, force: nil)
1741
+ # Pass arguments to `finish_migration` via keyword arguments. Note that at
1742
+ # least one keyword argument is required. To specify no parameters, or to keep all
1743
+ # the default parameter values, pass an empty Hash as a request object (see above).
1744
+ #
1745
+ # @param name [::String]
1746
+ # Required. The resource name of the instance to finalize migration on.
1747
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1748
+ # @param force [::Boolean]
1749
+ # Optional. By default, the `FinishMigration` operation ensures the target
1750
+ # replication offset to catch up to the source offset as of the time of the
1751
+ # call. Set this field to `true` to bypass this offset verification check.
1752
+ # @yield [result, operation] Access the result along with the TransportOperation object
1753
+ # @yieldparam result [::Gapic::Operation]
1754
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1755
+ #
1756
+ # @return [::Gapic::Operation]
1757
+ #
1758
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1759
+ #
1760
+ # @example Basic example
1761
+ # require "google/cloud/memorystore/v1beta"
1762
+ #
1763
+ # # Create a client object. The client can be reused for multiple calls.
1764
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1765
+ #
1766
+ # # Create a request. To set request fields, pass in keyword arguments.
1767
+ # request = Google::Cloud::Memorystore::V1beta::FinishMigrationRequest.new
1768
+ #
1769
+ # # Call the finish_migration method.
1770
+ # result = client.finish_migration request
1771
+ #
1772
+ # # The returned object is of type Gapic::Operation. You can use it to
1773
+ # # check the status of an operation, cancel it, or wait for results.
1774
+ # # Here is how to wait for a response.
1775
+ # result.wait_until_done! timeout: 60
1776
+ # if result.response?
1777
+ # p result.response
1778
+ # else
1779
+ # puts "No response received."
1780
+ # end
1781
+ #
1782
+ def finish_migration request, options = nil
1783
+ raise ::ArgumentError, "request must be provided" if request.nil?
1784
+
1785
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::FinishMigrationRequest
1786
+
1787
+ # Converts hash and nil to an options object
1788
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1789
+
1790
+ # Customize the options with defaults
1791
+ call_metadata = @config.rpcs.finish_migration.metadata.to_h
1792
+
1793
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1794
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1795
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1796
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1797
+ transports_version_send: [:rest]
1798
+
1799
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1800
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1801
+
1802
+ options.apply_defaults timeout: @config.rpcs.finish_migration.timeout,
1803
+ metadata: call_metadata,
1804
+ retry_policy: @config.rpcs.finish_migration.retry_policy
1805
+
1806
+ options.apply_defaults timeout: @config.timeout,
1807
+ metadata: @config.metadata,
1808
+ retry_policy: @config.retry_policy
1809
+
1810
+ @memorystore_stub.finish_migration request, options do |result, operation|
1811
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1812
+ yield result, operation if block_given?
1813
+ throw :response, result
1814
+ end
1815
+ rescue ::Gapic::Rest::Error => e
1816
+ raise ::Google::Cloud::Error.from_error(e)
1817
+ end
1818
+
1819
+ ##
1820
+ # Lists all the token auth users for a token based auth enabled instance.
1821
+ #
1822
+ # @overload list_token_auth_users(request, options = nil)
1823
+ # Pass arguments to `list_token_auth_users` via a request object, either of type
1824
+ # {::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest} or an equivalent Hash.
1825
+ #
1826
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest, ::Hash]
1827
+ # A request object representing the call parameters. Required. To specify no
1828
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1829
+ # @param options [::Gapic::CallOptions, ::Hash]
1830
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1831
+ #
1832
+ # @overload list_token_auth_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1833
+ # Pass arguments to `list_token_auth_users` via keyword arguments. Note that at
1834
+ # least one keyword argument is required. To specify no parameters, or to keep all
1835
+ # the default parameter values, pass an empty Hash as a request object (see above).
1836
+ #
1837
+ # @param parent [::String]
1838
+ # Required. The parent to list token auth users from.
1839
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1840
+ # @param page_size [::Integer]
1841
+ # Optional. The maximum number of items to return. The maximum value is 1000;
1842
+ # values above 1000 will be coerced to 1000. If not specified, a default
1843
+ # value of 1000 will be used by the service. Regardless of the page_size
1844
+ # value, the response may include a partial list and a caller should only
1845
+ # rely on response's `next_page_token` to determine if there are more token
1846
+ # auth users left to be queried.
1847
+ # @param page_token [::String]
1848
+ # Optional. The `next_page_token` value returned from a previous
1849
+ # `ListTokenAuthUsers` request, if any.
1850
+ # @param filter [::String]
1851
+ # Optional. Expression for filtering results.
1852
+ # @param order_by [::String]
1853
+ # Optional. Sort results by a defined order.
1854
+ # @yield [result, operation] Access the result along with the TransportOperation object
1855
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::TokenAuthUser>]
1856
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1857
+ #
1858
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::TokenAuthUser>]
1859
+ #
1860
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1861
+ #
1862
+ # @example Basic example
1863
+ # require "google/cloud/memorystore/v1beta"
1864
+ #
1865
+ # # Create a client object. The client can be reused for multiple calls.
1866
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1867
+ #
1868
+ # # Create a request. To set request fields, pass in keyword arguments.
1869
+ # request = Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest.new
1870
+ #
1871
+ # # Call the list_token_auth_users method.
1872
+ # result = client.list_token_auth_users request
1873
+ #
1874
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1875
+ # # over elements, and API calls will be issued to fetch pages as needed.
1876
+ # result.each do |item|
1877
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::TokenAuthUser.
1878
+ # p item
1879
+ # end
1880
+ #
1881
+ def list_token_auth_users request, options = nil
1882
+ raise ::ArgumentError, "request must be provided" if request.nil?
1883
+
1884
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListTokenAuthUsersRequest
1885
+
1886
+ # Converts hash and nil to an options object
1887
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1888
+
1889
+ # Customize the options with defaults
1890
+ call_metadata = @config.rpcs.list_token_auth_users.metadata.to_h
1891
+
1892
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1893
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1894
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1895
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1896
+ transports_version_send: [:rest]
1897
+
1898
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1899
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1900
+
1901
+ options.apply_defaults timeout: @config.rpcs.list_token_auth_users.timeout,
1902
+ metadata: call_metadata,
1903
+ retry_policy: @config.rpcs.list_token_auth_users.retry_policy
1904
+
1905
+ options.apply_defaults timeout: @config.timeout,
1906
+ metadata: @config.metadata,
1907
+ retry_policy: @config.retry_policy
1908
+
1909
+ @memorystore_stub.list_token_auth_users request, options do |result, operation|
1910
+ result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_token_auth_users, "token_auth_users", request, result, options
1911
+ yield result, operation if block_given?
1912
+ throw :response, result
1913
+ end
1914
+ rescue ::Gapic::Rest::Error => e
1915
+ raise ::Google::Cloud::Error.from_error(e)
1916
+ end
1917
+
1918
+ ##
1919
+ # Gets a specific token auth user for a token based auth enabled instance.
1920
+ #
1921
+ # @overload get_token_auth_user(request, options = nil)
1922
+ # Pass arguments to `get_token_auth_user` via a request object, either of type
1923
+ # {::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest} or an equivalent Hash.
1924
+ #
1925
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest, ::Hash]
1926
+ # A request object representing the call parameters. Required. To specify no
1927
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1928
+ # @param options [::Gapic::CallOptions, ::Hash]
1929
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1930
+ #
1931
+ # @overload get_token_auth_user(name: nil)
1932
+ # Pass arguments to `get_token_auth_user` via keyword arguments. Note that at
1933
+ # least one keyword argument is required. To specify no parameters, or to keep all
1934
+ # the default parameter values, pass an empty Hash as a request object (see above).
1935
+ #
1936
+ # @param name [::String]
1937
+ # Required. The name of token auth user for a basic auth enabled instance.
1938
+ # Format:
1939
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
1940
+ # @yield [result, operation] Access the result along with the TransportOperation object
1941
+ # @yieldparam result [::Google::Cloud::Memorystore::V1beta::TokenAuthUser]
1942
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1943
+ #
1944
+ # @return [::Google::Cloud::Memorystore::V1beta::TokenAuthUser]
1945
+ #
1946
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1947
+ #
1948
+ # @example Basic example
1949
+ # require "google/cloud/memorystore/v1beta"
1950
+ #
1951
+ # # Create a client object. The client can be reused for multiple calls.
1952
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
1953
+ #
1954
+ # # Create a request. To set request fields, pass in keyword arguments.
1955
+ # request = Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest.new
1956
+ #
1957
+ # # Call the get_token_auth_user method.
1958
+ # result = client.get_token_auth_user request
1959
+ #
1960
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::TokenAuthUser.
1961
+ # p result
1962
+ #
1963
+ def get_token_auth_user request, options = nil
1964
+ raise ::ArgumentError, "request must be provided" if request.nil?
1965
+
1966
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetTokenAuthUserRequest
1967
+
1968
+ # Converts hash and nil to an options object
1969
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1970
+
1971
+ # Customize the options with defaults
1972
+ call_metadata = @config.rpcs.get_token_auth_user.metadata.to_h
1973
+
1974
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1975
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1976
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1977
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
1978
+ transports_version_send: [:rest]
1979
+
1980
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1981
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1982
+
1983
+ options.apply_defaults timeout: @config.rpcs.get_token_auth_user.timeout,
1984
+ metadata: call_metadata,
1985
+ retry_policy: @config.rpcs.get_token_auth_user.retry_policy
1986
+
1987
+ options.apply_defaults timeout: @config.timeout,
1988
+ metadata: @config.metadata,
1989
+ retry_policy: @config.retry_policy
1990
+
1991
+ @memorystore_stub.get_token_auth_user request, options do |result, operation|
1992
+ yield result, operation if block_given?
1993
+ end
1994
+ rescue ::Gapic::Rest::Error => e
1995
+ raise ::Google::Cloud::Error.from_error(e)
1996
+ end
1997
+
1998
+ ##
1999
+ # Lists all the auth tokens for a specific token auth user.
2000
+ #
2001
+ # @overload list_auth_tokens(request, options = nil)
2002
+ # Pass arguments to `list_auth_tokens` via a request object, either of type
2003
+ # {::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest} or an equivalent Hash.
2004
+ #
2005
+ # @param request [::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest, ::Hash]
2006
+ # A request object representing the call parameters. Required. To specify no
2007
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2008
+ # @param options [::Gapic::CallOptions, ::Hash]
2009
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2010
+ #
2011
+ # @overload list_auth_tokens(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2012
+ # Pass arguments to `list_auth_tokens` via keyword arguments. Note that at
2013
+ # least one keyword argument is required. To specify no parameters, or to keep all
2014
+ # the default parameter values, pass an empty Hash as a request object (see above).
2015
+ #
2016
+ # @param parent [::String]
2017
+ # Required. The parent to list auth tokens from.
2018
+ # Format:
2019
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
2020
+ # @param page_size [::Integer]
2021
+ # Optional. The maximum number of items to return. The maximum value is 1000;
2022
+ # values above 1000 will be coerced to 1000.
2023
+ #
2024
+ # If not specified, a default value of 1000 will be used by the service.
2025
+ # Regardless of the page_size value, the response may include a partial list
2026
+ # and a caller should only rely on response's
2027
+ # `next_page_token`
2028
+ # to determine if there are more auth tokens left to be queried.
2029
+ # @param page_token [::String]
2030
+ # Optional. The `next_page_token` value returned from a previous
2031
+ # `ListAuthTokens` request, if any.
2032
+ # @param filter [::String]
2033
+ # Optional. Expression for filtering results.
2034
+ # @param order_by [::String]
2035
+ # Optional. Sort results by a defined order.
2036
+ # @yield [result, operation] Access the result along with the TransportOperation object
2037
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AuthToken>]
2038
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2039
+ #
2040
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::AuthToken>]
2041
+ #
2042
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2043
+ #
2044
+ # @example Basic example
2045
+ # require "google/cloud/memorystore/v1beta"
2046
+ #
2047
+ # # Create a client object. The client can be reused for multiple calls.
2048
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2049
+ #
2050
+ # # Create a request. To set request fields, pass in keyword arguments.
2051
+ # request = Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest.new
2052
+ #
2053
+ # # Call the list_auth_tokens method.
2054
+ # result = client.list_auth_tokens request
2055
+ #
2056
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2057
+ # # over elements, and API calls will be issued to fetch pages as needed.
2058
+ # result.each do |item|
2059
+ # # Each element is of type ::Google::Cloud::Memorystore::V1beta::AuthToken.
2060
+ # p item
2061
+ # end
2062
+ #
2063
+ def list_auth_tokens request, options = nil
2064
+ raise ::ArgumentError, "request must be provided" if request.nil?
2065
+
2066
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::ListAuthTokensRequest
2067
+
2068
+ # Converts hash and nil to an options object
2069
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2070
+
2071
+ # Customize the options with defaults
2072
+ call_metadata = @config.rpcs.list_auth_tokens.metadata.to_h
2073
+
2074
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2075
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2076
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2077
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2078
+ transports_version_send: [:rest]
2079
+
2080
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2081
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2082
+
2083
+ options.apply_defaults timeout: @config.rpcs.list_auth_tokens.timeout,
2084
+ metadata: call_metadata,
2085
+ retry_policy: @config.rpcs.list_auth_tokens.retry_policy
2086
+
2087
+ options.apply_defaults timeout: @config.timeout,
2088
+ metadata: @config.metadata,
2089
+ retry_policy: @config.retry_policy
2090
+
2091
+ @memorystore_stub.list_auth_tokens request, options do |result, operation|
2092
+ result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_auth_tokens, "auth_tokens", request, result, options
2093
+ yield result, operation if block_given?
2094
+ throw :response, result
2095
+ end
2096
+ rescue ::Gapic::Rest::Error => e
2097
+ raise ::Google::Cloud::Error.from_error(e)
2098
+ end
2099
+
2100
+ ##
2101
+ # Gets a token based auth enabled instance's auth token for a given user.
2102
+ #
2103
+ # @overload get_auth_token(request, options = nil)
2104
+ # Pass arguments to `get_auth_token` via a request object, either of type
2105
+ # {::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest} or an equivalent Hash.
2106
+ #
2107
+ # @param request [::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest, ::Hash]
2108
+ # A request object representing the call parameters. Required. To specify no
2109
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2110
+ # @param options [::Gapic::CallOptions, ::Hash]
2111
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2112
+ #
2113
+ # @overload get_auth_token(name: nil)
2114
+ # Pass arguments to `get_auth_token` via keyword arguments. Note that at
2115
+ # least one keyword argument is required. To specify no parameters, or to keep all
2116
+ # the default parameter values, pass an empty Hash as a request object (see above).
2117
+ #
2118
+ # @param name [::String]
2119
+ # Required. The name of token auth user for a token auth enabled instance.
2120
+ # Format:
2121
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{auth_token}
2122
+ # @yield [result, operation] Access the result along with the TransportOperation object
2123
+ # @yieldparam result [::Google::Cloud::Memorystore::V1beta::AuthToken]
2124
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2125
+ #
2126
+ # @return [::Google::Cloud::Memorystore::V1beta::AuthToken]
2127
+ #
2128
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2129
+ #
2130
+ # @example Basic example
2131
+ # require "google/cloud/memorystore/v1beta"
2132
+ #
2133
+ # # Create a client object. The client can be reused for multiple calls.
2134
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2135
+ #
2136
+ # # Create a request. To set request fields, pass in keyword arguments.
2137
+ # request = Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest.new
2138
+ #
2139
+ # # Call the get_auth_token method.
2140
+ # result = client.get_auth_token request
2141
+ #
2142
+ # # The returned object is of type Google::Cloud::Memorystore::V1beta::AuthToken.
2143
+ # p result
2144
+ #
2145
+ def get_auth_token request, options = nil
2146
+ raise ::ArgumentError, "request must be provided" if request.nil?
2147
+
2148
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::GetAuthTokenRequest
2149
+
2150
+ # Converts hash and nil to an options object
2151
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2152
+
2153
+ # Customize the options with defaults
2154
+ call_metadata = @config.rpcs.get_auth_token.metadata.to_h
2155
+
2156
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2157
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2158
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2159
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2160
+ transports_version_send: [:rest]
2161
+
2162
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2163
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2164
+
2165
+ options.apply_defaults timeout: @config.rpcs.get_auth_token.timeout,
2166
+ metadata: call_metadata,
2167
+ retry_policy: @config.rpcs.get_auth_token.retry_policy
2168
+
2169
+ options.apply_defaults timeout: @config.timeout,
2170
+ metadata: @config.metadata,
2171
+ retry_policy: @config.retry_policy
2172
+
2173
+ @memorystore_stub.get_auth_token request, options do |result, operation|
2174
+ yield result, operation if block_given?
2175
+ end
2176
+ rescue ::Gapic::Rest::Error => e
2177
+ raise ::Google::Cloud::Error.from_error(e)
2178
+ end
2179
+
2180
+ ##
2181
+ # Adds a token auth user for a token based auth enabled instance.
2182
+ #
2183
+ # @overload add_token_auth_user(request, options = nil)
2184
+ # Pass arguments to `add_token_auth_user` via a request object, either of type
2185
+ # {::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest} or an equivalent Hash.
2186
+ #
2187
+ # @param request [::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest, ::Hash]
2188
+ # A request object representing the call parameters. Required. To specify no
2189
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2190
+ # @param options [::Gapic::CallOptions, ::Hash]
2191
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2192
+ #
2193
+ # @overload add_token_auth_user(instance: nil, token_auth_user: nil)
2194
+ # Pass arguments to `add_token_auth_user` via keyword arguments. Note that at
2195
+ # least one keyword argument is required. To specify no parameters, or to keep all
2196
+ # the default parameter values, pass an empty Hash as a request object (see above).
2197
+ #
2198
+ # @param instance [::String]
2199
+ # Required. The instance resource that this token auth user will be added
2200
+ # for. Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
2201
+ # @param token_auth_user [::String]
2202
+ # Required. The name of the token auth user to add.
2203
+ # @yield [result, operation] Access the result along with the TransportOperation object
2204
+ # @yieldparam result [::Gapic::Operation]
2205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2206
+ #
2207
+ # @return [::Gapic::Operation]
2208
+ #
2209
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2210
+ #
2211
+ # @example Basic example
2212
+ # require "google/cloud/memorystore/v1beta"
2213
+ #
2214
+ # # Create a client object. The client can be reused for multiple calls.
2215
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2216
+ #
2217
+ # # Create a request. To set request fields, pass in keyword arguments.
2218
+ # request = Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest.new
2219
+ #
2220
+ # # Call the add_token_auth_user method.
2221
+ # result = client.add_token_auth_user request
2222
+ #
2223
+ # # The returned object is of type Gapic::Operation. You can use it to
2224
+ # # check the status of an operation, cancel it, or wait for results.
2225
+ # # Here is how to wait for a response.
2226
+ # result.wait_until_done! timeout: 60
2227
+ # if result.response?
2228
+ # p result.response
2229
+ # else
2230
+ # puts "No response received."
2231
+ # end
2232
+ #
2233
+ def add_token_auth_user request, options = nil
2234
+ raise ::ArgumentError, "request must be provided" if request.nil?
2235
+
2236
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::AddTokenAuthUserRequest
2237
+
2238
+ # Converts hash and nil to an options object
2239
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2240
+
2241
+ # Customize the options with defaults
2242
+ call_metadata = @config.rpcs.add_token_auth_user.metadata.to_h
2243
+
2244
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2245
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2246
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2247
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2248
+ transports_version_send: [:rest]
2249
+
2250
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2251
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2252
+
2253
+ options.apply_defaults timeout: @config.rpcs.add_token_auth_user.timeout,
2254
+ metadata: call_metadata,
2255
+ retry_policy: @config.rpcs.add_token_auth_user.retry_policy
2256
+
2257
+ options.apply_defaults timeout: @config.timeout,
2258
+ metadata: @config.metadata,
2259
+ retry_policy: @config.retry_policy
2260
+
2261
+ @memorystore_stub.add_token_auth_user request, options do |result, operation|
2262
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2263
+ yield result, operation if block_given?
2264
+ throw :response, result
2265
+ end
2266
+ rescue ::Gapic::Rest::Error => e
2267
+ raise ::Google::Cloud::Error.from_error(e)
2268
+ end
2269
+
2270
+ ##
2271
+ # Deletes a token auth user for a token based auth enabled instance.
2272
+ #
2273
+ # @overload delete_token_auth_user(request, options = nil)
2274
+ # Pass arguments to `delete_token_auth_user` via a request object, either of type
2275
+ # {::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest} or an equivalent Hash.
2276
+ #
2277
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest, ::Hash]
2278
+ # A request object representing the call parameters. Required. To specify no
2279
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2280
+ # @param options [::Gapic::CallOptions, ::Hash]
2281
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2282
+ #
2283
+ # @overload delete_token_auth_user(name: nil, request_id: nil, force: nil)
2284
+ # Pass arguments to `delete_token_auth_user` via keyword arguments. Note that at
2285
+ # least one keyword argument is required. To specify no parameters, or to keep all
2286
+ # the default parameter values, pass an empty Hash as a request object (see above).
2287
+ #
2288
+ # @param name [::String]
2289
+ # Required. The name of the token auth user to delete.
2290
+ # Format:
2291
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}
2292
+ # @param request_id [::String]
2293
+ # Optional. An optional request ID to identify requests. Specify a unique
2294
+ # request ID so that if you must retry your request, the server will know to
2295
+ # ignore the request if it has already been completed. The server will
2296
+ # guarantee that for at least 60 minutes after the first request.
2297
+ #
2298
+ # For example, consider a situation where you make an initial request and the
2299
+ # request times out. If you make the request again with the same request
2300
+ # ID, the server can check if original operation with the same request ID
2301
+ # was received, and if so, will ignore the second request. This prevents
2302
+ # clients from accidentally creating duplicate commitments.
2303
+ #
2304
+ # The request ID must be a valid UUID with the exception that zero UUID is
2305
+ # not supported (00000000-0000-0000-0000-000000000000).
2306
+ # @param force [::Boolean]
2307
+ # Optional. If set to true, any auth tokens from this user will also be
2308
+ # deleted. Otherwise, the request will only work if the user has no auth
2309
+ # tokens.
2310
+ # @yield [result, operation] Access the result along with the TransportOperation object
2311
+ # @yieldparam result [::Gapic::Operation]
2312
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2313
+ #
2314
+ # @return [::Gapic::Operation]
2315
+ #
2316
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2317
+ #
2318
+ # @example Basic example
2319
+ # require "google/cloud/memorystore/v1beta"
2320
+ #
2321
+ # # Create a client object. The client can be reused for multiple calls.
2322
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2323
+ #
2324
+ # # Create a request. To set request fields, pass in keyword arguments.
2325
+ # request = Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest.new
2326
+ #
2327
+ # # Call the delete_token_auth_user method.
2328
+ # result = client.delete_token_auth_user request
2329
+ #
2330
+ # # The returned object is of type Gapic::Operation. You can use it to
2331
+ # # check the status of an operation, cancel it, or wait for results.
2332
+ # # Here is how to wait for a response.
2333
+ # result.wait_until_done! timeout: 60
2334
+ # if result.response?
2335
+ # p result.response
2336
+ # else
2337
+ # puts "No response received."
2338
+ # end
2339
+ #
2340
+ def delete_token_auth_user request, options = nil
2341
+ raise ::ArgumentError, "request must be provided" if request.nil?
2342
+
2343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteTokenAuthUserRequest
2344
+
2345
+ # Converts hash and nil to an options object
2346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2347
+
2348
+ # Customize the options with defaults
2349
+ call_metadata = @config.rpcs.delete_token_auth_user.metadata.to_h
2350
+
2351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2352
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2354
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2355
+ transports_version_send: [:rest]
2356
+
2357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2359
+
2360
+ options.apply_defaults timeout: @config.rpcs.delete_token_auth_user.timeout,
2361
+ metadata: call_metadata,
2362
+ retry_policy: @config.rpcs.delete_token_auth_user.retry_policy
2363
+
2364
+ options.apply_defaults timeout: @config.timeout,
2365
+ metadata: @config.metadata,
2366
+ retry_policy: @config.retry_policy
2367
+
2368
+ @memorystore_stub.delete_token_auth_user request, options do |result, operation|
2369
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2370
+ yield result, operation if block_given?
2371
+ throw :response, result
2372
+ end
2373
+ rescue ::Gapic::Rest::Error => e
2374
+ raise ::Google::Cloud::Error.from_error(e)
2375
+ end
2376
+
2377
+ ##
2378
+ # Adds a token for a user of a token based auth enabled instance.
2379
+ #
2380
+ # @overload add_auth_token(request, options = nil)
2381
+ # Pass arguments to `add_auth_token` via a request object, either of type
2382
+ # {::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest} or an equivalent Hash.
2383
+ #
2384
+ # @param request [::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest, ::Hash]
2385
+ # A request object representing the call parameters. Required. To specify no
2386
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2387
+ # @param options [::Gapic::CallOptions, ::Hash]
2388
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2389
+ #
2390
+ # @overload add_auth_token(token_auth_user: nil, auth_token: nil)
2391
+ # Pass arguments to `add_auth_token` via keyword arguments. Note that at
2392
+ # least one keyword argument is required. To specify no parameters, or to keep all
2393
+ # the default parameter values, pass an empty Hash as a request object (see above).
2394
+ #
2395
+ # @param token_auth_user [::String]
2396
+ # Required. The name of the token auth user resource that this token will be
2397
+ # added for.
2398
+ # @param auth_token [::Google::Cloud::Memorystore::V1beta::AuthToken, ::Hash]
2399
+ # Required. The auth token to add.
2400
+ # @yield [result, operation] Access the result along with the TransportOperation object
2401
+ # @yieldparam result [::Gapic::Operation]
2402
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2403
+ #
2404
+ # @return [::Gapic::Operation]
2405
+ #
2406
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2407
+ #
2408
+ # @example Basic example
2409
+ # require "google/cloud/memorystore/v1beta"
2410
+ #
2411
+ # # Create a client object. The client can be reused for multiple calls.
2412
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2413
+ #
2414
+ # # Create a request. To set request fields, pass in keyword arguments.
2415
+ # request = Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest.new
2416
+ #
2417
+ # # Call the add_auth_token method.
2418
+ # result = client.add_auth_token request
2419
+ #
2420
+ # # The returned object is of type Gapic::Operation. You can use it to
2421
+ # # check the status of an operation, cancel it, or wait for results.
2422
+ # # Here is how to wait for a response.
2423
+ # result.wait_until_done! timeout: 60
2424
+ # if result.response?
2425
+ # p result.response
2426
+ # else
2427
+ # puts "No response received."
2428
+ # end
2429
+ #
2430
+ def add_auth_token request, options = nil
2431
+ raise ::ArgumentError, "request must be provided" if request.nil?
2432
+
2433
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::AddAuthTokenRequest
2434
+
2435
+ # Converts hash and nil to an options object
2436
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2437
+
2438
+ # Customize the options with defaults
2439
+ call_metadata = @config.rpcs.add_auth_token.metadata.to_h
2440
+
2441
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2442
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2443
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2444
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2445
+ transports_version_send: [:rest]
2446
+
2447
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2448
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2449
+
2450
+ options.apply_defaults timeout: @config.rpcs.add_auth_token.timeout,
2451
+ metadata: call_metadata,
2452
+ retry_policy: @config.rpcs.add_auth_token.retry_policy
2453
+
2454
+ options.apply_defaults timeout: @config.timeout,
2455
+ metadata: @config.metadata,
2456
+ retry_policy: @config.retry_policy
2457
+
2458
+ @memorystore_stub.add_auth_token request, options do |result, operation|
2459
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2460
+ yield result, operation if block_given?
2461
+ throw :response, result
2462
+ end
2463
+ rescue ::Gapic::Rest::Error => e
2464
+ raise ::Google::Cloud::Error.from_error(e)
2465
+ end
2466
+
2467
+ ##
2468
+ # Deletes a token for a user of a token based auth enabled instance.
2469
+ #
2470
+ # @overload delete_auth_token(request, options = nil)
2471
+ # Pass arguments to `delete_auth_token` via a request object, either of type
2472
+ # {::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest} or an equivalent Hash.
2473
+ #
2474
+ # @param request [::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest, ::Hash]
2475
+ # A request object representing the call parameters. Required. To specify no
2476
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2477
+ # @param options [::Gapic::CallOptions, ::Hash]
2478
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2479
+ #
2480
+ # @overload delete_auth_token(name: nil)
2481
+ # Pass arguments to `delete_auth_token` via keyword arguments. Note that at
2482
+ # least one keyword argument is required. To specify no parameters, or to keep all
2483
+ # the default parameter values, pass an empty Hash as a request object (see above).
2484
+ #
2485
+ # @param name [::String]
2486
+ # Required. The name of the token auth user resource that this token will be
2487
+ # deleted from. Format:
2488
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{name}
2489
+ # @yield [result, operation] Access the result along with the TransportOperation object
2490
+ # @yieldparam result [::Gapic::Operation]
2491
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2492
+ #
2493
+ # @return [::Gapic::Operation]
2494
+ #
2495
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2496
+ #
2497
+ # @example Basic example
2498
+ # require "google/cloud/memorystore/v1beta"
2499
+ #
2500
+ # # Create a client object. The client can be reused for multiple calls.
2501
+ # client = Google::Cloud::Memorystore::V1beta::Memorystore::Rest::Client.new
2502
+ #
2503
+ # # Create a request. To set request fields, pass in keyword arguments.
2504
+ # request = Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest.new
2505
+ #
2506
+ # # Call the delete_auth_token method.
2507
+ # result = client.delete_auth_token request
2508
+ #
2509
+ # # The returned object is of type Gapic::Operation. You can use it to
2510
+ # # check the status of an operation, cancel it, or wait for results.
2511
+ # # Here is how to wait for a response.
2512
+ # result.wait_until_done! timeout: 60
2513
+ # if result.response?
2514
+ # p result.response
2515
+ # else
2516
+ # puts "No response received."
2517
+ # end
2518
+ #
2519
+ def delete_auth_token request, options = nil
2520
+ raise ::ArgumentError, "request must be provided" if request.nil?
2521
+
2522
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1beta::DeleteAuthTokenRequest
2523
+
2524
+ # Converts hash and nil to an options object
2525
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2526
+
2527
+ # Customize the options with defaults
2528
+ call_metadata = @config.rpcs.delete_auth_token.metadata.to_h
2529
+
2530
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2531
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2532
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2533
+ gapic_version: ::Google::Cloud::Memorystore::V1beta::VERSION,
2534
+ transports_version_send: [:rest]
2535
+
2536
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2537
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2538
+
2539
+ options.apply_defaults timeout: @config.rpcs.delete_auth_token.timeout,
2540
+ metadata: call_metadata,
2541
+ retry_policy: @config.rpcs.delete_auth_token.retry_policy
2542
+
2543
+ options.apply_defaults timeout: @config.timeout,
2544
+ metadata: @config.metadata,
2545
+ retry_policy: @config.retry_policy
2546
+
2547
+ @memorystore_stub.delete_auth_token request, options do |result, operation|
2548
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2549
+ yield result, operation if block_given?
2550
+ throw :response, result
2551
+ end
2552
+ rescue ::Gapic::Rest::Error => e
2553
+ raise ::Google::Cloud::Error.from_error(e)
2554
+ end
2555
+
887
2556
  ##
888
2557
  # Configuration class for the Memorystore REST API.
889
2558
  #
@@ -954,6 +2623,7 @@ module Google
954
2623
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
955
2624
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
956
2625
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2626
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
957
2627
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
958
2628
  # trigger a retry.
959
2629
  # @return [::Hash]
@@ -1033,6 +2703,7 @@ module Google
1033
2703
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1034
2704
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1035
2705
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2706
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1036
2707
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1037
2708
  # trigger a retry.
1038
2709
  #
@@ -1072,6 +2743,96 @@ module Google
1072
2743
  # @return [::Gapic::Config::Method]
1073
2744
  #
1074
2745
  attr_reader :get_shared_regional_certificate_authority
2746
+ ##
2747
+ # RPC-specific configuration for `reschedule_maintenance`
2748
+ # @return [::Gapic::Config::Method]
2749
+ #
2750
+ attr_reader :reschedule_maintenance
2751
+ ##
2752
+ # RPC-specific configuration for `list_backup_collections`
2753
+ # @return [::Gapic::Config::Method]
2754
+ #
2755
+ attr_reader :list_backup_collections
2756
+ ##
2757
+ # RPC-specific configuration for `get_backup_collection`
2758
+ # @return [::Gapic::Config::Method]
2759
+ #
2760
+ attr_reader :get_backup_collection
2761
+ ##
2762
+ # RPC-specific configuration for `list_backups`
2763
+ # @return [::Gapic::Config::Method]
2764
+ #
2765
+ attr_reader :list_backups
2766
+ ##
2767
+ # RPC-specific configuration for `get_backup`
2768
+ # @return [::Gapic::Config::Method]
2769
+ #
2770
+ attr_reader :get_backup
2771
+ ##
2772
+ # RPC-specific configuration for `delete_backup`
2773
+ # @return [::Gapic::Config::Method]
2774
+ #
2775
+ attr_reader :delete_backup
2776
+ ##
2777
+ # RPC-specific configuration for `export_backup`
2778
+ # @return [::Gapic::Config::Method]
2779
+ #
2780
+ attr_reader :export_backup
2781
+ ##
2782
+ # RPC-specific configuration for `backup_instance`
2783
+ # @return [::Gapic::Config::Method]
2784
+ #
2785
+ attr_reader :backup_instance
2786
+ ##
2787
+ # RPC-specific configuration for `start_migration`
2788
+ # @return [::Gapic::Config::Method]
2789
+ #
2790
+ attr_reader :start_migration
2791
+ ##
2792
+ # RPC-specific configuration for `finish_migration`
2793
+ # @return [::Gapic::Config::Method]
2794
+ #
2795
+ attr_reader :finish_migration
2796
+ ##
2797
+ # RPC-specific configuration for `list_token_auth_users`
2798
+ # @return [::Gapic::Config::Method]
2799
+ #
2800
+ attr_reader :list_token_auth_users
2801
+ ##
2802
+ # RPC-specific configuration for `get_token_auth_user`
2803
+ # @return [::Gapic::Config::Method]
2804
+ #
2805
+ attr_reader :get_token_auth_user
2806
+ ##
2807
+ # RPC-specific configuration for `list_auth_tokens`
2808
+ # @return [::Gapic::Config::Method]
2809
+ #
2810
+ attr_reader :list_auth_tokens
2811
+ ##
2812
+ # RPC-specific configuration for `get_auth_token`
2813
+ # @return [::Gapic::Config::Method]
2814
+ #
2815
+ attr_reader :get_auth_token
2816
+ ##
2817
+ # RPC-specific configuration for `add_token_auth_user`
2818
+ # @return [::Gapic::Config::Method]
2819
+ #
2820
+ attr_reader :add_token_auth_user
2821
+ ##
2822
+ # RPC-specific configuration for `delete_token_auth_user`
2823
+ # @return [::Gapic::Config::Method]
2824
+ #
2825
+ attr_reader :delete_token_auth_user
2826
+ ##
2827
+ # RPC-specific configuration for `add_auth_token`
2828
+ # @return [::Gapic::Config::Method]
2829
+ #
2830
+ attr_reader :add_auth_token
2831
+ ##
2832
+ # RPC-specific configuration for `delete_auth_token`
2833
+ # @return [::Gapic::Config::Method]
2834
+ #
2835
+ attr_reader :delete_auth_token
1075
2836
 
1076
2837
  # @private
1077
2838
  def initialize parent_rpcs = nil
@@ -1089,6 +2850,42 @@ module Google
1089
2850
  @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config
1090
2851
  get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority
1091
2852
  @get_shared_regional_certificate_authority = ::Gapic::Config::Method.new get_shared_regional_certificate_authority_config
2853
+ reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance
2854
+ @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config
2855
+ list_backup_collections_config = parent_rpcs.list_backup_collections if parent_rpcs.respond_to? :list_backup_collections
2856
+ @list_backup_collections = ::Gapic::Config::Method.new list_backup_collections_config
2857
+ get_backup_collection_config = parent_rpcs.get_backup_collection if parent_rpcs.respond_to? :get_backup_collection
2858
+ @get_backup_collection = ::Gapic::Config::Method.new get_backup_collection_config
2859
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
2860
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
2861
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
2862
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
2863
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
2864
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
2865
+ export_backup_config = parent_rpcs.export_backup if parent_rpcs.respond_to? :export_backup
2866
+ @export_backup = ::Gapic::Config::Method.new export_backup_config
2867
+ backup_instance_config = parent_rpcs.backup_instance if parent_rpcs.respond_to? :backup_instance
2868
+ @backup_instance = ::Gapic::Config::Method.new backup_instance_config
2869
+ start_migration_config = parent_rpcs.start_migration if parent_rpcs.respond_to? :start_migration
2870
+ @start_migration = ::Gapic::Config::Method.new start_migration_config
2871
+ finish_migration_config = parent_rpcs.finish_migration if parent_rpcs.respond_to? :finish_migration
2872
+ @finish_migration = ::Gapic::Config::Method.new finish_migration_config
2873
+ list_token_auth_users_config = parent_rpcs.list_token_auth_users if parent_rpcs.respond_to? :list_token_auth_users
2874
+ @list_token_auth_users = ::Gapic::Config::Method.new list_token_auth_users_config
2875
+ get_token_auth_user_config = parent_rpcs.get_token_auth_user if parent_rpcs.respond_to? :get_token_auth_user
2876
+ @get_token_auth_user = ::Gapic::Config::Method.new get_token_auth_user_config
2877
+ list_auth_tokens_config = parent_rpcs.list_auth_tokens if parent_rpcs.respond_to? :list_auth_tokens
2878
+ @list_auth_tokens = ::Gapic::Config::Method.new list_auth_tokens_config
2879
+ get_auth_token_config = parent_rpcs.get_auth_token if parent_rpcs.respond_to? :get_auth_token
2880
+ @get_auth_token = ::Gapic::Config::Method.new get_auth_token_config
2881
+ add_token_auth_user_config = parent_rpcs.add_token_auth_user if parent_rpcs.respond_to? :add_token_auth_user
2882
+ @add_token_auth_user = ::Gapic::Config::Method.new add_token_auth_user_config
2883
+ delete_token_auth_user_config = parent_rpcs.delete_token_auth_user if parent_rpcs.respond_to? :delete_token_auth_user
2884
+ @delete_token_auth_user = ::Gapic::Config::Method.new delete_token_auth_user_config
2885
+ add_auth_token_config = parent_rpcs.add_auth_token if parent_rpcs.respond_to? :add_auth_token
2886
+ @add_auth_token = ::Gapic::Config::Method.new add_auth_token_config
2887
+ delete_auth_token_config = parent_rpcs.delete_auth_token if parent_rpcs.respond_to? :delete_auth_token
2888
+ @delete_auth_token = ::Gapic::Config::Method.new delete_auth_token_config
1092
2889
 
1093
2890
  yield self if block_given?
1094
2891
  end