use of com.google.storage.v2.DeleteNotificationRequest in project gapic-generator-java by googleapis.
the class AsyncDeleteNotification method asyncDeleteNotification.
public static void asyncDeleteNotification() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
DeleteNotificationRequest request = DeleteNotificationRequest.newBuilder().setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString()).build();
ApiFuture<Empty> future = storageClient.deleteNotificationCallable().futureCall(request);
// Do something.
future.get();
}
}
use of com.google.storage.v2.DeleteNotificationRequest in project gapic-generator-java by googleapis.
the class SyncDeleteNotification method syncDeleteNotification.
public static void syncDeleteNotification() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
DeleteNotificationRequest request = DeleteNotificationRequest.newBuilder().setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString()).build();
storageClient.deleteNotification(request);
}
}
Aggregations