Search in sources :

Example 1 with ImportInstanceRequest

use of com.google.cloud.redis.v1beta1.ImportInstanceRequest in project gapic-generator-java by googleapis.

the class AsyncImportInstanceLRO method asyncImportInstanceLRO.

public static void asyncImportInstanceLRO() throws Exception {
    // It may require modifications to work in your environment.
    try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
        ImportInstanceRequest request = ImportInstanceRequest.newBuilder().setName("name3373707").setInputConfig(InputConfig.newBuilder().build()).build();
        OperationFuture<Instance, Any> future = cloudRedisClient.importInstanceOperationCallable().futureCall(request);
        // Do something.
        Instance response = future.get();
    }
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) Instance(com.google.cloud.redis.v1beta1.Instance) ImportInstanceRequest(com.google.cloud.redis.v1beta1.ImportInstanceRequest) Any(com.google.protobuf.Any)

Example 2 with ImportInstanceRequest

use of com.google.cloud.redis.v1beta1.ImportInstanceRequest in project gapic-generator-java by googleapis.

the class SyncImportInstance method syncImportInstance.

public static void syncImportInstance() throws Exception {
    // It may require modifications to work in your environment.
    try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
        ImportInstanceRequest request = ImportInstanceRequest.newBuilder().setName("name3373707").setInputConfig(InputConfig.newBuilder().build()).build();
        Instance response = cloudRedisClient.importInstanceAsync(request).get();
    }
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) Instance(com.google.cloud.redis.v1beta1.Instance) ImportInstanceRequest(com.google.cloud.redis.v1beta1.ImportInstanceRequest)

Example 3 with ImportInstanceRequest

use of com.google.cloud.redis.v1beta1.ImportInstanceRequest in project gapic-generator-java by googleapis.

the class AsyncImportInstance method asyncImportInstance.

public static void asyncImportInstance() throws Exception {
    // It may require modifications to work in your environment.
    try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
        ImportInstanceRequest request = ImportInstanceRequest.newBuilder().setName("name3373707").setInputConfig(InputConfig.newBuilder().build()).build();
        ApiFuture<Operation> future = cloudRedisClient.importInstanceCallable().futureCall(request);
        // Do something.
        Operation response = future.get();
    }
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) ImportInstanceRequest(com.google.cloud.redis.v1beta1.ImportInstanceRequest) Operation(com.google.longrunning.Operation)

Aggregations

CloudRedisClient (com.google.cloud.redis.v1beta1.CloudRedisClient)3 ImportInstanceRequest (com.google.cloud.redis.v1beta1.ImportInstanceRequest)3 Instance (com.google.cloud.redis.v1beta1.Instance)2 Operation (com.google.longrunning.Operation)1 Any (com.google.protobuf.Any)1