Search in sources :

Example 1 with ExportInstanceRequest

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

the class AsyncExportInstance method asyncExportInstance.

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

Example 2 with ExportInstanceRequest

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

the class AsyncExportInstanceLRO method asyncExportInstanceLRO.

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

Example 3 with ExportInstanceRequest

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

the class SyncExportInstance method syncExportInstance.

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

Aggregations

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