use of com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest in project gapic-generator-java by googleapis.
the class AsyncRescheduleMaintenance method asyncRescheduleMaintenance.
public static void asyncRescheduleMaintenance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
RescheduleMaintenanceRequest request = RescheduleMaintenanceRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).setScheduleTime(Timestamp.newBuilder().build()).build();
ApiFuture<Operation> future = cloudRedisClient.rescheduleMaintenanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
}
use of com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest in project gapic-generator-java by googleapis.
the class AsyncRescheduleMaintenanceLRO method asyncRescheduleMaintenanceLRO.
public static void asyncRescheduleMaintenanceLRO() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
RescheduleMaintenanceRequest request = RescheduleMaintenanceRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).setScheduleTime(Timestamp.newBuilder().build()).build();
OperationFuture<Instance, Any> future = cloudRedisClient.rescheduleMaintenanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
}
use of com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest in project gapic-generator-java by googleapis.
the class SyncRescheduleMaintenance method syncRescheduleMaintenance.
public static void syncRescheduleMaintenance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
RescheduleMaintenanceRequest request = RescheduleMaintenanceRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).setScheduleTime(Timestamp.newBuilder().build()).build();
Instance response = cloudRedisClient.rescheduleMaintenanceAsync(request).get();
}
}
Aggregations