KEMBAR78
docs: Adding PubSub Notification Samples by sydney-munro · Pull Request #1317 · googleapis/java-storage · GitHub
Skip to content

Conversation

@sydney-munro
Copy link
Contributor

Fixes internal issues:
storage_print_pubsub_bucket_notification b/219957979
storage_delete_bucket_notification b/219958287
storage_list_bucket_notifications b/219958499
storage_create_bucket_notifications b/219958206

If you write sample code, please follow the samples format.

@sydney-munro sydney-munro requested review from a team as code owners March 28, 2022 23:09
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Mar 28, 2022
@snippet-bot
Copy link

snippet-bot bot commented Mar 28, 2022

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • samples/install-without-bom/pom.xml
  • samples/snapshot/pom.xml
  • samples/snippets/pom.xml

@sydney-munro sydney-munro added kokoro:force-run Add this label to force Kokoro to re-run the tests. samples Issues that are directly related to samples. labels Mar 28, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 28, 2022
@sydney-munro sydney-munro changed the title Adding PubSub Notification Samples docs: Adding PubSub Notification Samples Mar 28, 2022
@sydney-munro sydney-munro added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 28, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 28, 2022
@sydney-munro sydney-munro requested a review from frankyn March 30, 2022 21:19
Storage storage = StorageOptions.newBuilder().build().getService();
NotificationInfo notificationInfo =
NotificationInfo.newBuilder(topicName)
.setEtag(etag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etag should be set by the service and shouldn't be set by a user directly unless performing an update request.

I would most likely leave this value out.

NotificationInfo.newBuilder(topicName)
.setEtag(etag)
.setCustomAttributes(customAttributes)
.setSelfLink(selfLink)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selfLink() should be set by the service; this field setter shouldn't need to be public.

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @sydney-munro!

@sydney-munro sydney-munro merged commit fa9920d into main Mar 31, 2022
@sydney-munro sydney-munro deleted the notifsamples branch March 31, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants