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/src/main/java/com/google/cloud/storage/GrpcConversions.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java
index 702e90e8ae..43efe180b9 100644
--- a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java
+++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java
@@ -96,8 +96,8 @@ final class GrpcConversions {
Codec.of(this::blobIdEncode, this::blobIdDecode);
private final Codec blobInfoCodec =
Codec.of(this::blobInfoEncode, this::blobInfoDecode);
- private final Codec notificationInfoCodec =
- Codec.of(this::notificationEncode, this::notificationDecode);
+ private final Codec
+ notificationInfoCodec = Codec.of(this::notificationEncode, this::notificationDecode);
private final Codec policyCodec =
Codec.of(this::policyEncode, this::policyDecode);
private final Codec bindingCodec =
@@ -199,7 +199,7 @@ Codec blobInfo() {
return blobInfoCodec;
}
- Codec notificationInfo() {
+ Codec notificationInfo() {
return notificationInfoCodec;
}
@@ -917,11 +917,11 @@ private BlobInfo blobInfoDecode(Object from) {
return toBuilder.build();
}
- private com.google.storage.v2.Notification notificationEncode(NotificationInfo from) {
+ private com.google.storage.v2.NotificationConfig notificationEncode(NotificationInfo from) {
return todo();
}
- private NotificationInfo notificationDecode(com.google.storage.v2.Notification from) {
+ private NotificationInfo notificationDecode(com.google.storage.v2.NotificationConfig from) {
return todo();
}
diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcRetryAlgorithmManager.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcRetryAlgorithmManager.java
index 892169ddf7..f55c2459cf 100644
--- a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcRetryAlgorithmManager.java
+++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcRetryAlgorithmManager.java
@@ -23,19 +23,19 @@
import com.google.storage.v2.ComposeObjectRequest;
import com.google.storage.v2.CreateBucketRequest;
import com.google.storage.v2.CreateHmacKeyRequest;
-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.ListBucketsRequest;
import com.google.storage.v2.ListHmacKeysRequest;
-import com.google.storage.v2.ListNotificationsRequest;
+import com.google.storage.v2.ListNotificationConfigsRequest;
import com.google.storage.v2.ListObjectsRequest;
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
import com.google.storage.v2.QueryWriteStatusRequest;
@@ -79,7 +79,7 @@ public ResultRetryAlgorithm> getFor(CreateHmacKeyRequest req) {
return retryStrategy.getNonidempotentHandler();
}
- public ResultRetryAlgorithm> getFor(CreateNotificationRequest req) {
+ public ResultRetryAlgorithm> getFor(CreateNotificationConfigRequest req) {
return retryStrategy.getNonidempotentHandler();
}
@@ -91,7 +91,7 @@ public ResultRetryAlgorithm> getFor(DeleteHmacKeyRequest req) {
return retryStrategy.getNonidempotentHandler();
}
- public ResultRetryAlgorithm> getFor(DeleteNotificationRequest req) {
+ public ResultRetryAlgorithm> getFor(DeleteNotificationConfigRequest req) {
return retryStrategy.getNonidempotentHandler();
}
@@ -111,7 +111,7 @@ public ResultRetryAlgorithm> getFor(GetIamPolicyRequest req) {
return retryStrategy.getIdempotentHandler();
}
- public ResultRetryAlgorithm> getFor(GetNotificationRequest req) {
+ public ResultRetryAlgorithm> getFor(GetNotificationConfigRequest req) {
return retryStrategy.getIdempotentHandler();
}
@@ -131,7 +131,7 @@ public ResultRetryAlgorithm> getFor(ListHmacKeysRequest req) {
return retryStrategy.getIdempotentHandler();
}
- public ResultRetryAlgorithm> getFor(ListNotificationsRequest req) {
+ public ResultRetryAlgorithm> getFor(ListNotificationConfigsRequest req) {
return retryStrategy.getIdempotentHandler();
}
diff --git a/grpc-google-cloud-storage-v2/clirr-ignored-differences.xml b/grpc-google-cloud-storage-v2/clirr-ignored-differences.xml
new file mode 100644
index 0000000000..64d400bda1
--- /dev/null
+++ b/grpc-google-cloud-storage-v2/clirr-ignored-differences.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ 7002
+ com/google/storage/v2/*
+ * *Notification*(*)
+
+
diff --git a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
index d55f766cdf..88d497aa4f 100644
--- a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
+++ b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
@@ -417,171 +417,194 @@ private StorageGrpc() {}
}
private static volatile io.grpc.MethodDescriptor<
- com.google.storage.v2.DeleteNotificationRequest, com.google.protobuf.Empty>
- getDeleteNotificationMethod;
+ com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty>
+ getDeleteNotificationConfigMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "DeleteNotification",
- requestType = com.google.storage.v2.DeleteNotificationRequest.class,
+ fullMethodName = SERVICE_NAME + '/' + "DeleteNotificationConfig",
+ requestType = com.google.storage.v2.DeleteNotificationConfigRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
- com.google.storage.v2.DeleteNotificationRequest, com.google.protobuf.Empty>
- getDeleteNotificationMethod() {
+ com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty>
+ getDeleteNotificationConfigMethod() {
io.grpc.MethodDescriptor<
- com.google.storage.v2.DeleteNotificationRequest, com.google.protobuf.Empty>
- getDeleteNotificationMethod;
- if ((getDeleteNotificationMethod = StorageGrpc.getDeleteNotificationMethod) == null) {
+ com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty>
+ getDeleteNotificationConfigMethod;
+ if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod)
+ == null) {
synchronized (StorageGrpc.class) {
- if ((getDeleteNotificationMethod = StorageGrpc.getDeleteNotificationMethod) == null) {
- StorageGrpc.getDeleteNotificationMethod =
- getDeleteNotificationMethod =
+ if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod)
+ == null) {
+ StorageGrpc.getDeleteNotificationConfigMethod =
+ getDeleteNotificationConfigMethod =
io.grpc.MethodDescriptor
- .
+ .
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNotification"))
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "DeleteNotificationConfig"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.DeleteNotificationRequest.getDefaultInstance()))
+ com.google.storage.v2.DeleteNotificationConfigRequest
+ .getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(
- new StorageMethodDescriptorSupplier("DeleteNotification"))
+ new StorageMethodDescriptorSupplier("DeleteNotificationConfig"))
.build();
}
}
}
- return getDeleteNotificationMethod;
+ return getDeleteNotificationConfigMethod;
}
private static volatile io.grpc.MethodDescriptor<
- com.google.storage.v2.GetNotificationRequest, com.google.storage.v2.Notification>
- getGetNotificationMethod;
+ com.google.storage.v2.GetNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getGetNotificationConfigMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "GetNotification",
- requestType = com.google.storage.v2.GetNotificationRequest.class,
- responseType = com.google.storage.v2.Notification.class,
+ fullMethodName = SERVICE_NAME + '/' + "GetNotificationConfig",
+ requestType = com.google.storage.v2.GetNotificationConfigRequest.class,
+ responseType = com.google.storage.v2.NotificationConfig.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
- com.google.storage.v2.GetNotificationRequest, com.google.storage.v2.Notification>
- getGetNotificationMethod() {
+ com.google.storage.v2.GetNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getGetNotificationConfigMethod() {
io.grpc.MethodDescriptor<
- com.google.storage.v2.GetNotificationRequest, com.google.storage.v2.Notification>
- getGetNotificationMethod;
- if ((getGetNotificationMethod = StorageGrpc.getGetNotificationMethod) == null) {
+ com.google.storage.v2.GetNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getGetNotificationConfigMethod;
+ if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) {
synchronized (StorageGrpc.class) {
- if ((getGetNotificationMethod = StorageGrpc.getGetNotificationMethod) == null) {
- StorageGrpc.getGetNotificationMethod =
- getGetNotificationMethod =
+ if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) {
+ StorageGrpc.getGetNotificationConfigMethod =
+ getGetNotificationConfigMethod =
io.grpc.MethodDescriptor
- .
+ .
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNotification"))
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "GetNotificationConfig"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.GetNotificationRequest.getDefaultInstance()))
+ com.google.storage.v2.GetNotificationConfigRequest
+ .getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.Notification.getDefaultInstance()))
- .setSchemaDescriptor(new StorageMethodDescriptorSupplier("GetNotification"))
+ com.google.storage.v2.NotificationConfig.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new StorageMethodDescriptorSupplier("GetNotificationConfig"))
.build();
}
}
}
- return getGetNotificationMethod;
+ return getGetNotificationConfigMethod;
}
private static volatile io.grpc.MethodDescriptor<
- com.google.storage.v2.CreateNotificationRequest, com.google.storage.v2.Notification>
- getCreateNotificationMethod;
+ com.google.storage.v2.CreateNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getCreateNotificationConfigMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "CreateNotification",
- requestType = com.google.storage.v2.CreateNotificationRequest.class,
- responseType = com.google.storage.v2.Notification.class,
+ fullMethodName = SERVICE_NAME + '/' + "CreateNotificationConfig",
+ requestType = com.google.storage.v2.CreateNotificationConfigRequest.class,
+ responseType = com.google.storage.v2.NotificationConfig.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
- com.google.storage.v2.CreateNotificationRequest, com.google.storage.v2.Notification>
- getCreateNotificationMethod() {
+ com.google.storage.v2.CreateNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getCreateNotificationConfigMethod() {
io.grpc.MethodDescriptor<
- com.google.storage.v2.CreateNotificationRequest, com.google.storage.v2.Notification>
- getCreateNotificationMethod;
- if ((getCreateNotificationMethod = StorageGrpc.getCreateNotificationMethod) == null) {
+ com.google.storage.v2.CreateNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>
+ getCreateNotificationConfigMethod;
+ if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod)
+ == null) {
synchronized (StorageGrpc.class) {
- if ((getCreateNotificationMethod = StorageGrpc.getCreateNotificationMethod) == null) {
- StorageGrpc.getCreateNotificationMethod =
- getCreateNotificationMethod =
+ if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod)
+ == null) {
+ StorageGrpc.getCreateNotificationConfigMethod =
+ getCreateNotificationConfigMethod =
io.grpc.MethodDescriptor
- .
+ .
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNotification"))
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "CreateNotificationConfig"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.CreateNotificationRequest.getDefaultInstance()))
+ com.google.storage.v2.CreateNotificationConfigRequest
+ .getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.Notification.getDefaultInstance()))
+ com.google.storage.v2.NotificationConfig.getDefaultInstance()))
.setSchemaDescriptor(
- new StorageMethodDescriptorSupplier("CreateNotification"))
+ new StorageMethodDescriptorSupplier("CreateNotificationConfig"))
.build();
}
}
}
- return getCreateNotificationMethod;
+ return getCreateNotificationConfigMethod;
}
private static volatile io.grpc.MethodDescriptor<
- com.google.storage.v2.ListNotificationsRequest,
- com.google.storage.v2.ListNotificationsResponse>
- getListNotificationsMethod;
+ com.google.storage.v2.ListNotificationConfigsRequest,
+ com.google.storage.v2.ListNotificationConfigsResponse>
+ getListNotificationConfigsMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "ListNotifications",
- requestType = com.google.storage.v2.ListNotificationsRequest.class,
- responseType = com.google.storage.v2.ListNotificationsResponse.class,
+ fullMethodName = SERVICE_NAME + '/' + "ListNotificationConfigs",
+ requestType = com.google.storage.v2.ListNotificationConfigsRequest.class,
+ responseType = com.google.storage.v2.ListNotificationConfigsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
- com.google.storage.v2.ListNotificationsRequest,
- com.google.storage.v2.ListNotificationsResponse>
- getListNotificationsMethod() {
+ com.google.storage.v2.ListNotificationConfigsRequest,
+ com.google.storage.v2.ListNotificationConfigsResponse>
+ getListNotificationConfigsMethod() {
io.grpc.MethodDescriptor<
- com.google.storage.v2.ListNotificationsRequest,
- com.google.storage.v2.ListNotificationsResponse>
- getListNotificationsMethod;
- if ((getListNotificationsMethod = StorageGrpc.getListNotificationsMethod) == null) {
+ com.google.storage.v2.ListNotificationConfigsRequest,
+ com.google.storage.v2.ListNotificationConfigsResponse>
+ getListNotificationConfigsMethod;
+ if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod) == null) {
synchronized (StorageGrpc.class) {
- if ((getListNotificationsMethod = StorageGrpc.getListNotificationsMethod) == null) {
- StorageGrpc.getListNotificationsMethod =
- getListNotificationsMethod =
+ if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod)
+ == null) {
+ StorageGrpc.getListNotificationConfigsMethod =
+ getListNotificationConfigsMethod =
io.grpc.MethodDescriptor
- .
+ .
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotifications"))
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "ListNotificationConfigs"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.ListNotificationsRequest.getDefaultInstance()))
+ com.google.storage.v2.ListNotificationConfigsRequest
+ .getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.storage.v2.ListNotificationsResponse.getDefaultInstance()))
- .setSchemaDescriptor(new StorageMethodDescriptorSupplier("ListNotifications"))
+ com.google.storage.v2.ListNotificationConfigsResponse
+ .getDefaultInstance()))
+ .setSchemaDescriptor(
+ new StorageMethodDescriptorSupplier("ListNotificationConfigs"))
.build();
}
}
}
- return getListNotificationsMethod;
+ return getListNotificationConfigsMethod;
}
private static volatile io.grpc.MethodDescriptor<
@@ -1496,60 +1519,60 @@ public void updateBucket(
*
*
*
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*/
- public void deleteNotification(
- com.google.storage.v2.DeleteNotificationRequest request,
+ public void deleteNotificationConfig(
+ com.google.storage.v2.DeleteNotificationConfigRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
- getDeleteNotificationMethod(), responseObserver);
+ getDeleteNotificationConfigMethod(), responseObserver);
}
/**
*
*
*
- * View a notification config.
+ * View a NotificationConfig.
*
*/
- public void getNotification(
- com.google.storage.v2.GetNotificationRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getNotificationConfig(
+ com.google.storage.v2.GetNotificationConfigRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
- getGetNotificationMethod(), responseObserver);
+ getGetNotificationConfigMethod(), responseObserver);
}
/**
*
*
*
- * Creates a notification subscription for a given bucket.
- * These notifications, when triggered, publish messages to the specified
- * Pub/Sub topics.
- * See https://cloud.google.com/storage/docs/pubsub-notifications.
+ * 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.
*
*/
- public void createNotification(
- com.google.storage.v2.CreateNotificationRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void createNotificationConfig(
+ com.google.storage.v2.CreateNotificationConfigRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
- getCreateNotificationMethod(), responseObserver);
+ getCreateNotificationConfigMethod(), responseObserver);
}
/**
*
*
*
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*/
- public void listNotifications(
- com.google.storage.v2.ListNotificationsRequest request,
- io.grpc.stub.StreamObserver
+ public void listNotificationConfigs(
+ com.google.storage.v2.ListNotificationConfigsRequest request,
+ io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
- getListNotificationsMethod(), responseObserver);
+ getListNotificationConfigsMethod(), responseObserver);
}
/**
@@ -1679,8 +1702,9 @@ public void updateObject(
* 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.
+ * 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 sending a request with `finish_write` set to
@@ -1911,30 +1935,32 @@ public final io.grpc.ServerServiceDefinition bindService() {
com.google.storage.v2.UpdateBucketRequest, com.google.storage.v2.Bucket>(
this, METHODID_UPDATE_BUCKET)))
.addMethod(
- getDeleteNotificationMethod(),
+ getDeleteNotificationConfigMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
- com.google.storage.v2.DeleteNotificationRequest, com.google.protobuf.Empty>(
- this, METHODID_DELETE_NOTIFICATION)))
+ com.google.storage.v2.DeleteNotificationConfigRequest,
+ com.google.protobuf.Empty>(this, METHODID_DELETE_NOTIFICATION_CONFIG)))
.addMethod(
- getGetNotificationMethod(),
+ getGetNotificationConfigMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
- com.google.storage.v2.GetNotificationRequest,
- com.google.storage.v2.Notification>(this, METHODID_GET_NOTIFICATION)))
+ com.google.storage.v2.GetNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>(
+ this, METHODID_GET_NOTIFICATION_CONFIG)))
.addMethod(
- getCreateNotificationMethod(),
+ getCreateNotificationConfigMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
- com.google.storage.v2.CreateNotificationRequest,
- com.google.storage.v2.Notification>(this, METHODID_CREATE_NOTIFICATION)))
+ com.google.storage.v2.CreateNotificationConfigRequest,
+ com.google.storage.v2.NotificationConfig>(
+ this, METHODID_CREATE_NOTIFICATION_CONFIG)))
.addMethod(
- getListNotificationsMethod(),
+ getListNotificationConfigsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
- com.google.storage.v2.ListNotificationsRequest,
- com.google.storage.v2.ListNotificationsResponse>(
- this, METHODID_LIST_NOTIFICATIONS)))
+ com.google.storage.v2.ListNotificationConfigsRequest,
+ com.google.storage.v2.ListNotificationConfigsResponse>(
+ this, METHODID_LIST_NOTIFICATION_CONFIGS)))
.addMethod(
getComposeObjectMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
@@ -2235,14 +2261,14 @@ public void updateBucket(
*
*
*
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*/
- public void deleteNotification(
- com.google.storage.v2.DeleteNotificationRequest request,
+ public void deleteNotificationConfig(
+ com.google.storage.v2.DeleteNotificationConfigRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
- getChannel().newCall(getDeleteNotificationMethod(), getCallOptions()),
+ getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()),
request,
responseObserver);
}
@@ -2251,14 +2277,14 @@ public void deleteNotification(
*
*
*
- * View a notification config.
+ * View a NotificationConfig.
*
*/
- public void getNotification(
- com.google.storage.v2.GetNotificationRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getNotificationConfig(
+ com.google.storage.v2.GetNotificationConfigRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
- getChannel().newCall(getGetNotificationMethod(), getCallOptions()),
+ getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()),
request,
responseObserver);
}
@@ -2267,17 +2293,17 @@ public void getNotification(
*
*
*
- * Creates a notification subscription for a given bucket.
- * These notifications, when triggered, publish messages to the specified
- * Pub/Sub topics.
- * See https://cloud.google.com/storage/docs/pubsub-notifications.
+ * 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.
*
*/
- public void createNotification(
- com.google.storage.v2.CreateNotificationRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void createNotificationConfig(
+ com.google.storage.v2.CreateNotificationConfigRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
- getChannel().newCall(getCreateNotificationMethod(), getCallOptions()),
+ getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()),
request,
responseObserver);
}
@@ -2286,15 +2312,15 @@ public void createNotification(
*
*
*
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*/
- public void listNotifications(
- com.google.storage.v2.ListNotificationsRequest request,
- io.grpc.stub.StreamObserver
+ public void listNotificationConfigs(
+ com.google.storage.v2.ListNotificationConfigsRequest request,
+ io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
- getChannel().newCall(getListNotificationsMethod(), getCallOptions()),
+ getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()),
request,
responseObserver);
}
@@ -2436,8 +2462,9 @@ public void updateObject(
* 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.
+ * 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 sending a request with `finish_write` set to
@@ -2792,55 +2819,55 @@ public com.google.storage.v2.Bucket updateBucket(
*
*
*
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*/
- public com.google.protobuf.Empty deleteNotification(
- com.google.storage.v2.DeleteNotificationRequest request) {
+ public com.google.protobuf.Empty deleteNotificationConfig(
+ com.google.storage.v2.DeleteNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
- getChannel(), getDeleteNotificationMethod(), getCallOptions(), request);
+ getChannel(), getDeleteNotificationConfigMethod(), getCallOptions(), request);
}
/**
*
*
*
- * View a notification config.
+ * View a NotificationConfig.
*
*/
- public com.google.storage.v2.Notification getNotification(
- com.google.storage.v2.GetNotificationRequest request) {
+ public com.google.storage.v2.NotificationConfig getNotificationConfig(
+ com.google.storage.v2.GetNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
- getChannel(), getGetNotificationMethod(), getCallOptions(), request);
+ getChannel(), getGetNotificationConfigMethod(), getCallOptions(), request);
}
/**
*
*
*
- * Creates a notification subscription for a given bucket.
- * These notifications, when triggered, publish messages to the specified
- * Pub/Sub topics.
- * See https://cloud.google.com/storage/docs/pubsub-notifications.
+ * 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.
*
*/
- public com.google.storage.v2.Notification createNotification(
- com.google.storage.v2.CreateNotificationRequest request) {
+ public com.google.storage.v2.NotificationConfig createNotificationConfig(
+ com.google.storage.v2.CreateNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
- getChannel(), getCreateNotificationMethod(), getCallOptions(), request);
+ getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request);
}
/**
*
*
*
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*/
- public com.google.storage.v2.ListNotificationsResponse listNotifications(
- com.google.storage.v2.ListNotificationsRequest request) {
+ public com.google.storage.v2.ListNotificationConfigsResponse listNotificationConfigs(
+ com.google.storage.v2.ListNotificationConfigsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
- getChannel(), getListNotificationsMethod(), getCallOptions(), request);
+ getChannel(), getListNotificationConfigsMethod(), getCallOptions(), request);
}
/**
@@ -3235,56 +3262,58 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c
*
*
*
- * Permanently deletes a notification subscription.
+ * Permanently deletes a NotificationConfig.
*
*/
public com.google.common.util.concurrent.ListenableFuture
- deleteNotification(com.google.storage.v2.DeleteNotificationRequest request) {
+ deleteNotificationConfig(com.google.storage.v2.DeleteNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
- getChannel().newCall(getDeleteNotificationMethod(), getCallOptions()), request);
+ getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request);
}
/**
*
*
*
- * View a notification config.
+ * View a NotificationConfig.
*
*/
- public com.google.common.util.concurrent.ListenableFuture
- getNotification(com.google.storage.v2.GetNotificationRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.storage.v2.NotificationConfig>
+ getNotificationConfig(com.google.storage.v2.GetNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
- getChannel().newCall(getGetNotificationMethod(), getCallOptions()), request);
+ getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request);
}
/**
*
*
*
- * Creates a notification subscription for a given bucket.
- * These notifications, when triggered, publish messages to the specified
- * Pub/Sub topics.
- * See https://cloud.google.com/storage/docs/pubsub-notifications.
+ * 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.
*
*/
- public com.google.common.util.concurrent.ListenableFuture
- createNotification(com.google.storage.v2.CreateNotificationRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.storage.v2.NotificationConfig>
+ createNotificationConfig(com.google.storage.v2.CreateNotificationConfigRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
- getChannel().newCall(getCreateNotificationMethod(), getCallOptions()), request);
+ getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request);
}
/**
*
*
*
- * Retrieves a list of notification subscriptions for a given bucket.
+ * Retrieves a list of NotificationConfigs for a given bucket.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
- com.google.storage.v2.ListNotificationsResponse>
- listNotifications(com.google.storage.v2.ListNotificationsRequest request) {
+ com.google.storage.v2.ListNotificationConfigsResponse>
+ listNotificationConfigs(com.google.storage.v2.ListNotificationConfigsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
- getChannel().newCall(getListNotificationsMethod(), getCallOptions()), request);
+ getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request);
}
/**
@@ -3514,10 +3543,10 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c
private static final int METHODID_SET_IAM_POLICY = 6;
private static final int METHODID_TEST_IAM_PERMISSIONS = 7;
private static final int METHODID_UPDATE_BUCKET = 8;
- private static final int METHODID_DELETE_NOTIFICATION = 9;
- private static final int METHODID_GET_NOTIFICATION = 10;
- private static final int METHODID_CREATE_NOTIFICATION = 11;
- private static final int METHODID_LIST_NOTIFICATIONS = 12;
+ private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 9;
+ private static final int METHODID_GET_NOTIFICATION_CONFIG = 10;
+ private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 11;
+ private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 12;
private static final int METHODID_COMPOSE_OBJECT = 13;
private static final int METHODID_DELETE_OBJECT = 14;
private static final int METHODID_CANCEL_RESUMABLE_WRITE = 15;
@@ -3600,25 +3629,27 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
(com.google.storage.v2.UpdateBucketRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
- case METHODID_DELETE_NOTIFICATION:
- serviceImpl.deleteNotification(
- (com.google.storage.v2.DeleteNotificationRequest) request,
+ case METHODID_DELETE_NOTIFICATION_CONFIG:
+ serviceImpl.deleteNotificationConfig(
+ (com.google.storage.v2.DeleteNotificationConfigRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
- case METHODID_GET_NOTIFICATION:
- serviceImpl.getNotification(
- (com.google.storage.v2.GetNotificationRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ case METHODID_GET_NOTIFICATION_CONFIG:
+ serviceImpl.getNotificationConfig(
+ (com.google.storage.v2.GetNotificationConfigRequest) request,
+ (io.grpc.stub.StreamObserver)
+ responseObserver);
break;
- case METHODID_CREATE_NOTIFICATION:
- serviceImpl.createNotification(
- (com.google.storage.v2.CreateNotificationRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ case METHODID_CREATE_NOTIFICATION_CONFIG:
+ serviceImpl.createNotificationConfig(
+ (com.google.storage.v2.CreateNotificationConfigRequest) request,
+ (io.grpc.stub.StreamObserver)
+ responseObserver);
break;
- case METHODID_LIST_NOTIFICATIONS:
- serviceImpl.listNotifications(
- (com.google.storage.v2.ListNotificationsRequest) request,
- (io.grpc.stub.StreamObserver)
+ case METHODID_LIST_NOTIFICATION_CONFIGS:
+ serviceImpl.listNotificationConfigs(
+ (com.google.storage.v2.ListNotificationConfigsRequest) request,
+ (io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_COMPOSE_OBJECT:
@@ -3787,10 +3818,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getSetIamPolicyMethod())
.addMethod(getTestIamPermissionsMethod())
.addMethod(getUpdateBucketMethod())
- .addMethod(getDeleteNotificationMethod())
- .addMethod(getGetNotificationMethod())
- .addMethod(getCreateNotificationMethod())
- .addMethod(getListNotificationsMethod())
+ .addMethod(getDeleteNotificationConfigMethod())
+ .addMethod(getGetNotificationConfigMethod())
+ .addMethod(getCreateNotificationConfigMethod())
+ .addMethod(getListNotificationConfigsMethod())
.addMethod(getComposeObjectMethod())
.addMethod(getDeleteObjectMethod())
.addMethod(getCancelResumableWriteMethod())
diff --git a/proto-google-cloud-storage-v2/clirr-ignored-differences.xml b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml
index 41c35b7976..a46a701fe4 100644
--- a/proto-google-cloud-storage-v2/clirr-ignored-differences.xml
+++ b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml
@@ -14,4 +14,11 @@
* *ObjectChecksums*(*)
+
+
+ 8001
+ com/google/storage/v2/*Notification*
+
+
+
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java
similarity index 60%
rename from proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationRequest.java
rename to proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java
index 4d6480e7be..27c92fdb30 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationRequest.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java
@@ -22,29 +22,30 @@
*
*
*
- * Request message for CreateNotification.
+ * Request message for CreateNotificationConfig.
*
*
- * Protobuf type {@code google.storage.v2.CreateNotificationRequest}
+ * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest}
*/
-public final class CreateNotificationRequest extends com.google.protobuf.GeneratedMessageV3
+public final class CreateNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3
implements
- // @@protoc_insertion_point(message_implements:google.storage.v2.CreateNotificationRequest)
- CreateNotificationRequestOrBuilder {
+ // @@protoc_insertion_point(message_implements:google.storage.v2.CreateNotificationConfigRequest)
+ CreateNotificationConfigRequestOrBuilder {
private static final long serialVersionUID = 0L;
- // Use CreateNotificationRequest.newBuilder() to construct.
- private CreateNotificationRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ // Use CreateNotificationConfigRequest.newBuilder() to construct.
+ private CreateNotificationConfigRequest(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
- private CreateNotificationRequest() {
+ private CreateNotificationConfigRequest() {
parent_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new CreateNotificationRequest();
+ return new CreateNotificationConfigRequest();
}
@java.lang.Override
@@ -54,17 +55,17 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto
- .internal_static_google_storage_v2_CreateNotificationRequest_descriptor;
+ .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
- .internal_static_google_storage_v2_CreateNotificationRequest_fieldAccessorTable
+ .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.storage.v2.CreateNotificationRequest.class,
- com.google.storage.v2.CreateNotificationRequest.Builder.class);
+ com.google.storage.v2.CreateNotificationConfigRequest.class,
+ com.google.storage.v2.CreateNotificationConfigRequest.Builder.class);
}
public static final int PARENT_FIELD_NUMBER = 1;
@@ -75,7 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The bucket to which this notification belongs.
+ * Required. The bucket to which this NotificationConfig belongs.
*
*
*
@@ -100,7 +101,7 @@ public java.lang.String getParent() {
*
*
*
- * Required. The bucket to which this notification belongs.
+ * Required. The bucket to which this NotificationConfig belongs.
*
*
*
@@ -122,60 +123,60 @@ public com.google.protobuf.ByteString getParentBytes() {
}
}
- public static final int NOTIFICATION_FIELD_NUMBER = 2;
- private com.google.storage.v2.Notification notification_;
+ public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 2;
+ private com.google.storage.v2.NotificationConfig notificationConfig_;
/**
*
*
*
- * Required. Properties of the notification to be inserted.
+ * Required. Properties of the NotificationConfig to be inserted.
*
*
*
- * .google.storage.v2.Notification notification = 2 [(.google.api.field_behavior) = REQUIRED];
+ * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
- * @return Whether the notification field is set.
+ * @return Whether the notificationConfig field is set.
*/
@java.lang.Override
- public boolean hasNotification() {
- return notification_ != null;
+ public boolean hasNotificationConfig() {
+ return notificationConfig_ != null;
}
/**
*
*
*
- * Required. Properties of the notification to be inserted.
+ * Required. Properties of the NotificationConfig to be inserted.
*
*
*
- * .google.storage.v2.Notification notification = 2 [(.google.api.field_behavior) = REQUIRED];
+ * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
- * @return The notification.
+ * @return The notificationConfig.
*/
@java.lang.Override
- public com.google.storage.v2.Notification getNotification() {
- return notification_ == null
- ? com.google.storage.v2.Notification.getDefaultInstance()
- : notification_;
+ public com.google.storage.v2.NotificationConfig getNotificationConfig() {
+ return notificationConfig_ == null
+ ? com.google.storage.v2.NotificationConfig.getDefaultInstance()
+ : notificationConfig_;
}
/**
*
*
*
- * Required. Properties of the notification to be inserted.
+ * Required. Properties of the NotificationConfig to be inserted.
*
*
*
- * .google.storage.v2.Notification notification = 2 [(.google.api.field_behavior) = REQUIRED];
+ * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
- public com.google.storage.v2.NotificationOrBuilder getNotificationOrBuilder() {
- return notification_ == null
- ? com.google.storage.v2.Notification.getDefaultInstance()
- : notification_;
+ public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder() {
+ return notificationConfig_ == null
+ ? com.google.storage.v2.NotificationConfig.getDefaultInstance()
+ : notificationConfig_;
}
private byte memoizedIsInitialized = -1;
@@ -195,8 +196,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
- if (notification_ != null) {
- output.writeMessage(2, getNotification());
+ if (notificationConfig_ != null) {
+ output.writeMessage(2, getNotificationConfig());
}
getUnknownFields().writeTo(output);
}
@@ -210,8 +211,8 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
- if (notification_ != null) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotification());
+ if (notificationConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotificationConfig());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -223,16 +224,16 @@ public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
- if (!(obj instanceof com.google.storage.v2.CreateNotificationRequest)) {
+ if (!(obj instanceof com.google.storage.v2.CreateNotificationConfigRequest)) {
return super.equals(obj);
}
- com.google.storage.v2.CreateNotificationRequest other =
- (com.google.storage.v2.CreateNotificationRequest) obj;
+ com.google.storage.v2.CreateNotificationConfigRequest other =
+ (com.google.storage.v2.CreateNotificationConfigRequest) obj;
if (!getParent().equals(other.getParent())) return false;
- if (hasNotification() != other.hasNotification()) return false;
- if (hasNotification()) {
- if (!getNotification().equals(other.getNotification())) return false;
+ if (hasNotificationConfig() != other.hasNotificationConfig()) return false;
+ if (hasNotificationConfig()) {
+ if (!getNotificationConfig().equals(other.getNotificationConfig())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
@@ -247,80 +248,80 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PARENT_FIELD_NUMBER;
hash = (53 * hash) + getParent().hashCode();
- if (hasNotification()) {
- hash = (37 * hash) + NOTIFICATION_FIELD_NUMBER;
- hash = (53 * hash) + getNotification().hashCode();
+ if (hasNotificationConfig()) {
+ hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getNotificationConfig().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(byte[] data)
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
- public static com.google.storage.v2.CreateNotificationRequest parseDelimitedFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
- public static com.google.storage.v2.CreateNotificationRequest parseDelimitedFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- public static com.google.storage.v2.CreateNotificationRequest parseFrom(
+ public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -337,7 +338,8 @@ public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(com.google.storage.v2.CreateNotificationRequest prototype) {
+ public static Builder newBuilder(
+ com.google.storage.v2.CreateNotificationConfigRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@@ -355,31 +357,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * Request message for CreateNotification.
+ * Request message for CreateNotificationConfig.
*
*
- * Protobuf type {@code google.storage.v2.CreateNotificationRequest}
+ * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
- // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateNotificationRequest)
- com.google.storage.v2.CreateNotificationRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateNotificationConfigRequest)
+ com.google.storage.v2.CreateNotificationConfigRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto
- .internal_static_google_storage_v2_CreateNotificationRequest_descriptor;
+ .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
- .internal_static_google_storage_v2_CreateNotificationRequest_fieldAccessorTable
+ .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.storage.v2.CreateNotificationRequest.class,
- com.google.storage.v2.CreateNotificationRequest.Builder.class);
+ com.google.storage.v2.CreateNotificationConfigRequest.class,
+ com.google.storage.v2.CreateNotificationConfigRequest.Builder.class);
}
- // Construct using com.google.storage.v2.CreateNotificationRequest.newBuilder()
+ // Construct using com.google.storage.v2.CreateNotificationConfigRequest.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
@@ -391,10 +393,10 @@ public Builder clear() {
super.clear();
bitField0_ = 0;
parent_ = "";
- notification_ = null;
- if (notificationBuilder_ != null) {
- notificationBuilder_.dispose();
- notificationBuilder_ = null;
+ notificationConfig_ = null;
+ if (notificationConfigBuilder_ != null) {
+ notificationConfigBuilder_.dispose();
+ notificationConfigBuilder_ = null;
}
return this;
}
@@ -402,17 +404,17 @@ public Builder clear() {
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.storage.v2.StorageProto
- .internal_static_google_storage_v2_CreateNotificationRequest_descriptor;
+ .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor;
}
@java.lang.Override
- public com.google.storage.v2.CreateNotificationRequest getDefaultInstanceForType() {
- return com.google.storage.v2.CreateNotificationRequest.getDefaultInstance();
+ public com.google.storage.v2.CreateNotificationConfigRequest getDefaultInstanceForType() {
+ return com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance();
}
@java.lang.Override
- public com.google.storage.v2.CreateNotificationRequest build() {
- com.google.storage.v2.CreateNotificationRequest result = buildPartial();
+ public com.google.storage.v2.CreateNotificationConfigRequest build() {
+ com.google.storage.v2.CreateNotificationConfigRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -420,9 +422,9 @@ public com.google.storage.v2.CreateNotificationRequest build() {
}
@java.lang.Override
- public com.google.storage.v2.CreateNotificationRequest buildPartial() {
- com.google.storage.v2.CreateNotificationRequest result =
- new com.google.storage.v2.CreateNotificationRequest(this);
+ public com.google.storage.v2.CreateNotificationConfigRequest buildPartial() {
+ com.google.storage.v2.CreateNotificationConfigRequest result =
+ new com.google.storage.v2.CreateNotificationConfigRequest(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
@@ -430,14 +432,16 @@ public com.google.storage.v2.CreateNotificationRequest buildPartial() {
return result;
}
- private void buildPartial0(com.google.storage.v2.CreateNotificationRequest result) {
+ private void buildPartial0(com.google.storage.v2.CreateNotificationConfigRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.parent_ = parent_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
- result.notification_ =
- notificationBuilder_ == null ? notification_ : notificationBuilder_.build();
+ result.notificationConfig_ =
+ notificationConfigBuilder_ == null
+ ? notificationConfig_
+ : notificationConfigBuilder_.build();
}
}
@@ -476,24 +480,24 @@ public Builder addRepeatedField(
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.storage.v2.CreateNotificationRequest) {
- return mergeFrom((com.google.storage.v2.CreateNotificationRequest) other);
+ if (other instanceof com.google.storage.v2.CreateNotificationConfigRequest) {
+ return mergeFrom((com.google.storage.v2.CreateNotificationConfigRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(com.google.storage.v2.CreateNotificationRequest other) {
- if (other == com.google.storage.v2.CreateNotificationRequest.getDefaultInstance())
+ public Builder mergeFrom(com.google.storage.v2.CreateNotificationConfigRequest other) {
+ if (other == com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance())
return this;
if (!other.getParent().isEmpty()) {
parent_ = other.parent_;
bitField0_ |= 0x00000001;
onChanged();
}
- if (other.hasNotification()) {
- mergeNotification(other.getNotification());
+ if (other.hasNotificationConfig()) {
+ mergeNotificationConfig(other.getNotificationConfig());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -529,7 +533,8 @@ public Builder mergeFrom(
} // case 10
case 18:
{
- input.readMessage(getNotificationFieldBuilder().getBuilder(), extensionRegistry);
+ input.readMessage(
+ getNotificationConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
@@ -557,7 +562,7 @@ public Builder mergeFrom(
*
*
*