updateBucketCallable() {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * NotificationName name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]");
- * storageClient.deleteNotification(name);
+ * NotificationConfigName name =
+ * NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
+ * storageClient.deleteNotificationConfig(name);
* }
* }
*
- * @param name Required. The parent bucket of the notification.
+ * @param name Required. The parent bucket of the NotificationConfig.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotification(NotificationName name) {
- DeleteNotificationRequest request =
- DeleteNotificationRequest.newBuilder()
+ public final void deleteNotificationConfig(NotificationConfigName name) {
+ DeleteNotificationConfigRequest request =
+ DeleteNotificationConfigRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
- deleteNotification(request);
+ deleteNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
* Sample code:
*
@@ -1387,23 +1388,24 @@ public final void deleteNotification(NotificationName name) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * String name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString();
- * storageClient.deleteNotification(name);
+ * String name =
+ * NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]").toString();
+ * storageClient.deleteNotificationConfig(name);
* }
* }
*
- * @param name Required. The parent bucket of the notification.
+ * @param name Required. The parent bucket of the NotificationConfig.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotification(String name) {
- DeleteNotificationRequest request =
- DeleteNotificationRequest.newBuilder().setName(name).build();
- deleteNotification(request);
+ public final void deleteNotificationConfig(String name) {
+ DeleteNotificationConfigRequest request =
+ DeleteNotificationConfigRequest.newBuilder().setName(name).build();
+ deleteNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*
Sample code:
*
@@ -1414,24 +1416,26 @@ public final void deleteNotification(String name) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * DeleteNotificationRequest request =
- * DeleteNotificationRequest.newBuilder()
- * .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ * DeleteNotificationConfigRequest request =
+ * DeleteNotificationConfigRequest.newBuilder()
+ * .setName(
+ * NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ * .toString())
* .build();
- * storageClient.deleteNotification(request);
+ * storageClient.deleteNotificationConfig(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteNotification(DeleteNotificationRequest request) {
- deleteNotificationCallable().call(request);
+ public final void deleteNotificationConfig(DeleteNotificationConfigRequest request) {
+ deleteNotificationConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*
Sample code:
*
@@ -1442,23 +1446,27 @@ public final void deleteNotification(DeleteNotificationRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * DeleteNotificationRequest request =
- * DeleteNotificationRequest.newBuilder()
- * .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ * DeleteNotificationConfigRequest request =
+ * DeleteNotificationConfigRequest.newBuilder()
+ * .setName(
+ * NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ * .toString())
* .build();
- * ApiFuture future = storageClient.deleteNotificationCallable().futureCall(request);
+ * ApiFuture future =
+ * storageClient.deleteNotificationConfigCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
- public final UnaryCallable deleteNotificationCallable() {
- return stub.deleteNotificationCallable();
+ public final UnaryCallable
+ deleteNotificationConfigCallable() {
+ return stub.deleteNotificationConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * View a notification config.
+ * View a NotificationConfig.
*
* Sample code:
*
@@ -1470,23 +1478,25 @@ public final UnaryCallable deleteNotificationC
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
- * Notification response = storageClient.getNotification(name);
+ * NotificationConfig response = storageClient.getNotificationConfig(name);
* }
* }
*
- * @param name Required. The parent bucket of the notification. Format:
- * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}`
+ * @param name Required. The parent bucket of the NotificationConfig. Format:
+ * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification getNotification(BucketName name) {
- GetNotificationRequest request =
- GetNotificationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getNotification(request);
+ public final NotificationConfig getNotificationConfig(BucketName name) {
+ GetNotificationConfigRequest request =
+ GetNotificationConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * View a notification config.
+ * View a NotificationConfig.
*
* Sample code:
*
@@ -1498,22 +1508,23 @@ public final Notification getNotification(BucketName name) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* String name = BucketName.of("[PROJECT]", "[BUCKET]").toString();
- * Notification response = storageClient.getNotification(name);
+ * NotificationConfig response = storageClient.getNotificationConfig(name);
* }
* }
*
- * @param name Required. The parent bucket of the notification. Format:
- * `projects/{project}/buckets/{bucket}/notificationConfigs/{notification}`
+ * @param name Required. The parent bucket of the NotificationConfig. Format:
+ * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification getNotification(String name) {
- GetNotificationRequest request = GetNotificationRequest.newBuilder().setName(name).build();
- return getNotification(request);
+ public final NotificationConfig getNotificationConfig(String name) {
+ GetNotificationConfigRequest request =
+ GetNotificationConfigRequest.newBuilder().setName(name).build();
+ return getNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * View a notification config.
+ * View a NotificationConfig.
*
*
Sample code:
*
@@ -1524,24 +1535,24 @@ public final Notification getNotification(String name) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * GetNotificationRequest request =
- * GetNotificationRequest.newBuilder()
+ * GetNotificationConfigRequest request =
+ * GetNotificationConfigRequest.newBuilder()
* .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
* .build();
- * Notification response = storageClient.getNotification(request);
+ * NotificationConfig response = storageClient.getNotificationConfig(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification getNotification(GetNotificationRequest request) {
- return getNotificationCallable().call(request);
+ public final NotificationConfig getNotificationConfig(GetNotificationConfigRequest request) {
+ return getNotificationConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * View a notification config.
+ * View a NotificationConfig.
*
*
Sample code:
*
@@ -1552,23 +1563,25 @@ public final Notification getNotification(GetNotificationRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * GetNotificationRequest request =
- * GetNotificationRequest.newBuilder()
+ * GetNotificationConfigRequest request =
+ * GetNotificationConfigRequest.newBuilder()
* .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
* .build();
- * ApiFuture future = storageClient.getNotificationCallable().futureCall(request);
+ * ApiFuture future =
+ * storageClient.getNotificationConfigCallable().futureCall(request);
* // Do something.
- * Notification response = future.get();
+ * NotificationConfig response = future.get();
* }
* }
*/
- public final UnaryCallable getNotificationCallable() {
- return stub.getNotificationCallable();
+ public final UnaryCallable
+ getNotificationConfigCallable() {
+ return stub.getNotificationConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a notification subscription for a given bucket. These notifications, when triggered,
+ * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered,
* publish messages to the specified Pub/Sub topics. See
* https://cloud.google.com/storage/docs/pubsub-notifications.
*
@@ -1582,27 +1595,29 @@ public final UnaryCallable getNotification
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
- * Notification notification = Notification.newBuilder().build();
- * Notification response = storageClient.createNotification(parent, notification);
+ * NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+ * NotificationConfig response =
+ * storageClient.createNotificationConfig(parent, notificationConfig);
* }
* }
*
- * @param parent Required. The bucket to which this notification belongs.
- * @param notification Required. Properties of the notification to be inserted.
+ * @param parent Required. The bucket to which this NotificationConfig belongs.
+ * @param notificationConfig Required. Properties of the NotificationConfig to be inserted.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification createNotification(ProjectName parent, Notification notification) {
- CreateNotificationRequest request =
- CreateNotificationRequest.newBuilder()
+ public final NotificationConfig createNotificationConfig(
+ ProjectName parent, NotificationConfig notificationConfig) {
+ CreateNotificationConfigRequest request =
+ CreateNotificationConfigRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
- .setNotification(notification)
+ .setNotificationConfig(notificationConfig)
.build();
- return createNotification(request);
+ return createNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a notification subscription for a given bucket. These notifications, when triggered,
+ * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered,
* publish messages to the specified Pub/Sub topics. See
* https://cloud.google.com/storage/docs/pubsub-notifications.
*
@@ -1616,27 +1631,29 @@ public final Notification createNotification(ProjectName parent, Notification no
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* String parent = ProjectName.of("[PROJECT]").toString();
- * Notification notification = Notification.newBuilder().build();
- * Notification response = storageClient.createNotification(parent, notification);
+ * NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+ * NotificationConfig response =
+ * storageClient.createNotificationConfig(parent, notificationConfig);
* }
* }
*
- * @param parent Required. The bucket to which this notification belongs.
- * @param notification Required. Properties of the notification to be inserted.
+ * @param parent Required. The bucket to which this NotificationConfig belongs.
+ * @param notificationConfig Required. Properties of the NotificationConfig to be inserted.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification createNotification(String parent, Notification notification) {
- CreateNotificationRequest request =
- CreateNotificationRequest.newBuilder()
+ public final NotificationConfig createNotificationConfig(
+ String parent, NotificationConfig notificationConfig) {
+ CreateNotificationConfigRequest request =
+ CreateNotificationConfigRequest.newBuilder()
.setParent(parent)
- .setNotification(notification)
+ .setNotificationConfig(notificationConfig)
.build();
- return createNotification(request);
+ return createNotificationConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a notification subscription for a given bucket. These notifications, when triggered,
+ * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered,
* publish messages to the specified Pub/Sub topics. See
* https://cloud.google.com/storage/docs/pubsub-notifications.
*
@@ -1649,25 +1666,26 @@ public final Notification createNotification(String parent, Notification notific
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * CreateNotificationRequest request =
- * CreateNotificationRequest.newBuilder()
+ * CreateNotificationConfigRequest request =
+ * CreateNotificationConfigRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
- * .setNotification(Notification.newBuilder().build())
+ * .setNotificationConfig(NotificationConfig.newBuilder().build())
* .build();
- * Notification response = storageClient.createNotification(request);
+ * NotificationConfig response = storageClient.createNotificationConfig(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Notification createNotification(CreateNotificationRequest request) {
- return createNotificationCallable().call(request);
+ public final NotificationConfig createNotificationConfig(
+ CreateNotificationConfigRequest request) {
+ return createNotificationConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a notification subscription for a given bucket. These notifications, when triggered,
+ * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered,
* publish messages to the specified Pub/Sub topics. See
* https://cloud.google.com/storage/docs/pubsub-notifications.
*
@@ -1680,25 +1698,26 @@ public final Notification createNotification(CreateNotificationRequest request)
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * CreateNotificationRequest request =
- * CreateNotificationRequest.newBuilder()
+ * CreateNotificationConfigRequest request =
+ * CreateNotificationConfigRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
- * .setNotification(Notification.newBuilder().build())
+ * .setNotificationConfig(NotificationConfig.newBuilder().build())
* .build();
- * ApiFuture future =
- * storageClient.createNotificationCallable().futureCall(request);
+ * ApiFuture future =
+ * storageClient.createNotificationConfigCallable().futureCall(request);
* // Do something.
- * Notification response = future.get();
+ * NotificationConfig response = future.get();
* }
* }
*/
- public final UnaryCallable createNotificationCallable() {
- return stub.createNotificationCallable();
+ public final UnaryCallable
+ createNotificationConfigCallable() {
+ return stub.createNotificationConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
* Sample code:
*
@@ -1710,7 +1729,8 @@ public final UnaryCallable createNotifi
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
- * for (Notification element : storageClient.listNotifications(parent).iterateAll()) {
+ * for (NotificationConfig element :
+ * storageClient.listNotificationConfigs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -1719,17 +1739,17 @@ public final UnaryCallable createNotifi
* @param parent Required. Name of a Google Cloud Storage bucket.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationsPagedResponse listNotifications(ProjectName parent) {
- ListNotificationsRequest request =
- ListNotificationsRequest.newBuilder()
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(ProjectName parent) {
+ ListNotificationConfigsRequest request =
+ ListNotificationConfigsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
- return listNotifications(request);
+ return listNotificationConfigs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
* Sample code:
*
@@ -1741,7 +1761,8 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
* String parent = ProjectName.of("[PROJECT]").toString();
- * for (Notification element : storageClient.listNotifications(parent).iterateAll()) {
+ * for (NotificationConfig element :
+ * storageClient.listNotificationConfigs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -1750,15 +1771,15 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent
* @param parent Required. Name of a Google Cloud Storage bucket.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationsPagedResponse listNotifications(String parent) {
- ListNotificationsRequest request =
- ListNotificationsRequest.newBuilder().setParent(parent).build();
- return listNotifications(request);
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) {
+ ListNotificationConfigsRequest request =
+ ListNotificationConfigsRequest.newBuilder().setParent(parent).build();
+ return listNotificationConfigs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*
Sample code:
*
@@ -1769,13 +1790,14 @@ public final ListNotificationsPagedResponse listNotifications(String parent) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * ListNotificationsRequest request =
- * ListNotificationsRequest.newBuilder()
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * for (Notification element : storageClient.listNotifications(request).iterateAll()) {
+ * for (NotificationConfig element :
+ * storageClient.listNotificationConfigs(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -1784,13 +1806,14 @@ public final ListNotificationsPagedResponse listNotifications(String parent) {
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNotificationsPagedResponse listNotifications(ListNotificationsRequest request) {
- return listNotificationsPagedCallable().call(request);
+ public final ListNotificationConfigsPagedResponse listNotificationConfigs(
+ ListNotificationConfigsRequest request) {
+ return listNotificationConfigsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*
Sample code:
*
@@ -1801,29 +1824,29 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * ListNotificationsRequest request =
- * ListNotificationsRequest.newBuilder()
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
- * storageClient.listNotificationsPagedCallable().futureCall(request);
+ * ApiFuture future =
+ * storageClient.listNotificationConfigsPagedCallable().futureCall(request);
* // Do something.
- * for (Notification element : future.get().iterateAll()) {
+ * for (NotificationConfig element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
- public final UnaryCallable
- listNotificationsPagedCallable() {
- return stub.listNotificationsPagedCallable();
+ public final UnaryCallable
+ listNotificationConfigsPagedCallable() {
+ return stub.listNotificationConfigsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
* Sample code:
*
@@ -1834,16 +1857,16 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (StorageClient storageClient = StorageClient.create()) {
- * ListNotificationsRequest request =
- * ListNotificationsRequest.newBuilder()
+ * ListNotificationConfigsRequest request =
+ * ListNotificationConfigsRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
- * ListNotificationsResponse response =
- * storageClient.listNotificationsCallable().call(request);
- * for (Notification element : response.getNotificationsList()) {
+ * ListNotificationConfigsResponse response =
+ * storageClient.listNotificationConfigsCallable().call(request);
+ * for (NotificationConfig element : response.getNotificationConfigsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1856,9 +1879,9 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
* }
* }
*/
- public final UnaryCallable
- listNotificationsCallable() {
- return stub.listNotificationsCallable();
+ public final UnaryCallable
+ listNotificationConfigsCallable() {
+ return stub.listNotificationConfigsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
@@ -2468,8 +2491,9 @@ public final UnaryCallable updateObjectCallable() {
* previously sent. Note also that it is acceptable to send data starting at an offset earlier
* than the returned `persisted_size`; in this case, the service will skip data at offsets that
* were already persisted (without checking that it matches the previously written data), and
- * write only the data starting from the persisted offset. This behavior can make client-side
- * handling simpler in some cases.
+ * write only the data starting from the persisted offset. Even though the data isn't written, it
+ * may still incur a performance cost over resuming at the correct write offset. This behavior can
+ * make client-side handling simpler in some cases.
*
* The service will not view the object as complete until the client has sent a
* `WriteObjectRequest` with `finish_write` set to `true`. Sending any requests on a stream after
@@ -3838,83 +3862,91 @@ protected ListBucketsFixedSizeCollection createCollection(
}
}
- public static class ListNotificationsPagedResponse
+ public static class ListNotificationConfigsPagedResponse
extends AbstractPagedListResponse<
- ListNotificationsRequest,
- ListNotificationsResponse,
- Notification,
- ListNotificationsPage,
- ListNotificationsFixedSizeCollection> {
-
- public static ApiFuture createAsync(
- PageContext context,
- ApiFuture futureResponse) {
- ApiFuture futurePage =
- ListNotificationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ NotificationConfig,
+ ListNotificationConfigsPage,
+ ListNotificationConfigsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListNotificationConfigsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- input -> new ListNotificationsPagedResponse(input),
+ input -> new ListNotificationConfigsPagedResponse(input),
MoreExecutors.directExecutor());
}
- private ListNotificationsPagedResponse(ListNotificationsPage page) {
- super(page, ListNotificationsFixedSizeCollection.createEmptyCollection());
+ private ListNotificationConfigsPagedResponse(ListNotificationConfigsPage page) {
+ super(page, ListNotificationConfigsFixedSizeCollection.createEmptyCollection());
}
}
- public static class ListNotificationsPage
+ public static class ListNotificationConfigsPage
extends AbstractPage<
- ListNotificationsRequest,
- ListNotificationsResponse,
- Notification,
- ListNotificationsPage> {
-
- private ListNotificationsPage(
- PageContext context,
- ListNotificationsResponse response) {
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ NotificationConfig,
+ ListNotificationConfigsPage> {
+
+ private ListNotificationConfigsPage(
+ PageContext<
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig>
+ context,
+ ListNotificationConfigsResponse response) {
super(context, response);
}
- private static ListNotificationsPage createEmptyPage() {
- return new ListNotificationsPage(null, null);
+ private static ListNotificationConfigsPage createEmptyPage() {
+ return new ListNotificationConfigsPage(null, null);
}
@Override
- protected ListNotificationsPage createPage(
- PageContext context,
- ListNotificationsResponse response) {
- return new ListNotificationsPage(context, response);
+ protected ListNotificationConfigsPage createPage(
+ PageContext<
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig>
+ context,
+ ListNotificationConfigsResponse response) {
+ return new ListNotificationConfigsPage(context, response);
}
@Override
- public ApiFuture createPageAsync(
- PageContext context,
- ApiFuture futureResponse) {
+ public ApiFuture createPageAsync(
+ PageContext<
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig>
+ context,
+ ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
- public static class ListNotificationsFixedSizeCollection
+ public static class ListNotificationConfigsFixedSizeCollection
extends AbstractFixedSizeCollection<
- ListNotificationsRequest,
- ListNotificationsResponse,
- Notification,
- ListNotificationsPage,
- ListNotificationsFixedSizeCollection> {
-
- private ListNotificationsFixedSizeCollection(
- List pages, int collectionSize) {
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ NotificationConfig,
+ ListNotificationConfigsPage,
+ ListNotificationConfigsFixedSizeCollection> {
+
+ private ListNotificationConfigsFixedSizeCollection(
+ List pages, int collectionSize) {
super(pages, collectionSize);
}
- private static ListNotificationsFixedSizeCollection createEmptyCollection() {
- return new ListNotificationsFixedSizeCollection(null, 0);
+ private static ListNotificationConfigsFixedSizeCollection createEmptyCollection() {
+ return new ListNotificationConfigsFixedSizeCollection(null, 0);
}
@Override
- protected ListNotificationsFixedSizeCollection createCollection(
- List pages, int collectionSize) {
- return new ListNotificationsFixedSizeCollection(pages, collectionSize);
+ protected ListNotificationConfigsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListNotificationConfigsFixedSizeCollection(pages, collectionSize);
}
}
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
index 16de430f4e..74ff9b61d3 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
@@ -18,7 +18,7 @@
import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse;
import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse;
-import static com.google.storage.v2.StorageClient.ListNotificationsPagedResponse;
+import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse;
import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse;
import com.google.api.core.ApiFunction;
@@ -132,26 +132,31 @@ public UnaryCallSettings updateBucketSettings() {
return ((StorageStubSettings) getStubSettings()).updateBucketSettings();
}
- /** Returns the object with the settings used for calls to deleteNotification. */
- public UnaryCallSettings deleteNotificationSettings() {
- return ((StorageStubSettings) getStubSettings()).deleteNotificationSettings();
+ /** Returns the object with the settings used for calls to deleteNotificationConfig. */
+ public UnaryCallSettings
+ deleteNotificationConfigSettings() {
+ return ((StorageStubSettings) getStubSettings()).deleteNotificationConfigSettings();
}
- /** Returns the object with the settings used for calls to getNotification. */
- public UnaryCallSettings getNotificationSettings() {
- return ((StorageStubSettings) getStubSettings()).getNotificationSettings();
+ /** Returns the object with the settings used for calls to getNotificationConfig. */
+ public UnaryCallSettings
+ getNotificationConfigSettings() {
+ return ((StorageStubSettings) getStubSettings()).getNotificationConfigSettings();
}
- /** Returns the object with the settings used for calls to createNotification. */
- public UnaryCallSettings createNotificationSettings() {
- return ((StorageStubSettings) getStubSettings()).createNotificationSettings();
+ /** Returns the object with the settings used for calls to createNotificationConfig. */
+ public UnaryCallSettings
+ createNotificationConfigSettings() {
+ return ((StorageStubSettings) getStubSettings()).createNotificationConfigSettings();
}
- /** Returns the object with the settings used for calls to listNotifications. */
+ /** Returns the object with the settings used for calls to listNotificationConfigs. */
public PagedCallSettings<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings() {
- return ((StorageStubSettings) getStubSettings()).listNotificationsSettings();
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings() {
+ return ((StorageStubSettings) getStubSettings()).listNotificationConfigsSettings();
}
/** Returns the object with the settings used for calls to composeObject. */
@@ -389,29 +394,31 @@ public UnaryCallSettings.Builder updateBucketSettin
return getStubSettingsBuilder().updateBucketSettings();
}
- /** Returns the builder for the settings used for calls to deleteNotification. */
- public UnaryCallSettings.Builder
- deleteNotificationSettings() {
- return getStubSettingsBuilder().deleteNotificationSettings();
+ /** Returns the builder for the settings used for calls to deleteNotificationConfig. */
+ public UnaryCallSettings.Builder
+ deleteNotificationConfigSettings() {
+ return getStubSettingsBuilder().deleteNotificationConfigSettings();
}
- /** Returns the builder for the settings used for calls to getNotification. */
- public UnaryCallSettings.Builder
- getNotificationSettings() {
- return getStubSettingsBuilder().getNotificationSettings();
+ /** Returns the builder for the settings used for calls to getNotificationConfig. */
+ public UnaryCallSettings.Builder
+ getNotificationConfigSettings() {
+ return getStubSettingsBuilder().getNotificationConfigSettings();
}
- /** Returns the builder for the settings used for calls to createNotification. */
- public UnaryCallSettings.Builder
- createNotificationSettings() {
- return getStubSettingsBuilder().createNotificationSettings();
+ /** Returns the builder for the settings used for calls to createNotificationConfig. */
+ public UnaryCallSettings.Builder
+ createNotificationConfigSettings() {
+ return getStubSettingsBuilder().createNotificationConfigSettings();
}
- /** Returns the builder for the settings used for calls to listNotifications. */
+ /** Returns the builder for the settings used for calls to listNotificationConfigs. */
public PagedCallSettings.Builder<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings() {
- return getStubSettingsBuilder().listNotificationsSettings();
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings() {
+ return getStubSettingsBuilder().listNotificationConfigsSettings();
}
/** Returns the builder for the settings used for calls to composeObject. */
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java
index 2b568627a8..bf3d106405 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java
@@ -18,7 +18,7 @@
import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse;
import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse;
-import static com.google.storage.v2.StorageClient.ListNotificationsPagedResponse;
+import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse;
import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
@@ -45,14 +45,14 @@
import com.google.storage.v2.CreateBucketRequest;
import com.google.storage.v2.CreateHmacKeyRequest;
import com.google.storage.v2.CreateHmacKeyResponse;
-import com.google.storage.v2.CreateNotificationRequest;
+import com.google.storage.v2.CreateNotificationConfigRequest;
import com.google.storage.v2.DeleteBucketRequest;
import com.google.storage.v2.DeleteHmacKeyRequest;
-import com.google.storage.v2.DeleteNotificationRequest;
+import com.google.storage.v2.DeleteNotificationConfigRequest;
import com.google.storage.v2.DeleteObjectRequest;
import com.google.storage.v2.GetBucketRequest;
import com.google.storage.v2.GetHmacKeyRequest;
-import com.google.storage.v2.GetNotificationRequest;
+import com.google.storage.v2.GetNotificationConfigRequest;
import com.google.storage.v2.GetObjectRequest;
import com.google.storage.v2.GetServiceAccountRequest;
import com.google.storage.v2.HmacKeyMetadata;
@@ -60,12 +60,12 @@
import com.google.storage.v2.ListBucketsResponse;
import com.google.storage.v2.ListHmacKeysRequest;
import com.google.storage.v2.ListHmacKeysResponse;
-import com.google.storage.v2.ListNotificationsRequest;
-import com.google.storage.v2.ListNotificationsResponse;
+import com.google.storage.v2.ListNotificationConfigsRequest;
+import com.google.storage.v2.ListNotificationConfigsResponse;
import com.google.storage.v2.ListObjectsRequest;
import com.google.storage.v2.ListObjectsResponse;
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
-import com.google.storage.v2.Notification;
+import com.google.storage.v2.NotificationConfig;
import com.google.storage.v2.Object;
import com.google.storage.v2.QueryWriteStatusRequest;
import com.google.storage.v2.QueryWriteStatusResponse;
@@ -174,45 +174,47 @@ public class GrpcStorageStub extends StorageStub {
.setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance()))
.build();
- private static final MethodDescriptor
- deleteNotificationMethodDescriptor =
- MethodDescriptor.newBuilder()
+ private static final MethodDescriptor
+ deleteNotificationConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.storage.v2.Storage/DeleteNotification")
+ .setFullMethodName("google.storage.v2.Storage/DeleteNotificationConfig")
.setRequestMarshaller(
- ProtoUtils.marshaller(DeleteNotificationRequest.getDefaultInstance()))
+ ProtoUtils.marshaller(DeleteNotificationConfigRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
.build();
- private static final MethodDescriptor
- getNotificationMethodDescriptor =
- MethodDescriptor.newBuilder()
+ private static final MethodDescriptor
+ getNotificationConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.storage.v2.Storage/GetNotification")
+ .setFullMethodName("google.storage.v2.Storage/GetNotificationConfig")
.setRequestMarshaller(
- ProtoUtils.marshaller(GetNotificationRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Notification.getDefaultInstance()))
+ ProtoUtils.marshaller(GetNotificationConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance()))
.build();
- private static final MethodDescriptor
- createNotificationMethodDescriptor =
- MethodDescriptor.newBuilder()
+ private static final MethodDescriptor
+ createNotificationConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.storage.v2.Storage/CreateNotification")
+ .setFullMethodName("google.storage.v2.Storage/CreateNotificationConfig")
.setRequestMarshaller(
- ProtoUtils.marshaller(CreateNotificationRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(Notification.getDefaultInstance()))
+ ProtoUtils.marshaller(CreateNotificationConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance()))
.build();
- private static final MethodDescriptor
- listNotificationsMethodDescriptor =
- MethodDescriptor.newBuilder()
+ private static final MethodDescriptor<
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse>
+ listNotificationConfigsMethodDescriptor =
+ MethodDescriptor
+ .newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName("google.storage.v2.Storage/ListNotifications")
+ .setFullMethodName("google.storage.v2.Storage/ListNotificationConfigs")
.setRequestMarshaller(
- ProtoUtils.marshaller(ListNotificationsRequest.getDefaultInstance()))
+ ProtoUtils.marshaller(ListNotificationConfigsRequest.getDefaultInstance()))
.setResponseMarshaller(
- ProtoUtils.marshaller(ListNotificationsResponse.getDefaultInstance()))
+ ProtoUtils.marshaller(ListNotificationConfigsResponse.getDefaultInstance()))
.build();
private static final MethodDescriptor
@@ -392,13 +394,16 @@ public class GrpcStorageStub extends StorageStub {
private final UnaryCallable
testIamPermissionsCallable;
private final UnaryCallable updateBucketCallable;
- private final UnaryCallable deleteNotificationCallable;
- private final UnaryCallable getNotificationCallable;
- private final UnaryCallable createNotificationCallable;
- private final UnaryCallable
- listNotificationsCallable;
- private final UnaryCallable
- listNotificationsPagedCallable;
+ private final UnaryCallable
+ deleteNotificationConfigCallable;
+ private final UnaryCallable
+ getNotificationConfigCallable;
+ private final UnaryCallable
+ createNotificationConfigCallable;
+ private final UnaryCallable
+ listNotificationConfigsCallable;
+ private final UnaryCallable
+ listNotificationConfigsPagedCallable;
private final UnaryCallable composeObjectCallable;
private final UnaryCallable deleteObjectCallable;
private final UnaryCallable
@@ -434,6 +439,8 @@ public class GrpcStorageStub extends StorageStub {
private static final PathTemplate GET_BUCKET_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}");
private static final PathTemplate CREATE_BUCKET_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
+ private static final PathTemplate CREATE_BUCKET_1_PATH_TEMPLATE =
+ PathTemplate.create("{project=**}");
private static final PathTemplate LIST_BUCKETS_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate LOCK_BUCKET_RETENTION_POLICY_0_PATH_TEMPLATE =
@@ -452,13 +459,13 @@ public class GrpcStorageStub extends StorageStub {
PathTemplate.create("{bucket=projects/*/buckets/*}/objects/**");
private static final PathTemplate UPDATE_BUCKET_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
- private static final PathTemplate DELETE_NOTIFICATION_0_PATH_TEMPLATE =
+ private static final PathTemplate DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=projects/*/buckets/*}/**");
- private static final PathTemplate GET_NOTIFICATION_0_PATH_TEMPLATE =
+ private static final PathTemplate GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=projects/*/buckets/*}/**");
- private static final PathTemplate CREATE_NOTIFICATION_0_PATH_TEMPLATE =
+ private static final PathTemplate CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
- private static final PathTemplate LIST_NOTIFICATIONS_0_PATH_TEMPLATE =
+ private static final PathTemplate LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate COMPOSE_OBJECT_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
@@ -556,6 +563,10 @@ protected GrpcStorageStub(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getParent(), "project", CREATE_BUCKET_0_PATH_TEMPLATE);
+ if (request.getBucket() != null) {
+ builder.add(
+ request.getBucket().getProject(), "project", CREATE_BUCKET_1_PATH_TEMPLATE);
+ }
return builder.build();
})
.build();
@@ -632,45 +643,54 @@ protected GrpcStorageStub(
return builder.build();
})
.build();
- GrpcCallSettings deleteNotificationTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(deleteNotificationMethodDescriptor)
- .setParamsExtractor(
- request -> {
- RequestParamsBuilder builder = RequestParamsBuilder.create();
- builder.add(request.getName(), "bucket", DELETE_NOTIFICATION_0_PATH_TEMPLATE);
- return builder.build();
- })
- .build();
- GrpcCallSettings getNotificationTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(getNotificationMethodDescriptor)
- .setParamsExtractor(
- request -> {
- RequestParamsBuilder builder = RequestParamsBuilder.create();
- builder.add(request.getName(), "bucket", GET_NOTIFICATION_0_PATH_TEMPLATE);
- return builder.build();
- })
- .build();
- GrpcCallSettings createNotificationTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(createNotificationMethodDescriptor)
- .setParamsExtractor(
- request -> {
- RequestParamsBuilder builder = RequestParamsBuilder.create();
- builder.add(request.getParent(), "bucket", CREATE_NOTIFICATION_0_PATH_TEMPLATE);
- return builder.build();
- })
- .build();
- GrpcCallSettings
- listNotificationsTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(listNotificationsMethodDescriptor)
+ GrpcCallSettings
+ deleteNotificationConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteNotificationConfigMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(
- request.getParent(), "bucket", LIST_NOTIFICATIONS_0_PATH_TEMPLATE);
+ request.getName(), "bucket", DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE);
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ getNotificationConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getNotificationConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ request.getName(), "bucket", GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE);
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ createNotificationConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createNotificationConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ request.getParent(),
+ "bucket",
+ CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE);
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ listNotificationConfigsTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listNotificationConfigsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ request.getParent(), "bucket", LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -900,28 +920,30 @@ protected GrpcStorageStub(
this.updateBucketCallable =
callableFactory.createUnaryCallable(
updateBucketTransportSettings, settings.updateBucketSettings(), clientContext);
- this.deleteNotificationCallable =
+ this.deleteNotificationConfigCallable =
callableFactory.createUnaryCallable(
- deleteNotificationTransportSettings,
- settings.deleteNotificationSettings(),
+ deleteNotificationConfigTransportSettings,
+ settings.deleteNotificationConfigSettings(),
clientContext);
- this.getNotificationCallable =
+ this.getNotificationConfigCallable =
callableFactory.createUnaryCallable(
- getNotificationTransportSettings, settings.getNotificationSettings(), clientContext);
- this.createNotificationCallable =
+ getNotificationConfigTransportSettings,
+ settings.getNotificationConfigSettings(),
+ clientContext);
+ this.createNotificationConfigCallable =
callableFactory.createUnaryCallable(
- createNotificationTransportSettings,
- settings.createNotificationSettings(),
+ createNotificationConfigTransportSettings,
+ settings.createNotificationConfigSettings(),
clientContext);
- this.listNotificationsCallable =
+ this.listNotificationConfigsCallable =
callableFactory.createUnaryCallable(
- listNotificationsTransportSettings,
- settings.listNotificationsSettings(),
+ listNotificationConfigsTransportSettings,
+ settings.listNotificationConfigsSettings(),
clientContext);
- this.listNotificationsPagedCallable =
+ this.listNotificationConfigsPagedCallable =
callableFactory.createPagedCallable(
- listNotificationsTransportSettings,
- settings.listNotificationsSettings(),
+ listNotificationConfigsTransportSettings,
+ settings.listNotificationConfigsSettings(),
clientContext);
this.composeObjectCallable =
callableFactory.createUnaryCallable(
@@ -1048,30 +1070,32 @@ public UnaryCallable updateBucketCallable() {
}
@Override
- public UnaryCallable deleteNotificationCallable() {
- return deleteNotificationCallable;
+ public UnaryCallable deleteNotificationConfigCallable() {
+ return deleteNotificationConfigCallable;
}
@Override
- public UnaryCallable getNotificationCallable() {
- return getNotificationCallable;
+ public UnaryCallable
+ getNotificationConfigCallable() {
+ return getNotificationConfigCallable;
}
@Override
- public UnaryCallable createNotificationCallable() {
- return createNotificationCallable;
+ public UnaryCallable
+ createNotificationConfigCallable() {
+ return createNotificationConfigCallable;
}
@Override
- public UnaryCallable
- listNotificationsCallable() {
- return listNotificationsCallable;
+ public UnaryCallable
+ listNotificationConfigsCallable() {
+ return listNotificationConfigsCallable;
}
@Override
- public UnaryCallable
- listNotificationsPagedCallable() {
- return listNotificationsPagedCallable;
+ public UnaryCallable
+ listNotificationConfigsPagedCallable() {
+ return listNotificationConfigsPagedCallable;
}
@Override
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java
index c9562ed983..ced8e52c4a 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java
@@ -18,7 +18,7 @@
import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse;
import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse;
-import static com.google.storage.v2.StorageClient.ListNotificationsPagedResponse;
+import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse;
import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
@@ -38,14 +38,14 @@
import com.google.storage.v2.CreateBucketRequest;
import com.google.storage.v2.CreateHmacKeyRequest;
import com.google.storage.v2.CreateHmacKeyResponse;
-import com.google.storage.v2.CreateNotificationRequest;
+import com.google.storage.v2.CreateNotificationConfigRequest;
import com.google.storage.v2.DeleteBucketRequest;
import com.google.storage.v2.DeleteHmacKeyRequest;
-import com.google.storage.v2.DeleteNotificationRequest;
+import com.google.storage.v2.DeleteNotificationConfigRequest;
import com.google.storage.v2.DeleteObjectRequest;
import com.google.storage.v2.GetBucketRequest;
import com.google.storage.v2.GetHmacKeyRequest;
-import com.google.storage.v2.GetNotificationRequest;
+import com.google.storage.v2.GetNotificationConfigRequest;
import com.google.storage.v2.GetObjectRequest;
import com.google.storage.v2.GetServiceAccountRequest;
import com.google.storage.v2.HmacKeyMetadata;
@@ -53,12 +53,12 @@
import com.google.storage.v2.ListBucketsResponse;
import com.google.storage.v2.ListHmacKeysRequest;
import com.google.storage.v2.ListHmacKeysResponse;
-import com.google.storage.v2.ListNotificationsRequest;
-import com.google.storage.v2.ListNotificationsResponse;
+import com.google.storage.v2.ListNotificationConfigsRequest;
+import com.google.storage.v2.ListNotificationConfigsResponse;
import com.google.storage.v2.ListObjectsRequest;
import com.google.storage.v2.ListObjectsResponse;
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
-import com.google.storage.v2.Notification;
+import com.google.storage.v2.NotificationConfig;
import com.google.storage.v2.Object;
import com.google.storage.v2.QueryWriteStatusRequest;
import com.google.storage.v2.QueryWriteStatusResponse;
@@ -127,26 +127,29 @@ public UnaryCallable updateBucketCallable() {
throw new UnsupportedOperationException("Not implemented: updateBucketCallable()");
}
- public UnaryCallable deleteNotificationCallable() {
- throw new UnsupportedOperationException("Not implemented: deleteNotificationCallable()");
+ public UnaryCallable deleteNotificationConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()");
}
- public UnaryCallable getNotificationCallable() {
- throw new UnsupportedOperationException("Not implemented: getNotificationCallable()");
+ public UnaryCallable
+ getNotificationConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: getNotificationConfigCallable()");
}
- public UnaryCallable createNotificationCallable() {
- throw new UnsupportedOperationException("Not implemented: createNotificationCallable()");
+ public UnaryCallable
+ createNotificationConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: createNotificationConfigCallable()");
}
- public UnaryCallable
- listNotificationsPagedCallable() {
- throw new UnsupportedOperationException("Not implemented: listNotificationsPagedCallable()");
+ public UnaryCallable
+ listNotificationConfigsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listNotificationConfigsPagedCallable()");
}
- public UnaryCallable
- listNotificationsCallable() {
- throw new UnsupportedOperationException("Not implemented: listNotificationsCallable()");
+ public UnaryCallable
+ listNotificationConfigsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listNotificationConfigsCallable()");
}
public UnaryCallable composeObjectCallable() {
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
index 3f882e3850..a7a999e69c 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
@@ -18,7 +18,7 @@
import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse;
import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse;
-import static com.google.storage.v2.StorageClient.ListNotificationsPagedResponse;
+import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse;
import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse;
import com.google.api.core.ApiFunction;
@@ -62,14 +62,14 @@
import com.google.storage.v2.CreateBucketRequest;
import com.google.storage.v2.CreateHmacKeyRequest;
import com.google.storage.v2.CreateHmacKeyResponse;
-import com.google.storage.v2.CreateNotificationRequest;
+import com.google.storage.v2.CreateNotificationConfigRequest;
import com.google.storage.v2.DeleteBucketRequest;
import com.google.storage.v2.DeleteHmacKeyRequest;
-import com.google.storage.v2.DeleteNotificationRequest;
+import com.google.storage.v2.DeleteNotificationConfigRequest;
import com.google.storage.v2.DeleteObjectRequest;
import com.google.storage.v2.GetBucketRequest;
import com.google.storage.v2.GetHmacKeyRequest;
-import com.google.storage.v2.GetNotificationRequest;
+import com.google.storage.v2.GetNotificationConfigRequest;
import com.google.storage.v2.GetObjectRequest;
import com.google.storage.v2.GetServiceAccountRequest;
import com.google.storage.v2.HmacKeyMetadata;
@@ -77,12 +77,12 @@
import com.google.storage.v2.ListBucketsResponse;
import com.google.storage.v2.ListHmacKeysRequest;
import com.google.storage.v2.ListHmacKeysResponse;
-import com.google.storage.v2.ListNotificationsRequest;
-import com.google.storage.v2.ListNotificationsResponse;
+import com.google.storage.v2.ListNotificationConfigsRequest;
+import com.google.storage.v2.ListNotificationConfigsResponse;
import com.google.storage.v2.ListObjectsRequest;
import com.google.storage.v2.ListObjectsResponse;
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
-import com.google.storage.v2.Notification;
+import com.google.storage.v2.NotificationConfig;
import com.google.storage.v2.Object;
import com.google.storage.v2.QueryWriteStatusRequest;
import com.google.storage.v2.QueryWriteStatusResponse;
@@ -163,13 +163,17 @@ public class StorageStubSettings extends StubSettings {
private final UnaryCallSettings
testIamPermissionsSettings;
private final UnaryCallSettings updateBucketSettings;
- private final UnaryCallSettings deleteNotificationSettings;
- private final UnaryCallSettings getNotificationSettings;
- private final UnaryCallSettings
- createNotificationSettings;
+ private final UnaryCallSettings
+ deleteNotificationConfigSettings;
+ private final UnaryCallSettings
+ getNotificationConfigSettings;
+ private final UnaryCallSettings
+ createNotificationConfigSettings;
private final PagedCallSettings<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings;
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings;
private final UnaryCallSettings composeObjectSettings;
private final UnaryCallSettings deleteObjectSettings;
private final UnaryCallSettings
@@ -234,42 +238,47 @@ public Iterable extractResources(ListBucketsResponse payload) {
};
private static final PagedListDescriptor<
- ListNotificationsRequest, ListNotificationsResponse, Notification>
- LIST_NOTIFICATIONS_PAGE_STR_DESC =
+ ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig>
+ LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC =
new PagedListDescriptor<
- ListNotificationsRequest, ListNotificationsResponse, Notification>() {
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ NotificationConfig>() {
@Override
public String emptyToken() {
return "";
}
@Override
- public ListNotificationsRequest injectToken(
- ListNotificationsRequest payload, String token) {
- return ListNotificationsRequest.newBuilder(payload).setPageToken(token).build();
+ public ListNotificationConfigsRequest injectToken(
+ ListNotificationConfigsRequest payload, String token) {
+ return ListNotificationConfigsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
- public ListNotificationsRequest injectPageSize(
- ListNotificationsRequest payload, int pageSize) {
- return ListNotificationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ public ListNotificationConfigsRequest injectPageSize(
+ ListNotificationConfigsRequest payload, int pageSize) {
+ return ListNotificationConfigsRequest.newBuilder(payload)
+ .setPageSize(pageSize)
+ .build();
}
@Override
- public Integer extractPageSize(ListNotificationsRequest payload) {
+ public Integer extractPageSize(ListNotificationConfigsRequest payload) {
return payload.getPageSize();
}
@Override
- public String extractNextToken(ListNotificationsResponse payload) {
+ public String extractNextToken(ListNotificationConfigsResponse payload) {
return payload.getNextPageToken();
}
@Override
- public Iterable extractResources(ListNotificationsResponse payload) {
- return payload.getNotificationsList() == null
- ? ImmutableList.of()
- : payload.getNotificationsList();
+ public Iterable extractResources(
+ ListNotificationConfigsResponse payload) {
+ return payload.getNotificationConfigsList() == null
+ ? ImmutableList.of()
+ : payload.getNotificationConfigsList();
}
};
@@ -364,23 +373,29 @@ public ApiFuture getFuturePagedResponse(
};
private static final PagedListResponseFactory<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- LIST_NOTIFICATIONS_PAGE_STR_FACT =
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT =
new PagedListResponseFactory<
- ListNotificationsRequest,
- ListNotificationsResponse,
- ListNotificationsPagedResponse>() {
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>() {
@Override
- public ApiFuture getFuturePagedResponse(
- UnaryCallable callable,
- ListNotificationsRequest request,
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable
+ callable,
+ ListNotificationConfigsRequest request,
ApiCallContext context,
- ApiFuture futureResponse) {
- PageContext
+ ApiFuture futureResponse) {
+ PageContext<
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ NotificationConfig>
pageContext =
PageContext.create(
- callable, LIST_NOTIFICATIONS_PAGE_STR_DESC, request, context);
- return ListNotificationsPagedResponse.createAsync(pageContext, futureResponse);
+ callable, LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC, request, context);
+ return ListNotificationConfigsPagedResponse.createAsync(pageContext, futureResponse);
}
};
@@ -466,26 +481,31 @@ public UnaryCallSettings updateBucketSettings() {
return updateBucketSettings;
}
- /** Returns the object with the settings used for calls to deleteNotification. */
- public UnaryCallSettings deleteNotificationSettings() {
- return deleteNotificationSettings;
+ /** Returns the object with the settings used for calls to deleteNotificationConfig. */
+ public UnaryCallSettings
+ deleteNotificationConfigSettings() {
+ return deleteNotificationConfigSettings;
}
- /** Returns the object with the settings used for calls to getNotification. */
- public UnaryCallSettings getNotificationSettings() {
- return getNotificationSettings;
+ /** Returns the object with the settings used for calls to getNotificationConfig. */
+ public UnaryCallSettings
+ getNotificationConfigSettings() {
+ return getNotificationConfigSettings;
}
- /** Returns the object with the settings used for calls to createNotification. */
- public UnaryCallSettings createNotificationSettings() {
- return createNotificationSettings;
+ /** Returns the object with the settings used for calls to createNotificationConfig. */
+ public UnaryCallSettings
+ createNotificationConfigSettings() {
+ return createNotificationConfigSettings;
}
- /** Returns the object with the settings used for calls to listNotifications. */
+ /** Returns the object with the settings used for calls to listNotificationConfigs. */
public PagedCallSettings<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings() {
- return listNotificationsSettings;
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings() {
+ return listNotificationConfigsSettings;
}
/** Returns the object with the settings used for calls to composeObject. */
@@ -661,10 +681,10 @@ protected StorageStubSettings(Builder settingsBuilder) throws IOException {
setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
updateBucketSettings = settingsBuilder.updateBucketSettings().build();
- deleteNotificationSettings = settingsBuilder.deleteNotificationSettings().build();
- getNotificationSettings = settingsBuilder.getNotificationSettings().build();
- createNotificationSettings = settingsBuilder.createNotificationSettings().build();
- listNotificationsSettings = settingsBuilder.listNotificationsSettings().build();
+ deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build();
+ getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().build();
+ createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build();
+ listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build();
composeObjectSettings = settingsBuilder.composeObjectSettings().build();
deleteObjectSettings = settingsBuilder.deleteObjectSettings().build();
cancelResumableWriteSettings = settingsBuilder.cancelResumableWriteSettings().build();
@@ -700,15 +720,17 @@ public static class Builder extends StubSettings.Builder
testIamPermissionsSettings;
private final UnaryCallSettings.Builder updateBucketSettings;
- private final UnaryCallSettings.Builder
- deleteNotificationSettings;
- private final UnaryCallSettings.Builder
- getNotificationSettings;
- private final UnaryCallSettings.Builder
- createNotificationSettings;
+ private final UnaryCallSettings.Builder
+ deleteNotificationConfigSettings;
+ private final UnaryCallSettings.Builder
+ getNotificationConfigSettings;
+ private final UnaryCallSettings.Builder
+ createNotificationConfigSettings;
private final PagedCallSettings.Builder<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings;
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings;
private final UnaryCallSettings.Builder composeObjectSettings;
private final UnaryCallSettings.Builder deleteObjectSettings;
private final UnaryCallSettings.Builder<
@@ -789,10 +811,11 @@ protected Builder(ClientContext clientContext) {
setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateBucketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
- deleteNotificationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
- getNotificationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
- createNotificationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
- listNotificationsSettings = PagedCallSettings.newBuilder(LIST_NOTIFICATIONS_PAGE_STR_FACT);
+ deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listNotificationConfigsSettings =
+ PagedCallSettings.newBuilder(LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT);
composeObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
cancelResumableWriteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -822,10 +845,10 @@ protected Builder(ClientContext clientContext) {
setIamPolicySettings,
testIamPermissionsSettings,
updateBucketSettings,
- deleteNotificationSettings,
- getNotificationSettings,
- createNotificationSettings,
- listNotificationsSettings,
+ deleteNotificationConfigSettings,
+ getNotificationConfigSettings,
+ createNotificationConfigSettings,
+ listNotificationConfigsSettings,
composeObjectSettings,
deleteObjectSettings,
cancelResumableWriteSettings,
@@ -856,10 +879,10 @@ protected Builder(StorageStubSettings settings) {
setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
updateBucketSettings = settings.updateBucketSettings.toBuilder();
- deleteNotificationSettings = settings.deleteNotificationSettings.toBuilder();
- getNotificationSettings = settings.getNotificationSettings.toBuilder();
- createNotificationSettings = settings.createNotificationSettings.toBuilder();
- listNotificationsSettings = settings.listNotificationsSettings.toBuilder();
+ deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder();
+ getNotificationConfigSettings = settings.getNotificationConfigSettings.toBuilder();
+ createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder();
+ listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder();
composeObjectSettings = settings.composeObjectSettings.toBuilder();
deleteObjectSettings = settings.deleteObjectSettings.toBuilder();
cancelResumableWriteSettings = settings.cancelResumableWriteSettings.toBuilder();
@@ -889,10 +912,10 @@ protected Builder(StorageStubSettings settings) {
setIamPolicySettings,
testIamPermissionsSettings,
updateBucketSettings,
- deleteNotificationSettings,
- getNotificationSettings,
- createNotificationSettings,
- listNotificationsSettings,
+ deleteNotificationConfigSettings,
+ getNotificationConfigSettings,
+ createNotificationConfigSettings,
+ listNotificationConfigsSettings,
composeObjectSettings,
deleteObjectSettings,
cancelResumableWriteSettings,
@@ -970,22 +993,22 @@ private static Builder initDefaults(Builder builder) {
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .deleteNotificationSettings()
+ .deleteNotificationConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .getNotificationSettings()
+ .getNotificationConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .createNotificationSettings()
+ .createNotificationConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .listNotificationsSettings()
+ .listNotificationConfigsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
@@ -1136,29 +1159,31 @@ public UnaryCallSettings.Builder updateBucketSettin
return updateBucketSettings;
}
- /** Returns the builder for the settings used for calls to deleteNotification. */
- public UnaryCallSettings.Builder
- deleteNotificationSettings() {
- return deleteNotificationSettings;
+ /** Returns the builder for the settings used for calls to deleteNotificationConfig. */
+ public UnaryCallSettings.Builder
+ deleteNotificationConfigSettings() {
+ return deleteNotificationConfigSettings;
}
- /** Returns the builder for the settings used for calls to getNotification. */
- public UnaryCallSettings.Builder
- getNotificationSettings() {
- return getNotificationSettings;
+ /** Returns the builder for the settings used for calls to getNotificationConfig. */
+ public UnaryCallSettings.Builder
+ getNotificationConfigSettings() {
+ return getNotificationConfigSettings;
}
- /** Returns the builder for the settings used for calls to createNotification. */
- public UnaryCallSettings.Builder
- createNotificationSettings() {
- return createNotificationSettings;
+ /** Returns the builder for the settings used for calls to createNotificationConfig. */
+ public UnaryCallSettings.Builder
+ createNotificationConfigSettings() {
+ return createNotificationConfigSettings;
}
- /** Returns the builder for the settings used for calls to listNotifications. */
+ /** Returns the builder for the settings used for calls to listNotificationConfigs. */
public PagedCallSettings.Builder<
- ListNotificationsRequest, ListNotificationsResponse, ListNotificationsPagedResponse>
- listNotificationsSettings() {
- return listNotificationsSettings;
+ ListNotificationConfigsRequest,
+ ListNotificationConfigsResponse,
+ ListNotificationConfigsPagedResponse>
+ listNotificationConfigsSettings() {
+ return listNotificationConfigsSettings;
}
/** Returns the builder for the settings used for calls to composeObject. */
diff --git a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json
index 9442f71159..45b0f29779 100644
--- a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json
+++ b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json
@@ -22,8 +22,8 @@
"CreateHmacKey": {
"methods": ["createHmacKey", "createHmacKey", "createHmacKey", "createHmacKeyCallable"]
},
- "CreateNotification": {
- "methods": ["createNotification", "createNotification", "createNotification", "createNotificationCallable"]
+ "CreateNotificationConfig": {
+ "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"]
},
"DeleteBucket": {
"methods": ["deleteBucket", "deleteBucket", "deleteBucket", "deleteBucketCallable"]
@@ -31,8 +31,8 @@
"DeleteHmacKey": {
"methods": ["deleteHmacKey", "deleteHmacKey", "deleteHmacKey", "deleteHmacKeyCallable"]
},
- "DeleteNotification": {
- "methods": ["deleteNotification", "deleteNotification", "deleteNotification", "deleteNotificationCallable"]
+ "DeleteNotificationConfig": {
+ "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"]
},
"DeleteObject": {
"methods": ["deleteObject", "deleteObject", "deleteObject", "deleteObjectCallable"]
@@ -46,8 +46,8 @@
"GetIamPolicy": {
"methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"]
},
- "GetNotification": {
- "methods": ["getNotification", "getNotification", "getNotification", "getNotificationCallable"]
+ "GetNotificationConfig": {
+ "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"]
},
"GetObject": {
"methods": ["getObject", "getObject", "getObject", "getObjectCallable"]
@@ -61,8 +61,8 @@
"ListHmacKeys": {
"methods": ["listHmacKeys", "listHmacKeys", "listHmacKeys", "listHmacKeysPagedCallable", "listHmacKeysCallable"]
},
- "ListNotifications": {
- "methods": ["listNotifications", "listNotifications", "listNotifications", "listNotificationsPagedCallable", "listNotificationsCallable"]
+ "ListNotificationConfigs": {
+ "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"]
},
"ListObjects": {
"methods": ["listObjects", "listObjects", "listObjects", "listObjectsPagedCallable", "listObjectsCallable"]
diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java
index f9781c107f..a29e115caf 100644
--- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java
+++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java
@@ -249,8 +249,8 @@ public void updateBucket(UpdateBucketRequest request, StreamObserver res
}
@Override
- public void deleteNotification(
- DeleteNotificationRequest request, StreamObserver responseObserver) {
+ public void deleteNotificationConfig(
+ DeleteNotificationConfigRequest request, StreamObserver responseObserver) {
java.lang.Object response = responses.poll();
if (response instanceof Empty) {
requests.add(request);
@@ -262,7 +262,7 @@ public void deleteNotification(
responseObserver.onError(
new IllegalArgumentException(
String.format(
- "Unrecognized response type %s for method DeleteNotification, expected %s or %s",
+ "Unrecognized response type %s for method DeleteNotificationConfig, expected %s or %s",
response == null ? "null" : response.getClass().getName(),
Empty.class.getName(),
Exception.class.getName())));
@@ -270,12 +270,12 @@ public void deleteNotification(
}
@Override
- public void getNotification(
- GetNotificationRequest request, StreamObserver responseObserver) {
+ public void getNotificationConfig(
+ GetNotificationConfigRequest request, StreamObserver responseObserver) {
java.lang.Object response = responses.poll();
- if (response instanceof Notification) {
+ if (response instanceof NotificationConfig) {
requests.add(request);
- responseObserver.onNext(((Notification) response));
+ responseObserver.onNext(((NotificationConfig) response));
responseObserver.onCompleted();
} else if (response instanceof Exception) {
responseObserver.onError(((Exception) response));
@@ -283,20 +283,21 @@ public void getNotification(
responseObserver.onError(
new IllegalArgumentException(
String.format(
- "Unrecognized response type %s for method GetNotification, expected %s or %s",
+ "Unrecognized response type %s for method GetNotificationConfig, expected %s or %s",
response == null ? "null" : response.getClass().getName(),
- Notification.class.getName(),
+ NotificationConfig.class.getName(),
Exception.class.getName())));
}
}
@Override
- public void createNotification(
- CreateNotificationRequest request, StreamObserver responseObserver) {
+ public void createNotificationConfig(
+ CreateNotificationConfigRequest request,
+ StreamObserver responseObserver) {
java.lang.Object response = responses.poll();
- if (response instanceof Notification) {
+ if (response instanceof NotificationConfig) {
requests.add(request);
- responseObserver.onNext(((Notification) response));
+ responseObserver.onNext(((NotificationConfig) response));
responseObserver.onCompleted();
} else if (response instanceof Exception) {
responseObserver.onError(((Exception) response));
@@ -304,21 +305,21 @@ public void createNotification(
responseObserver.onError(
new IllegalArgumentException(
String.format(
- "Unrecognized response type %s for method CreateNotification, expected %s or %s",
+ "Unrecognized response type %s for method CreateNotificationConfig, expected %s or %s",
response == null ? "null" : response.getClass().getName(),
- Notification.class.getName(),
+ NotificationConfig.class.getName(),
Exception.class.getName())));
}
}
@Override
- public void listNotifications(
- ListNotificationsRequest request,
- StreamObserver responseObserver) {
+ public void listNotificationConfigs(
+ ListNotificationConfigsRequest request,
+ StreamObserver responseObserver) {
java.lang.Object response = responses.poll();
- if (response instanceof ListNotificationsResponse) {
+ if (response instanceof ListNotificationConfigsResponse) {
requests.add(request);
- responseObserver.onNext(((ListNotificationsResponse) response));
+ responseObserver.onNext(((ListNotificationConfigsResponse) response));
responseObserver.onCompleted();
} else if (response instanceof Exception) {
responseObserver.onError(((Exception) response));
@@ -326,9 +327,9 @@ public void listNotifications(
responseObserver.onError(
new IllegalArgumentException(
String.format(
- "Unrecognized response type %s for method ListNotifications, expected %s or %s",
+ "Unrecognized response type %s for method ListNotificationConfigs, expected %s or %s",
response == null ? "null" : response.getClass().getName(),
- ListNotificationsResponse.class.getName(),
+ ListNotificationConfigsResponse.class.getName(),
Exception.class.getName())));
}
}
diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
index 9f1c7c9aa6..8584cb4b63 100644
--- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
+++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
@@ -18,7 +18,7 @@
import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse;
import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse;
-import static com.google.storage.v2.StorageClient.ListNotificationsPagedResponse;
+import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse;
import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse;
import com.google.api.gax.core.NoCredentialsProvider;
@@ -984,17 +984,19 @@ public void updateBucketExceptionTest() throws Exception {
}
@Test
- public void deleteNotificationTest() throws Exception {
+ public void deleteNotificationConfigTest() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockStorage.addResponse(expectedResponse);
- NotificationName name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]");
+ NotificationConfigName name =
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
- client.deleteNotification(name);
+ client.deleteNotificationConfig(name);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- DeleteNotificationRequest actualRequest = ((DeleteNotificationRequest) actualRequests.get(0));
+ DeleteNotificationConfigRequest actualRequest =
+ ((DeleteNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(name.toString(), actualRequest.getName());
Assert.assertTrue(
@@ -1004,13 +1006,14 @@ public void deleteNotificationTest() throws Exception {
}
@Test
- public void deleteNotificationExceptionTest() throws Exception {
+ public void deleteNotificationConfigExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
- NotificationName name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]");
- client.deleteNotification(name);
+ NotificationConfigName name =
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
+ client.deleteNotificationConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1018,17 +1021,18 @@ public void deleteNotificationExceptionTest() throws Exception {
}
@Test
- public void deleteNotificationTest2() throws Exception {
+ public void deleteNotificationConfigTest2() throws Exception {
Empty expectedResponse = Empty.newBuilder().build();
mockStorage.addResponse(expectedResponse);
String name = "name3373707";
- client.deleteNotification(name);
+ client.deleteNotificationConfig(name);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- DeleteNotificationRequest actualRequest = ((DeleteNotificationRequest) actualRequests.get(0));
+ DeleteNotificationConfigRequest actualRequest =
+ ((DeleteNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(name, actualRequest.getName());
Assert.assertTrue(
@@ -1038,13 +1042,13 @@ public void deleteNotificationTest2() throws Exception {
}
@Test
- public void deleteNotificationExceptionTest2() throws Exception {
+ public void deleteNotificationConfigExceptionTest2() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
String name = "name3373707";
- client.deleteNotification(name);
+ client.deleteNotificationConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1052,10 +1056,12 @@ public void deleteNotificationExceptionTest2() throws Exception {
}
@Test
- public void getNotificationTest() throws Exception {
- Notification expectedResponse =
- Notification.newBuilder()
- .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ public void getNotificationConfigTest() throws Exception {
+ NotificationConfig expectedResponse =
+ NotificationConfig.newBuilder()
+ .setName(
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ .toString())
.setTopic("topic110546223")
.setEtag("etag3123477")
.addAllEventTypes(new ArrayList())
@@ -1067,12 +1073,13 @@ public void getNotificationTest() throws Exception {
BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
- Notification actualResponse = client.getNotification(name);
+ NotificationConfig actualResponse = client.getNotificationConfig(name);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- GetNotificationRequest actualRequest = ((GetNotificationRequest) actualRequests.get(0));
+ GetNotificationConfigRequest actualRequest =
+ ((GetNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(name.toString(), actualRequest.getName());
Assert.assertTrue(
@@ -1082,13 +1089,13 @@ public void getNotificationTest() throws Exception {
}
@Test
- public void getNotificationExceptionTest() throws Exception {
+ public void getNotificationConfigExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
- client.getNotification(name);
+ client.getNotificationConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1096,10 +1103,12 @@ public void getNotificationExceptionTest() throws Exception {
}
@Test
- public void getNotificationTest2() throws Exception {
- Notification expectedResponse =
- Notification.newBuilder()
- .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ public void getNotificationConfigTest2() throws Exception {
+ NotificationConfig expectedResponse =
+ NotificationConfig.newBuilder()
+ .setName(
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ .toString())
.setTopic("topic110546223")
.setEtag("etag3123477")
.addAllEventTypes(new ArrayList())
@@ -1111,12 +1120,13 @@ public void getNotificationTest2() throws Exception {
String name = "name3373707";
- Notification actualResponse = client.getNotification(name);
+ NotificationConfig actualResponse = client.getNotificationConfig(name);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- GetNotificationRequest actualRequest = ((GetNotificationRequest) actualRequests.get(0));
+ GetNotificationConfigRequest actualRequest =
+ ((GetNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(name, actualRequest.getName());
Assert.assertTrue(
@@ -1126,13 +1136,13 @@ public void getNotificationTest2() throws Exception {
}
@Test
- public void getNotificationExceptionTest2() throws Exception {
+ public void getNotificationConfigExceptionTest2() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
String name = "name3373707";
- client.getNotification(name);
+ client.getNotificationConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1140,10 +1150,12 @@ public void getNotificationExceptionTest2() throws Exception {
}
@Test
- public void createNotificationTest() throws Exception {
- Notification expectedResponse =
- Notification.newBuilder()
- .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ public void createNotificationConfigTest() throws Exception {
+ NotificationConfig expectedResponse =
+ NotificationConfig.newBuilder()
+ .setName(
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ .toString())
.setTopic("topic110546223")
.setEtag("etag3123477")
.addAllEventTypes(new ArrayList())
@@ -1154,17 +1166,18 @@ public void createNotificationTest() throws Exception {
mockStorage.addResponse(expectedResponse);
ProjectName parent = ProjectName.of("[PROJECT]");
- Notification notification = Notification.newBuilder().build();
+ NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
- Notification actualResponse = client.createNotification(parent, notification);
+ NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- CreateNotificationRequest actualRequest = ((CreateNotificationRequest) actualRequests.get(0));
+ CreateNotificationConfigRequest actualRequest =
+ ((CreateNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(parent.toString(), actualRequest.getParent());
- Assert.assertEquals(notification, actualRequest.getNotification());
+ Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -1172,14 +1185,14 @@ public void createNotificationTest() throws Exception {
}
@Test
- public void createNotificationExceptionTest() throws Exception {
+ public void createNotificationConfigExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
ProjectName parent = ProjectName.of("[PROJECT]");
- Notification notification = Notification.newBuilder().build();
- client.createNotification(parent, notification);
+ NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+ client.createNotificationConfig(parent, notificationConfig);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1187,10 +1200,12 @@ public void createNotificationExceptionTest() throws Exception {
}
@Test
- public void createNotificationTest2() throws Exception {
- Notification expectedResponse =
- Notification.newBuilder()
- .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
+ public void createNotificationConfigTest2() throws Exception {
+ NotificationConfig expectedResponse =
+ NotificationConfig.newBuilder()
+ .setName(
+ NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
+ .toString())
.setTopic("topic110546223")
.setEtag("etag3123477")
.addAllEventTypes(new ArrayList())
@@ -1201,17 +1216,18 @@ public void createNotificationTest2() throws Exception {
mockStorage.addResponse(expectedResponse);
String parent = "parent-995424086";
- Notification notification = Notification.newBuilder().build();
+ NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
- Notification actualResponse = client.createNotification(parent, notification);
+ NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- CreateNotificationRequest actualRequest = ((CreateNotificationRequest) actualRequests.get(0));
+ CreateNotificationConfigRequest actualRequest =
+ ((CreateNotificationConfigRequest) actualRequests.get(0));
Assert.assertEquals(parent, actualRequest.getParent());
- Assert.assertEquals(notification, actualRequest.getNotification());
+ Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -1219,14 +1235,14 @@ public void createNotificationTest2() throws Exception {
}
@Test
- public void createNotificationExceptionTest2() throws Exception {
+ public void createNotificationConfigExceptionTest2() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
String parent = "parent-995424086";
- Notification notification = Notification.newBuilder().build();
- client.createNotification(parent, notification);
+ NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
+ client.createNotificationConfig(parent, notificationConfig);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1234,27 +1250,28 @@ public void createNotificationExceptionTest2() throws Exception {
}
@Test
- public void listNotificationsTest() throws Exception {
- Notification responsesElement = Notification.newBuilder().build();
- ListNotificationsResponse expectedResponse =
- ListNotificationsResponse.newBuilder()
+ public void listNotificationConfigsTest() throws Exception {
+ NotificationConfig responsesElement = NotificationConfig.newBuilder().build();
+ ListNotificationConfigsResponse expectedResponse =
+ ListNotificationConfigsResponse.newBuilder()
.setNextPageToken("")
- .addAllNotifications(Arrays.asList(responsesElement))
+ .addAllNotificationConfigs(Arrays.asList(responsesElement))
.build();
mockStorage.addResponse(expectedResponse);
ProjectName parent = ProjectName.of("[PROJECT]");
- ListNotificationsPagedResponse pagedListResponse = client.listNotifications(parent);
+ ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent);
- List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
Assert.assertEquals(1, resources.size());
- Assert.assertEquals(expectedResponse.getNotificationsList().get(0), resources.get(0));
+ Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0));
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- ListNotificationsRequest actualRequest = ((ListNotificationsRequest) actualRequests.get(0));
+ ListNotificationConfigsRequest actualRequest =
+ ((ListNotificationConfigsRequest) actualRequests.get(0));
Assert.assertEquals(parent.toString(), actualRequest.getParent());
Assert.assertTrue(
@@ -1264,13 +1281,13 @@ public void listNotificationsTest() throws Exception {
}
@Test
- public void listNotificationsExceptionTest() throws Exception {
+ public void listNotificationConfigsExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
ProjectName parent = ProjectName.of("[PROJECT]");
- client.listNotifications(parent);
+ client.listNotificationConfigs(parent);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
@@ -1278,27 +1295,28 @@ public void listNotificationsExceptionTest() throws Exception {
}
@Test
- public void listNotificationsTest2() throws Exception {
- Notification responsesElement = Notification.newBuilder().build();
- ListNotificationsResponse expectedResponse =
- ListNotificationsResponse.newBuilder()
+ public void listNotificationConfigsTest2() throws Exception {
+ NotificationConfig responsesElement = NotificationConfig.newBuilder().build();
+ ListNotificationConfigsResponse expectedResponse =
+ ListNotificationConfigsResponse.newBuilder()
.setNextPageToken("")
- .addAllNotifications(Arrays.asList(responsesElement))
+ .addAllNotificationConfigs(Arrays.asList(responsesElement))
.build();
mockStorage.addResponse(expectedResponse);
String parent = "parent-995424086";
- ListNotificationsPagedResponse pagedListResponse = client.listNotifications(parent);
+ ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent);
- List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
Assert.assertEquals(1, resources.size());
- Assert.assertEquals(expectedResponse.getNotificationsList().get(0), resources.get(0));
+ Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0));
List actualRequests = mockStorage.getRequests();
Assert.assertEquals(1, actualRequests.size());
- ListNotificationsRequest actualRequest = ((ListNotificationsRequest) actualRequests.get(0));
+ ListNotificationConfigsRequest actualRequest =
+ ((ListNotificationConfigsRequest) actualRequests.get(0));
Assert.assertEquals(parent, actualRequest.getParent());
Assert.assertTrue(
@@ -1308,13 +1326,13 @@ public void listNotificationsTest2() throws Exception {
}
@Test
- public void listNotificationsExceptionTest2() throws Exception {
+ public void listNotificationConfigsExceptionTest2() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockStorage.addException(exception);
try {
String parent = "parent-995424086";
- client.listNotifications(parent);
+ client.listNotificationConfigs(parent);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
diff --git a/google-cloud-storage-bom/pom.xml b/google-cloud-storage-bom/pom.xml
index e81a46ccd1..d98f94ac52 100644
--- a/google-cloud-storage-bom/pom.xml
+++ b/google-cloud-storage-bom/pom.xml
@@ -19,7 +19,7 @@
4.0.0
com.google.cloud
google-cloud-storage-bom
- 2.17.2-SNAPSHOT
+ 2.20.1
pom
com.google.cloud
@@ -69,22 +69,22 @@
com.google.cloud
google-cloud-storage
- 2.17.2-SNAPSHOT
+ 2.20.1
com.google.api.grpc
gapic-google-cloud-storage-v2
- 2.17.2-alpha-SNAPSHOT
+ 2.20.1-alpha
com.google.api.grpc
grpc-google-cloud-storage-v2
- 2.17.2-alpha-SNAPSHOT
+ 2.20.1-alpha
com.google.api.grpc
proto-google-cloud-storage-v2
- 2.17.2-alpha-SNAPSHOT
+ 2.20.1-alpha