From 24b794eee3182ed16d6bb21448c66d42f9214c20 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:44:17 +0000 Subject: [PATCH 01/28] chore: release 1.114.8-SNAPSHOT (#883) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-pubsub-bom/pom.xml | 8 ++++---- google-cloud-pubsub/pom.xml | 4 ++-- grpc-google-cloud-pubsub-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-pubsub-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 927b05890..3b82e26dc 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.114.7 + 1.114.8-SNAPSHOT pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.114.7 + 1.114.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index f1a893739..a0b0644ff 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.114.7 + 1.114.8-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.114.7 + 1.114.8-SNAPSHOT google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 742f01e38..e61f7eb21 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.114.7 + 1.114.8-SNAPSHOT diff --git a/pom.xml b/pom.xml index a6747916a..2d39816b2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.114.7 + 1.114.8-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.114.7 + 1.114.8-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 86dd4f742..0a92c26a4 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.7 + 1.96.8-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.114.7 + 1.114.8-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4a7e01da1..43a6995d9 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.114.7 + 1.114.8-SNAPSHOT diff --git a/versions.txt b/versions.txt index c6c187266..fab6b0810 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.114.7:1.114.7 -grpc-google-cloud-pubsub-v1:1.96.7:1.96.7 -proto-google-cloud-pubsub-v1:1.96.7:1.96.7 +google-cloud-pubsub:1.114.7:1.114.8-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT +proto-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT From 7530449ea9fc73b9bc42afdb7baba5172b05354e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 20 Oct 2021 20:23:17 +0200 Subject: [PATCH 02/28] chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.114.7 (#884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.114.7 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90ca46da3..f8b409080 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.114.6 + 1.114.7 ``` @@ -58,13 +58,13 @@ implementation 'com.google.cloud:google-cloud-pubsub' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.114.6' +implementation 'com.google.cloud:google-cloud-pubsub:1.114.7' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.114.6" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.114.7" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d377c06f1..37a995c7d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-pubsub - 1.114.6 + 1.114.7 From ed3ae2fb0a0c72073f6bae5dc4111424740fd883 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:11:17 +0000 Subject: [PATCH 03/28] fix(java): java 17 dependency arguments (#1266) (#888) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/dependencies.sh | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dc53bbb57..0df65ebe9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7e..d7476cfe9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) From e139eedacf0df497bbc97bde2cec94c79f2a0cab Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Oct 2021 21:46:32 +0200 Subject: [PATCH 04/28] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.0 (#887) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.1.0` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​120-httpswwwgithubcomgoogleapisjava-shared-configcomparev110v120-2021-10-21) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.1.0...v1.2.0) ##### Features - Introduce Native Image testing build script changes ([#​1240](https://www.togithub.com/googleapis/java-shared-config/issues/1240)) ([#​334](https://www.togithub.com/googleapis/java-shared-config/issues/334)) ([4643cf1](https://www.github.com/googleapis/java-shared-config/commit/4643cf15be0b37fa8fa905d544d438cda7ef2ecd)) ##### Bug Fixes - **java:** downgrade native maven plugin version ([#​335](https://www.togithub.com/googleapis/java-shared-config/issues/335)) ([5834284](https://www.github.com/googleapis/java-shared-config/commit/5834284176fb34713d10082ce04f3b6abba85ad8))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- google-cloud-pubsub-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 3b82e26dc..643e49c69 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 Google Cloud pubsub BOM diff --git a/pom.xml b/pom.xml index 2d39816b2..581df79f9 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 From 3bfb3ad9b7b4ba0e3fd2aa9a817824144d8643ea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 18:16:45 +0200 Subject: [PATCH 05/28] chore(deps): update dependency com.google.cloud:libraries-bom to v24 (#893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `23.1.0` -> `24.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/compatibility-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/confidence-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- README.md | 4 ++-- samples/snippets/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f8b409080..16cfc2c8d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import @@ -51,7 +51,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:23.1.0') +implementation platform('com.google.cloud:libraries-bom:24.0.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 34d38f581..92c54ebfb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import From b7ba1a871c4c26f50d87b41c2627b6e6aef63b3c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 18:24:17 +0200 Subject: [PATCH 06/28] deps: update dependency org.apache.avro:avro to v1.11.0 (#894) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency org.apache.avro:avro to v1.11.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 37a995c7d..af52ee0ee 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -51,7 +51,7 @@ org.apache.avro avro - 1.10.2 + 1.11.0 compile diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 43a6995d9..33cf7dbcc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -50,7 +50,7 @@ org.apache.avro avro - 1.10.2 + 1.11.0 compile diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 92c54ebfb..eb34b3e1a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -62,7 +62,7 @@ org.apache.avro avro - 1.10.2 + 1.11.0 org.xerial.snappy From 51b01e254a4be87a8a779fbc5da697c70920d82f Mon Sep 17 00:00:00 2001 From: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com> Date: Wed, 27 Oct 2021 14:01:47 -0400 Subject: [PATCH 07/28] feat: creating java backport (#895) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 69daeb037..491c2586c 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -9,3 +9,7 @@ branches: handleGHRelease: true releaseType: java-yoshi branch: java7 + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.114.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index dd7558686..f1bed551b 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -50,6 +50,22 @@ branchProtectionRules: - Kokoro - Against Pub/Sub Lite samples - cla/google - OwlBot Post Processor + - pattern: 1.114.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (8) + - dependencies (11) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - Kokoro - Against Pub/Sub Lite samples + - cla/google + - OwlBot Post Processor permissionRules: - team: yoshi-admins permission: admin From 73af56e74417b9e94b7d0e441098f264dd9406d5 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Wed, 27 Oct 2021 12:18:23 -0700 Subject: [PATCH 08/28] chore: update repo-metadata.json client_documentation link (#874) --- .repo-metadata.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 93da177cf..412b27083 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Cloud Pub/Sub", "api_reference": "https://cloud.google.com/pubsub/", "product_documentation": "https://cloud.google.com/pubsub/docs/", - "client_documentation": "https://googleapis.dev/java/google-cloud-pubsub/latest/index.html", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history", "api_description": "is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a topic and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications.", "issue_tracker": "https://issuetracker.google.com/savedsearches/559741", "release_level": "ga", diff --git a/README.md b/README.md index 16cfc2c8d..3973d4d0b 100644 --- a/README.md +++ b/README.md @@ -376,7 +376,7 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/pubsub/docs/ -[javadocs]: https://googleapis.dev/java/google-cloud-pubsub/latest/index.html +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.svg [kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.html [kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.svg From 8733144854aaebfec0cd5f03ab14d820c6d22c0e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Nov 2021 18:58:12 +0100 Subject: [PATCH 09/28] deps: update dependency com.google.errorprone:error_prone_annotations to v2.10.0 (#901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://togithub.com/google/error-prone)) | `2.9.0` -> `2.10.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/compatibility-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/confidence-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/error-prone ### [`v2.10.0`](https://togithub.com/google/error-prone/releases/v2.10.0) [Compare Source](https://togithub.com/google/error-prone/compare/v2.9.0...v2.10.0) New checks - [`AlwaysThrows`](http://errorprone.info/bugpattern/AlwaysThrows) - [`StackTraceElementGetClass`](http://errorprone.info/bugpattern/StackTraceElementGetClass) - [`BareDotMetacharacter`](http://errorprone.info/bugpattern/BareDotMetacharacter) - [`DistinctVarargsChecker`](http://errorprone.info/bugpattern/DistinctVarargsChecker) - [`MalformedInlineTag`](http://errorprone.info/bugpattern/MalformedInlineTag) - [`MemoizeConstantVisitorStateLookups`](http://errorprone.info/bugpattern/MemoizeConstantVisitorStateLookups) - [`UnicodeEscape`](http://errorprone.info/bugpattern/UnicodeEscape) - [`FieldMissingNullable`](http://errorprone.info/bugpattern/FieldMissingNullable) - [`Java8ApiChecker`](http://errorprone.info/bugpattern/Java8ApiChecker) - [`ParameterMissingNullable`](http://errorprone.info/bugpattern/ParameterMissingNullable) - [`TooManyParameters`](http://errorprone.info/bugpattern/TooManyParameters) - [`TryWithResourcesVariable`](http://errorprone.info/bugpattern/TryWithResourcesVariable) - [`UnnecessaryFinal`](http://errorprone.info/bugpattern/UnnecessaryFinal) - [`VoidMissingNullable`](http://errorprone.info/bugpattern/VoidMissingNullable) Fixed issues: [#​2616](https://togithub.com/google/error-prone/issues/2616), [#​2629](https://togithub.com/google/error-prone/issues/2629) **Full Changelog**: https://github.com/google/error-prone/compare/v2.9.0...v2.10.0
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 581df79f9..84e9716d2 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ com.google.errorprone error_prone_annotations - 2.9.0 + 2.10.0 From 98dacd772f27357f040fc7a7a27951aab12e2961 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 6 Nov 2021 00:36:19 +0000 Subject: [PATCH 10/28] Update ci.yaml (#1275) (#902) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0df65ebe9..994dd04bf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 + digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d7234..93b337c62 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,13 +8,11 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +25,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +40,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,9 +50,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -73,9 +62,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu From 477d44cce5579a46c7ce606d8d64813ed736d1a4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 21:50:26 +0000 Subject: [PATCH 11/28] chore: cleanup cloud RAD generation (#1269) (#904) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc11.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 994dd04bf..325daaa4b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c + digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index f50aacee6..24fc55e5a 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-cloud-pubsub export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -mvn clean site -B -q -P docFX - -# copy README to docfx-yml dir and rename index.md -cp README.md target/docfx-yml/index.md -# copy CHANGELOG to docfx-yml dir and rename history.md +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml From 3adce673cb476299a9e2a1702b20a2cd6d912d8a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 14:40:31 +0000 Subject: [PATCH 12/28] chore: update jre to 11 for linter (#1278) (#906) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 325daaa4b..886d09496 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa + digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93b337c62..05de1f60d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: From fa6711d277786cc6acf4b39fd2033cd6a5787567 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Nov 2021 18:05:38 +0100 Subject: [PATCH 13/28] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.1 (#905) --- google-cloud-pubsub-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 643e49c69..dd3d19b91 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 Google Cloud pubsub BOM diff --git a/pom.xml b/pom.xml index 84e9716d2..cc31cca47 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 From d0a02a9f320b254a3e4ef60bfff47a6bb3a2427f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Nov 2021 18:06:11 +0100 Subject: [PATCH 14/28] deps: update dependency com.google.protobuf:protobuf-java-util to v3.19.1 (#885) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index af52ee0ee..81e95fb67 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -75,7 +75,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 33cf7dbcc..115b697e6 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -61,7 +61,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index eb34b3e1a..460707369 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -72,7 +72,7 @@ com.google.protobuf protobuf-java-util - 3.18.1 + 3.19.1 From 5d3830f570c043d48ee723e2eb36a2a1494e2f4c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 20:30:17 +0000 Subject: [PATCH 15/28] chore: update minimum java version to java 8 (#1281) (#909) --- .github/.OwlBot.lock.yaml | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 886d09496..5d788be0b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 + digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0 diff --git a/README.md b/README.md index 3973d4d0b..3d74044e6 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Supported Java Versions -Java 7 or above is required for using this client. +Java 8 or above is required for using this client. Google's Java client libraries, [Google Cloud Client Libraries][cloudlibs] @@ -367,7 +367,6 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] From ec97e93ae53666d5c5cad71821f12cefa4fbaf2e Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Fri, 12 Nov 2021 17:39:26 -0500 Subject: [PATCH 16/28] chore: handle GH releases in 1.111.0-sp (#921) deps: update gson to 2.8.9 --- .github/release-please.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 491c2586c..654fffe76 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -4,6 +4,7 @@ releaseType: java-yoshi branches: - releaseType: java-lts bumpMinorPreMajor: true + handleGHRelease: true branch: 1.111.0-sp - bumpMinorPreMajor: true handleGHRelease: true From 4adf335b78ce6b13af22c3c3a64c4ea1a24f05cd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Nov 2021 17:06:17 +0100 Subject: [PATCH 17/28] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 (#919) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.4.0` -> `2.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​250-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare240v250-2021-11-12) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.4.0...v2.5.0) ##### Features - next release from main branch is 2.5.0 ([#​510](https://www.togithub.com/googleapis/java-shared-dependencies/issues/510)) ([ca9eb8a](https://www.github.com/googleapis/java-shared-dependencies/commit/ca9eb8a40ae81d69de0d82d9499ef21b0136ae49)) ##### Bug Fixes - dependencies.sh to work with Java 17 ([#​516](https://www.togithub.com/googleapis/java-shared-dependencies/issues/516)) ([8422c1d](https://www.github.com/googleapis/java-shared-dependencies/commit/8422c1d7e9ef479f348e63c530789050b5235426)) ##### Dependencies - update dependency com.google.api:api-common to v2.1.0 ([#​508](https://www.togithub.com/googleapis/java-shared-dependencies/issues/508)) ([ae32d16](https://www.github.com/googleapis/java-shared-dependencies/commit/ae32d1689c78fc1469206c8c0df0ebaca59edd2c)) - update dependency com.google.auth:google-auth-library-bom to v1.2.2 ([#​506](https://www.togithub.com/googleapis/java-shared-dependencies/issues/506)) ([b9a8209](https://www.github.com/googleapis/java-shared-dependencies/commit/b9a82098655f29e858bd0c7a9b1049a379e5062a)) - update dependency com.google.auth:google-auth-library-bom to v1.3.0 ([#​524](https://www.togithub.com/googleapis/java-shared-dependencies/issues/524)) ([fc07879](https://www.github.com/googleapis/java-shared-dependencies/commit/fc07879fa6531e39b21977fe77abc19354a1fd33)) - update dependency com.google.code.gson:gson to v2.8.9 ([#​509](https://www.togithub.com/googleapis/java-shared-dependencies/issues/509)) ([bece99b](https://www.github.com/googleapis/java-shared-dependencies/commit/bece99bb3e0365e60e7376ba18d046ab6436a235)) - update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#​512](https://www.togithub.com/googleapis/java-shared-dependencies/issues/512)) ([c281f13](https://www.github.com/googleapis/java-shared-dependencies/commit/c281f137525e2111e97349657be578ed1fc832f2)) - update dependency com.google.protobuf:protobuf-bom to v3.19.1 ([#​505](https://www.togithub.com/googleapis/java-shared-dependencies/issues/505)) ([94cde96](https://www.github.com/googleapis/java-shared-dependencies/commit/94cde96069900f9f8c2ff9a522671d03b26828bd)) - update dependency io.grpc:grpc-bom to v1.42.1 ([#​513](https://www.togithub.com/googleapis/java-shared-dependencies/issues/513)) ([0d2b774](https://www.github.com/googleapis/java-shared-dependencies/commit/0d2b774287a132821cc6fe2789140086bc48d525)) - update dependency org.checkerframework:checker-qual to v3.19.0 ([#​501](https://www.togithub.com/googleapis/java-shared-dependencies/issues/501)) ([2b3e0b5](https://www.github.com/googleapis/java-shared-dependencies/commit/2b3e0b5ddc3a645b20a837f3123394f1ca114f08)) - update dependency org.threeten:threetenbp to v1.5.2 ([#​514](https://www.togithub.com/googleapis/java-shared-dependencies/issues/514)) ([4885f40](https://www.github.com/googleapis/java-shared-dependencies/commit/4885f402e2c70435cd10d4f1b893df9873808c56)) - update gax.version to v2.7.0 ([#​515](https://www.togithub.com/googleapis/java-shared-dependencies/issues/515)) ([567e728](https://www.github.com/googleapis/java-shared-dependencies/commit/567e728b0e59233a04e2d04183e6a0c36cca2437)) - update google.core.version to v2.3.0 ([#​530](https://www.togithub.com/googleapis/java-shared-dependencies/issues/530)) ([78e87e9](https://www.github.com/googleapis/java-shared-dependencies/commit/78e87e96befab34dc4a494e752aeb473cd14a156)) - update iam.version to v1.1.7 ([#​504](https://www.togithub.com/googleapis/java-shared-dependencies/issues/504)) ([63dd583](https://www.github.com/googleapis/java-shared-dependencies/commit/63dd583c80f35b01a66fd1908d41467468c66436))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc31cca47..bf06564c0 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.4.0 + 2.5.0 pom import From adfd4562a8041d71af65cd98cf1d17b881e35dd3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Nov 2021 17:06:32 +0100 Subject: [PATCH 18/28] deps: update dependency com.google.cloud:google-cloud-core to v2.3.0 (#913) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.2.0` -> `2.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.0/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.0/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-core ### [`v2.3.0`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#​230-httpswwwgithubcomgoogleapisjava-corecomparev220v230-2021-11-11) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.2.0...v2.3.0) ##### Features - next release from main branch is 2.3.0 ([#​602](https://www.togithub.com/googleapis/java-core/issues/602)) ([34fa5f1](https://www.github.com/googleapis/java-core/commit/34fa5f1e750629d4431d5f97eb8b09ee65ebc016)) ##### Bug Fixes - **java:** java 17 dependency arguments ([#​1266](https://www.togithub.com/googleapis/java-core/issues/1266)) ([#​612](https://www.togithub.com/googleapis/java-core/issues/612)) ([5be3eff](https://www.github.com/googleapis/java-core/commit/5be3eff4041ca39d513979b948afe99f27bb1d20)) ##### Dependencies - update dependency com.google.api:api-common to v2.1.0 ([#​613](https://www.togithub.com/googleapis/java-core/issues/613)) ([62d6ab8](https://www.github.com/googleapis/java-core/commit/62d6ab8b5a7c5edb4482d7afda5b87f4832226ca)) - update dependency com.google.api:gax-bom to v2.7.0 ([#​626](https://www.togithub.com/googleapis/java-core/issues/626)) ([4a1e965](https://www.github.com/googleapis/java-core/commit/4a1e96551e16a5abc5d8f71f9e096a284fc59528)) - update dependency com.google.api.grpc:proto-google-iam-v1 to v1.1.7 ([#​604](https://www.togithub.com/googleapis/java-core/issues/604)) ([0d36d59](https://www.github.com/googleapis/java-core/commit/0d36d59e4ff8817ba5984579188bfc6d7745348d)) - update dependency com.google.auth:google-auth-library-bom to v1.2.2 ([#​610](https://www.togithub.com/googleapis/java-core/issues/610)) ([c5e33d8](https://www.github.com/googleapis/java-core/commit/c5e33d87d211c22a93ea2e0de1776e7f2fbf6ef7)) - update dependency com.google.auth:google-auth-library-bom to v1.3.0 ([#​627](https://www.togithub.com/googleapis/java-core/issues/627)) ([f4403b2](https://www.github.com/googleapis/java-core/commit/f4403b2af856cc6ce45e2aab277d7e78baa6ecfe)) - update dependency com.google.code.gson:gson to v2.8.9 ([#​615](https://www.togithub.com/googleapis/java-core/issues/615)) ([ec0e387](https://www.github.com/googleapis/java-core/commit/ec0e387d3c96467218406ef4c5da5e59a11e8b7a)) - update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#​618](https://www.togithub.com/googleapis/java-core/issues/618)) ([21139a8](https://www.github.com/googleapis/java-core/commit/21139a83821b12b5312e470c61b45ca76a0b921a)) - update dependency com.google.protobuf:protobuf-bom to v3.19.1 ([#​609](https://www.togithub.com/googleapis/java-core/issues/609)) ([28e6333](https://www.github.com/googleapis/java-core/commit/28e6333080fbe10ad8ecdfeef12d80af204f71fd)) - update dependency io.grpc:grpc-bom to v1.42.0 ([#​619](https://www.togithub.com/googleapis/java-core/issues/619)) ([da4cbd5](https://www.github.com/googleapis/java-core/commit/da4cbd5ccc54a81f89635435a2045cfa0de8d722)) - update dependency org.threeten:threetenbp to v1.5.2 ([#​624](https://www.togithub.com/googleapis/java-core/issues/624)) ([91eec9d](https://www.github.com/googleapis/java-core/commit/91eec9d83285e10cd9ecf3e75cb99b9a9d40cb89))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 81e95fb67..9f9939252 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.2.0 + 2.3.0 tests
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 115b697e6..eb42c9c78 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.2.0 + 2.3.0 tests
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 460707369..4e8829ecc 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-core - 2.2.0 + 2.3.0 tests From 9fcc9965284f6a57dc79f31eb96a2e430cef72e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 19:52:42 +0100 Subject: [PATCH 19/28] deps: update dependency com.google.cloud:google-cloud-core to v2.3.1 (#927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.3.0` -> `2.3.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.1/compatibility-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.1/confidence-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-core ### [`v2.3.1`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#​231-httpswwwgithubcomgoogleapisjava-corecomparev230v231-2021-11-15) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.3.0...v2.3.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 9f9939252..dd12c7f48 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.3.0 + 2.3.1 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index eb42c9c78..e85f5a995 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.3.0 + 2.3.1 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4e8829ecc..e39780f6f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-core - 2.3.0 + 2.3.1 tests From 77aa8443d7387adb59e85956f03995c432b5c4a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 20:00:37 +0100 Subject: [PATCH 20/28] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.2 (#928) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.1` -> `1.2.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/compatibility-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/confidence-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.2`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​122-httpswwwgithubcomgoogleapisjava-shared-configcomparev121v122-2021-11-16) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.1...v1.2.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- google-cloud-pubsub-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index dd3d19b91..2519a0eb6 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 Google Cloud pubsub BOM diff --git a/pom.xml b/pom.xml index bf06564c0..3205a02aa 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 From 5c5e2098da1b713c894c4ca12c5fe641993a4ef2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 19:04:28 -0500 Subject: [PATCH 21/28] chore: update Java and Python dependencies (#907) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: fix build after breaking changes * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: fix sample integration tests * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Chanseok Oh --- .readme-partials.yaml | 20 +-- README.md | 20 +-- .../clirr-ignored-differences.xml | 15 ++ .../cloud/pubsub/v1/SchemaServiceClient.java | 4 +- .../pubsub/v1/SubscriptionAdminClient.java | 166 +++++++++--------- .../cloud/pubsub/v1/TopicAdminClient.java | 63 +------ .../google/cloud/pubsub/v1/package-info.java | 2 +- .../pubsub/v1/stub/GrpcPublisherStub.java | 2 +- .../google/cloud/pubsub/it/ITPubSubTest.java | 16 +- .../v1/SubscriptionAdminClientTest.java | 118 ++++++------- .../cloud/pubsub/v1/TopicAdminClientTest.java | 6 +- .../com/google/pubsub/v1/PublisherGrpc.java | 1 + .../google/pubsub/v1/SchemaServiceGrpc.java | 1 + .../com/google/pubsub/v1/SubscriberGrpc.java | 1 + owlbot.py | 2 +- .../google/pubsub/v1/AcknowledgeRequest.java | 4 +- .../google/pubsub/v1/CreateSchemaRequest.java | 8 +- .../pubsub/v1/CreateSnapshotRequest.java | 8 +- .../google/pubsub/v1/DeadLetterPolicy.java | 4 +- .../google/pubsub/v1/DeleteSchemaRequest.java | 4 +- .../pubsub/v1/DeleteSnapshotRequest.java | 4 +- .../pubsub/v1/DeleteSubscriptionRequest.java | 4 +- .../google/pubsub/v1/DeleteTopicRequest.java | 4 +- .../pubsub/v1/DetachSubscriptionRequest.java | 4 +- .../google/pubsub/v1/GetSchemaRequest.java | 4 +- .../google/pubsub/v1/GetSnapshotRequest.java | 4 +- .../pubsub/v1/GetSubscriptionRequest.java | 4 +- .../com/google/pubsub/v1/GetTopicRequest.java | 4 +- .../google/pubsub/v1/ListSchemasRequest.java | 8 +- .../google/pubsub/v1/ListSchemasResponse.java | 4 +- .../pubsub/v1/ListSnapshotsRequest.java | 8 +- .../pubsub/v1/ListSnapshotsResponse.java | 4 +- .../pubsub/v1/ListSubscriptionsRequest.java | 8 +- .../pubsub/v1/ListSubscriptionsResponse.java | 4 +- .../pubsub/v1/ListTopicSnapshotsRequest.java | 8 +- .../pubsub/v1/ListTopicSnapshotsResponse.java | 4 +- .../v1/ListTopicSubscriptionsRequest.java | 8 +- .../v1/ListTopicSubscriptionsResponse.java | 4 +- .../google/pubsub/v1/ListTopicsRequest.java | 8 +- .../google/pubsub/v1/ListTopicsResponse.java | 4 +- .../pubsub/v1/ModifyAckDeadlineRequest.java | 4 +- .../pubsub/v1/ModifyPushConfigRequest.java | 4 +- .../com/google/pubsub/v1/PublishRequest.java | 4 +- .../com/google/pubsub/v1/PubsubMessage.java | 8 +- .../com/google/pubsub/v1/PullRequest.java | 4 +- .../java/com/google/pubsub/v1/PushConfig.java | 12 +- .../com/google/pubsub/v1/ReceivedMessage.java | 4 +- .../java/com/google/pubsub/v1/Schema.java | 8 +- .../com/google/pubsub/v1/SchemaSettings.java | 4 +- .../com/google/pubsub/v1/SeekRequest.java | 4 +- .../java/com/google/pubsub/v1/Snapshot.java | 8 +- .../pubsub/v1/StreamingPullRequest.java | 8 +- .../com/google/pubsub/v1/Subscription.java | 12 +- .../main/java/com/google/pubsub/v1/Topic.java | 8 +- .../pubsub/v1/ValidateMessageRequest.java | 4 +- .../pubsub/v1/ValidateSchemaRequest.java | 4 +- .../pubsub/CreatePullSubscriptionExample.java | 5 +- .../pubsub/CreatePushSubscriptionExample.java | 5 +- .../pubsub/DeleteSubscriptionExample.java | 5 +- .../pubsub/DetachSubscriptionExample.java | 5 +- .../pubsub/UpdateDeadLetterPolicyExample.java | 5 +- .../UpdatePushConfigurationExample.java | 5 +- .../src/test/java/pubsub/AdminIT.java | 18 +- .../test/java/pubsub/DeadLetterQueueIT.java | 18 +- 64 files changed, 338 insertions(+), 397 deletions(-) create mode 100644 google-cloud-pubsub/clirr-ignored-differences.xml diff --git a/.readme-partials.yaml b/.readme-partials.yaml index c68686327..640d3b70b 100644 --- a/.readme-partials.yaml +++ b/.readme-partials.yaml @@ -6,12 +6,12 @@ custom_content: | ```java import com.google.cloud.pubsub.v1.TopicAdminClient; - import com.google.pubsub.v1.ProjectTopicName; + import com.google.pubsub.v1.TopicName; ``` Then, to create the topic, use the following code: ```java - ProjectTopicName topic = ProjectTopicName.of("test-project", "test-topic"); + TopicName topic = TopicName.of("test-project", "test-topic"); try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.createTopic(topic); } @@ -65,14 +65,14 @@ custom_content: | ```java import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.pubsub.v1.PushConfig; - import com.google.pubsub.v1.ProjectSubscriptionName; - import com.google.pubsub.v1.ProjectTopicName; + import com.google.pubsub.v1.SubscriptionName; + import com.google.pubsub.v1.TopicName; ``` Then, to create the subscription, use the following code: ```java - ProjectTopicName topic = ProjectTopicName.of("test-project", "test-topic"); - ProjectSubscriptionName subscription = ProjectSubscriptionName.of("test-project", "test-subscription"); + TopicName topic = TopicName.of("test-project", "test-topic"); + SubscriptionName subscription = SubscriptionName.of("test-project", "test-subscription"); try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { subscriptionAdminClient.createSubscription(subscription, topic, PushConfig.getDefaultInstance(), 0); @@ -90,13 +90,13 @@ custom_content: | import com.google.cloud.pubsub.v1.Subscriber; import com.google.common.util.concurrent.MoreExecutors; import com.google.pubsub.v1.PubsubMessage; - import com.google.pubsub.v1.ProjectSubscriptionName; - import com.google.pubsub.v1.ProjectTopicName; + import com.google.pubsub.v1.SubscriptionName; + import com.google.pubsub.v1.TopicName; ``` Then, to pull messages asynchronously, use the following code: ```java - ProjectSubscriptionName subscription = ProjectSubscriptionName.of("test-project", "test-subscription"); + SubscriptionName subscription = SubscriptionName.of("test-project", "test-subscription"); MessageReceiver receiver = new MessageReceiver() { @@ -109,7 +109,7 @@ custom_content: | Subscriber subscriber = null; try { - subscriber = Subscriber.newBuilder(subscription, receiver).build(); + subscriber = Subscriber.newBuilder(subscription.toString(), receiver).build(); subscriber.addListener( new Subscriber.Listener() { @Override diff --git a/README.md b/README.md index 3d74044e6..e56239dcd 100644 --- a/README.md +++ b/README.md @@ -106,12 +106,12 @@ publishers. Add the following imports at the top of your file: ```java import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.TopicName; ``` Then, to create the topic, use the following code: ```java -ProjectTopicName topic = ProjectTopicName.of("test-project", "test-topic"); +TopicName topic = TopicName.of("test-project", "test-topic"); try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.createTopic(topic); } @@ -165,14 +165,14 @@ single, specific topic. Add the following imports at the top of your file: ```java import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.pubsub.v1.PushConfig; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.SubscriptionName; +import com.google.pubsub.v1.TopicName; ``` Then, to create the subscription, use the following code: ```java -ProjectTopicName topic = ProjectTopicName.of("test-project", "test-topic"); -ProjectSubscriptionName subscription = ProjectSubscriptionName.of("test-project", "test-subscription"); +TopicName topic = TopicName.of("test-project", "test-topic"); +SubscriptionName subscription = SubscriptionName.of("test-project", "test-subscription"); try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { subscriptionAdminClient.createSubscription(subscription, topic, PushConfig.getDefaultInstance(), 0); @@ -190,13 +190,13 @@ import com.google.cloud.pubsub.v1.MessageReceiver; import com.google.cloud.pubsub.v1.Subscriber; import com.google.common.util.concurrent.MoreExecutors; import com.google.pubsub.v1.PubsubMessage; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.SubscriptionName; +import com.google.pubsub.v1.TopicName; ``` Then, to pull messages asynchronously, use the following code: ```java -ProjectSubscriptionName subscription = ProjectSubscriptionName.of("test-project", "test-subscription"); +SubscriptionName subscription = SubscriptionName.of("test-project", "test-subscription"); MessageReceiver receiver = new MessageReceiver() { @@ -209,7 +209,7 @@ MessageReceiver receiver = Subscriber subscriber = null; try { - subscriber = Subscriber.newBuilder(subscription, receiver).build(); + subscriber = Subscriber.newBuilder(subscription.toString(), receiver).build(); subscriber.addListener( new Subscriber.Listener() { @Override diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml new file mode 100644 index 000000000..95c46b0f0 --- /dev/null +++ b/google-cloud-pubsub/clirr-ignored-differences.xml @@ -0,0 +1,15 @@ + + + + + 7005 + com/google/cloud/pubsub/v1/SubscriptionAdminClient + * + * + + + 7002 + com/google/cloud/pubsub/v1/TopicAdminClient$ListTopicSubscriptions* + java.lang.Iterable *AsProjectSubscriptionName() + + diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java index e65f17783..562debea0 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -473,7 +473,7 @@ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = schemaServiceClient.listSchemasPagedCallable().futureCall(request); + * ApiFuture future = schemaServiceClient.listSchemasPagedCallable().futureCall(request); * // Do something. * for (Schema element : future.get().iterateAll()) { * // doThingsWith(element); @@ -503,7 +503,7 @@ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { * .build(); * while (true) { * ListSchemasResponse response = schemaServiceClient.listSchemasCallable().call(request); - * for (Schema element : response.getSchemasList()) { + * for (Schema element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 6d1c6950a..eb837a289 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -48,8 +48,6 @@ import com.google.pubsub.v1.ModifyAckDeadlineRequest; import com.google.pubsub.v1.ModifyPushConfigRequest; import com.google.pubsub.v1.ProjectName; -import com.google.pubsub.v1.ProjectSnapshotName; -import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PullRequest; import com.google.pubsub.v1.PullResponse; @@ -57,9 +55,11 @@ import com.google.pubsub.v1.SeekRequest; import com.google.pubsub.v1.SeekResponse; import com.google.pubsub.v1.Snapshot; +import com.google.pubsub.v1.SnapshotName; import com.google.pubsub.v1.StreamingPullRequest; import com.google.pubsub.v1.StreamingPullResponse; import com.google.pubsub.v1.Subscription; +import com.google.pubsub.v1.SubscriptionName; import com.google.pubsub.v1.TopicName; import com.google.pubsub.v1.UpdateSnapshotRequest; import com.google.pubsub.v1.UpdateSubscriptionRequest; @@ -79,7 +79,7 @@ * *
{@code
  * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ *   SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
  *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
  *   PushConfig pushConfig = PushConfig.newBuilder().build();
  *   int ackDeadlineSeconds = 2135351438;
@@ -207,7 +207,7 @@ public SubscriberStub getStub() {
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 2135351438;
@@ -245,10 +245,7 @@ public SubscriberStub getStub() {
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final Subscription createSubscription(
-      ProjectSubscriptionName name,
-      TopicName topic,
-      PushConfig pushConfig,
-      int ackDeadlineSeconds) {
+      SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) {
     Subscription request =
         Subscription.newBuilder()
             .setName(name == null ? null : name.toString())
@@ -276,7 +273,7 @@ public final Subscription createSubscription(
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 2135351438;
@@ -314,7 +311,7 @@ public final Subscription createSubscription(
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final Subscription createSubscription(
-      ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) {
+      SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) {
     Subscription request =
         Subscription.newBuilder()
             .setName(name == null ? null : name.toString())
@@ -342,7 +339,7 @@ public final Subscription createSubscription(
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 2135351438;
@@ -408,7 +405,7 @@ public final Subscription createSubscription(
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 2135351438;
@@ -476,7 +473,7 @@ public final Subscription createSubscription(
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   Subscription request =
    *       Subscription.newBuilder()
-   *           .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
    *           .setPushConfig(PushConfig.newBuilder().build())
    *           .setAckDeadlineSeconds(2135351438)
@@ -554,12 +551,12 @@ public final Subscription createSubscription(Subscription request) {
    *     

If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #createSubscription(ProjectSubscriptionName, TopicName, PushConfig, - * int)} instead. + * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} + * instead. */ @Deprecated public final Subscription createSubscription( - ProjectSubscriptionName name, + com.google.pubsub.v1.ProjectSubscriptionName name, ProjectTopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -592,7 +589,7 @@ public final Subscription createSubscription( * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * Subscription request = * Subscription.newBuilder() - * .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .setPushConfig(PushConfig.newBuilder().build()) * .setAckDeadlineSeconds(2135351438) @@ -626,7 +623,7 @@ public final UnaryCallable createSubscriptionCallabl * *

{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   Subscription response = subscriptionAdminClient.getSubscription(subscription);
    * }
    * }
@@ -635,7 +632,7 @@ public final UnaryCallable createSubscriptionCallabl * `projects/{project}/subscriptions/{sub}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Subscription getSubscription(ProjectSubscriptionName subscription) { + public final Subscription getSubscription(SubscriptionName subscription) { GetSubscriptionRequest request = GetSubscriptionRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) @@ -651,7 +648,7 @@ public final Subscription getSubscription(ProjectSubscriptionName subscription) * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   Subscription response = subscriptionAdminClient.getSubscription(subscription);
    * }
    * }
@@ -676,7 +673,7 @@ public final Subscription getSubscription(String subscription) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * GetSubscriptionRequest request = * GetSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * Subscription response = subscriptionAdminClient.getSubscription(request); * } @@ -699,7 +696,7 @@ public final Subscription getSubscription(GetSubscriptionRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * GetSubscriptionRequest request = * GetSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * ApiFuture future = * subscriptionAdminClient.getSubscriptionCallable().futureCall(request); @@ -855,7 +852,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * subscriptionAdminClient.listSubscriptionsPagedCallable().futureCall(request); * // Do something. * for (Subscription element : future.get().iterateAll()) { @@ -886,7 +883,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * while (true) { * ListSubscriptionsResponse response = * subscriptionAdminClient.listSubscriptionsCallable().call(request); - * for (Subscription element : response.getSubscriptionsList()) { + * for (Subscription element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -915,7 +912,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   subscriptionAdminClient.deleteSubscription(subscription);
    * }
    * }
@@ -924,7 +921,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR * `projects/{project}/subscriptions/{sub}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSubscription(ProjectSubscriptionName subscription) { + public final void deleteSubscription(SubscriptionName subscription) { DeleteSubscriptionRequest request = DeleteSubscriptionRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) @@ -943,7 +940,7 @@ public final void deleteSubscription(ProjectSubscriptionName subscription) { * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   subscriptionAdminClient.deleteSubscription(subscription);
    * }
    * }
@@ -971,7 +968,7 @@ public final void deleteSubscription(String subscription) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * DeleteSubscriptionRequest request = * DeleteSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * subscriptionAdminClient.deleteSubscription(request); * } @@ -997,7 +994,7 @@ public final void deleteSubscription(DeleteSubscriptionRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * DeleteSubscriptionRequest request = * DeleteSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * ApiFuture future = * subscriptionAdminClient.deleteSubscriptionCallable().futureCall(request); @@ -1021,7 +1018,7 @@ public final UnaryCallable deleteSubscriptionC * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   List ackIds = new ArrayList<>();
    *   int ackDeadlineSeconds = 2135351438;
    *   subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
@@ -1040,8 +1037,8 @@ public final UnaryCallable deleteSubscriptionC
    *     600 seconds (10 minutes).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  /* package-private */ final void modifyAckDeadline(
-      ProjectSubscriptionName subscription, List ackIds, int ackDeadlineSeconds) {
+  public final void modifyAckDeadline(
+      SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) {
     ModifyAckDeadlineRequest request =
         ModifyAckDeadlineRequest.newBuilder()
             .setSubscription(subscription == null ? null : subscription.toString())
@@ -1062,7 +1059,7 @@ public final UnaryCallable deleteSubscriptionC
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   List ackIds = new ArrayList<>();
    *   int ackDeadlineSeconds = 2135351438;
    *   subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
@@ -1105,7 +1102,7 @@ public final void modifyAckDeadline(
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ModifyAckDeadlineRequest request =
    *       ModifyAckDeadlineRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .addAllAckIds(new ArrayList())
    *           .setAckDeadlineSeconds(2135351438)
    *           .build();
@@ -1133,7 +1130,7 @@ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ModifyAckDeadlineRequest request =
    *       ModifyAckDeadlineRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .addAllAckIds(new ArrayList())
    *           .setAckDeadlineSeconds(2135351438)
    *           .build();
@@ -1160,7 +1157,7 @@ public final UnaryCallable modifyAckDeadlineCal
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   List ackIds = new ArrayList<>();
    *   subscriptionAdminClient.acknowledge(subscription, ackIds);
    * }
@@ -1172,7 +1169,7 @@ public final UnaryCallable modifyAckDeadlineCal
    *     returned by the Pub/Sub system in the `Pull` response. Must not be empty.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final void acknowledge(ProjectSubscriptionName subscription, List ackIds) {
+  public final void acknowledge(SubscriptionName subscription, List ackIds) {
     AcknowledgeRequest request =
         AcknowledgeRequest.newBuilder()
             .setSubscription(subscription == null ? null : subscription.toString())
@@ -1193,7 +1190,7 @@ public final void acknowledge(ProjectSubscriptionName subscription, List
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   List ackIds = new ArrayList<>();
    *   subscriptionAdminClient.acknowledge(subscription, ackIds);
    * }
@@ -1225,7 +1222,7 @@ public final void acknowledge(String subscription, List ackIds) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   AcknowledgeRequest request =
    *       AcknowledgeRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .addAllAckIds(new ArrayList())
    *           .build();
    *   subscriptionAdminClient.acknowledge(request);
@@ -1253,7 +1250,7 @@ public final void acknowledge(AcknowledgeRequest request) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   AcknowledgeRequest request =
    *       AcknowledgeRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .addAllAckIds(new ArrayList())
    *           .build();
    *   ApiFuture future = subscriptionAdminClient.acknowledgeCallable().futureCall(request);
@@ -1275,7 +1272,7 @@ public final UnaryCallable acknowledgeCallable() {
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   int maxMessages = 496131527;
    *   PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
    * }
@@ -1287,7 +1284,7 @@ public final UnaryCallable acknowledgeCallable() {
    *     a positive integer. The Pub/Sub system may return fewer than the number specified.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) {
+  public final PullResponse pull(SubscriptionName subscription, int maxMessages) {
     PullRequest request =
         PullRequest.newBuilder()
             .setSubscription(subscription == null ? null : subscription.toString())
@@ -1305,7 +1302,7 @@ public final PullResponse pull(ProjectSubscriptionName subscription, int maxMess
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   int maxMessages = 496131527;
    *   PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
    * }
@@ -1332,7 +1329,7 @@ public final PullResponse pull(String subscription, int maxMessages) {
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   boolean returnImmediately = true;
    *   int maxMessages = 496131527;
    *   PullResponse response =
@@ -1352,8 +1349,8 @@ public final PullResponse pull(String subscription, int maxMessages) {
    *     a positive integer. The Pub/Sub system may return fewer than the number specified.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  /* package-private */ final PullResponse pull(
-      ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) {
+  public final PullResponse pull(
+      SubscriptionName subscription, boolean returnImmediately, int maxMessages) {
     PullRequest request =
         PullRequest.newBuilder()
             .setSubscription(subscription == null ? null : subscription.toString())
@@ -1372,7 +1369,7 @@ public final PullResponse pull(String subscription, int maxMessages) {
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   boolean returnImmediately = true;
    *   int maxMessages = 496131527;
    *   PullResponse response =
@@ -1413,7 +1410,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   PullRequest request =
    *       PullRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .setReturnImmediately(true)
    *           .setMaxMessages(496131527)
    *           .build();
@@ -1439,7 +1436,7 @@ public final PullResponse pull(PullRequest request) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   PullRequest request =
    *       PullRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .setReturnImmediately(true)
    *           .setMaxMessages(496131527)
    *           .build();
@@ -1470,7 +1467,7 @@ public final UnaryCallable pullCallable() {
    *       subscriptionAdminClient.streamingPullCallable().call();
    *   StreamingPullRequest request =
    *       StreamingPullRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .addAllAckIds(new ArrayList())
    *           .addAllModifyDeadlineSeconds(new ArrayList())
    *           .addAllModifyDeadlineAckIds(new ArrayList())
@@ -1504,7 +1501,7 @@ public final UnaryCallable pullCallable() {
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
    * }
@@ -1518,7 +1515,7 @@ public final UnaryCallable pullCallable() {
    *     pausing the subscription if `Pull` or `StreamingPull` is not called.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) {
+  public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) {
     ModifyPushConfigRequest request =
         ModifyPushConfigRequest.newBuilder()
             .setSubscription(subscription == null ? null : subscription.toString())
@@ -1540,7 +1537,7 @@ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushCon
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
    * }
@@ -1578,7 +1575,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ModifyPushConfigRequest request =
    *       ModifyPushConfigRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .setPushConfig(PushConfig.newBuilder().build())
    *           .build();
    *   subscriptionAdminClient.modifyPushConfig(request);
@@ -1607,7 +1604,7 @@ public final void modifyPushConfig(ModifyPushConfigRequest request) {
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ModifyPushConfigRequest request =
    *       ModifyPushConfigRequest.newBuilder()
-   *           .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+   *           .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
    *           .setPushConfig(PushConfig.newBuilder().build())
    *           .build();
    *   ApiFuture future =
@@ -1632,7 +1629,7 @@ public final UnaryCallable modifyPushConfigCalla
    *
    * 
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
    *   Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
    * }
    * }
@@ -1641,7 +1638,7 @@ public final UnaryCallable modifyPushConfigCalla * `projects/{project}/snapshots/{snap}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Snapshot getSnapshot(ProjectSnapshotName snapshot) { + public final Snapshot getSnapshot(SnapshotName snapshot) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder() .setSnapshot(snapshot == null ? null : snapshot.toString()) @@ -1660,7 +1657,7 @@ public final Snapshot getSnapshot(ProjectSnapshotName snapshot) { * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   String snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
    *   Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
    * }
    * }
@@ -1687,7 +1684,7 @@ public final Snapshot getSnapshot(String snapshot) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * GetSnapshotRequest request = * GetSnapshotRequest.newBuilder() - * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .build(); * Snapshot response = subscriptionAdminClient.getSnapshot(request); * } @@ -1713,7 +1710,7 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * GetSnapshotRequest request = * GetSnapshotRequest.newBuilder() - * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .build(); * ApiFuture future = * subscriptionAdminClient.getSnapshotCallable().futureCall(request); @@ -1830,7 +1827,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * subscriptionAdminClient.listSnapshotsPagedCallable().futureCall(request); * // Do something. * for (Snapshot element : future.get().iterateAll()) { @@ -1864,7 +1861,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque * while (true) { * ListSnapshotsResponse response = * subscriptionAdminClient.listSnapshotsCallable().call(request); - * for (Snapshot element : response.getSnapshotsList()) { + * for (Snapshot element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1900,8 +1897,8 @@ public final UnaryCallable listSnap * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
    * }
    * }
@@ -1920,8 +1917,7 @@ public final UnaryCallable listSnap * `projects/{project}/subscriptions/{sub}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Snapshot createSnapshot( - ProjectSnapshotName name, ProjectSubscriptionName subscription) { + public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setName(name == null ? null : name.toString()) @@ -1949,8 +1945,8 @@ public final Snapshot createSnapshot( * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
    * }
    * }
@@ -1969,7 +1965,7 @@ public final Snapshot createSnapshot( * `projects/{project}/subscriptions/{sub}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) { + public final Snapshot createSnapshot(SnapshotName name, String subscription) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setName(name == null ? null : name.toString()) @@ -1997,8 +1993,8 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
-   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   String name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
    * }
    * }
@@ -2017,7 +2013,7 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti * `projects/{project}/subscriptions/{sub}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) { + public final Snapshot createSnapshot(String name, SubscriptionName subscription) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setName(name) @@ -2045,8 +2041,8 @@ public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscr * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
-   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   String name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
    *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
    * }
    * }
@@ -2092,8 +2088,8 @@ public final Snapshot createSnapshot(String name, String subscription) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * CreateSnapshotRequest request = * CreateSnapshotRequest.newBuilder() - * .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) * .build(); * Snapshot response = subscriptionAdminClient.createSnapshot(request); @@ -2128,8 +2124,8 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * CreateSnapshotRequest request = * CreateSnapshotRequest.newBuilder() - * .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) * .build(); * ApiFuture future = @@ -2211,7 +2207,7 @@ public final UnaryCallable updateSnapshotCallab * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
    *   subscriptionAdminClient.deleteSnapshot(snapshot);
    * }
    * }
@@ -2220,7 +2216,7 @@ public final UnaryCallable updateSnapshotCallab * `projects/{project}/snapshots/{snap}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSnapshot(ProjectSnapshotName snapshot) { + public final void deleteSnapshot(SnapshotName snapshot) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setSnapshot(snapshot == null ? null : snapshot.toString()) @@ -2242,7 +2238,7 @@ public final void deleteSnapshot(ProjectSnapshotName snapshot) { * *
{@code
    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   String snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
    *   subscriptionAdminClient.deleteSnapshot(snapshot);
    * }
    * }
@@ -2273,7 +2269,7 @@ public final void deleteSnapshot(String snapshot) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * DeleteSnapshotRequest request = * DeleteSnapshotRequest.newBuilder() - * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .build(); * subscriptionAdminClient.deleteSnapshot(request); * } @@ -2302,7 +2298,7 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * DeleteSnapshotRequest request = * DeleteSnapshotRequest.newBuilder() - * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) + * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .build(); * ApiFuture future = * subscriptionAdminClient.deleteSnapshotCallable().futureCall(request); @@ -2330,7 +2326,7 @@ public final UnaryCallable deleteSnapshotCallable( * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * SeekRequest request = * SeekRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * SeekResponse response = subscriptionAdminClient.seek(request); * } @@ -2358,7 +2354,7 @@ public final SeekResponse seek(SeekRequest request) { * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * SeekRequest request = * SeekRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * ApiFuture future = subscriptionAdminClient.seekCallable().futureCall(request); * // Do something. diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 1a9ba2887..61b154c1e 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -27,8 +27,6 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.pubsub.v1.stub.PublisherStub; import com.google.cloud.pubsub.v1.stub.PublisherStubSettings; -import com.google.common.base.Function; -import com.google.common.collect.Iterables; import com.google.common.util.concurrent.MoreExecutors; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -47,7 +45,6 @@ import com.google.pubsub.v1.ListTopicsRequest; import com.google.pubsub.v1.ListTopicsResponse; import com.google.pubsub.v1.ProjectName; -import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PublishRequest; import com.google.pubsub.v1.PublishResponse; @@ -666,7 +663,7 @@ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) { * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = topicAdminClient.listTopicsPagedCallable().futureCall(request); + * ApiFuture future = topicAdminClient.listTopicsPagedCallable().futureCall(request); * // Do something. * for (Topic element : future.get().iterateAll()) { * // doThingsWith(element); @@ -694,7 +691,7 @@ public final UnaryCallable listTopic * .build(); * while (true) { * ListTopicsResponse response = topicAdminClient.listTopicsCallable().call(request); - * for (Topic element : response.getTopicsList()) { + * for (Topic element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -834,7 +831,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * topicAdminClient.listTopicSubscriptionsPagedCallable().futureCall(request); * // Do something. * for (String element : future.get().iterateAll()) { @@ -865,7 +862,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * while (true) { * ListTopicSubscriptionsResponse response = * topicAdminClient.listTopicSubscriptionsCallable().call(request); - * for (String element : response.getSubscriptionsList()) { + * for (String element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -989,7 +986,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * topicAdminClient.listTopicSnapshotsPagedCallable().futureCall(request); * // Do something. * for (String element : future.get().iterateAll()) { @@ -1023,7 +1020,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots( * while (true) { * ListTopicSnapshotsResponse response = * topicAdminClient.listTopicSnapshotsCallable().call(request); - * for (String element : response.getSnapshotsList()) { + * for (String element : response.getResponsesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1183,7 +1180,7 @@ public final UnaryCallable deleteTopicCallable() { * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { * DetachSubscriptionRequest request = * DetachSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * DetachSubscriptionResponse response = topicAdminClient.detachSubscription(request); * } @@ -1208,7 +1205,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { * DetachSubscriptionRequest request = * DetachSubscriptionRequest.newBuilder() - * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) + * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .build(); * ApiFuture future = * topicAdminClient.detachSubscriptionCallable().futureCall(request); @@ -1600,17 +1597,6 @@ public static ApiFuture createAsync( private ListTopicSubscriptionsPagedResponse(ListTopicSubscriptionsPage page) { super(page, ListTopicSubscriptionsFixedSizeCollection.createEmptyCollection()); } - - public Iterable iterateAllAsProjectSubscriptionName() { - return Iterables.transform( - iterateAll(), - new Function() { - @Override - public ProjectSubscriptionName apply(String arg0) { - return ProjectSubscriptionName.parse(arg0); - } - }); - } } public static class ListTopicSubscriptionsPage @@ -1643,28 +1629,6 @@ public ApiFuture createPageAsync( ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } - - public Iterable iterateAllAsProjectSubscriptionName() { - return Iterables.transform( - iterateAll(), - new Function() { - @Override - public ProjectSubscriptionName apply(String arg0) { - return ProjectSubscriptionName.parse(arg0); - } - }); - } - - public Iterable getValuesAsProjectSubscriptionName() { - return Iterables.transform( - getValues(), - new Function() { - @Override - public ProjectSubscriptionName apply(String arg0) { - return ProjectSubscriptionName.parse(arg0); - } - }); - } } public static class ListTopicSubscriptionsFixedSizeCollection @@ -1689,17 +1653,6 @@ protected ListTopicSubscriptionsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListTopicSubscriptionsFixedSizeCollection(pages, collectionSize); } - - public Iterable getValuesAsProjectSubscriptionName() { - return Iterables.transform( - getValues(), - new Function() { - @Override - public ProjectSubscriptionName apply(String arg0) { - return ProjectSubscriptionName.parse(arg0); - } - }); - } } public static class ListTopicSnapshotsPagedResponse diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java index 820341320..128d54247 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java @@ -43,7 +43,7 @@ * *
{@code
  * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ *   SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
  *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
  *   PushConfig pushConfig = PushConfig.newBuilder().build();
  *   int ackDeadlineSeconds = 2135351438;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
index 5ccb0793e..2b2e725c1 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
@@ -369,7 +369,7 @@ protected GrpcPublisherStub(
         callableFactory.createUnaryCallable(
             updateTopicTransportSettings, settings.updateTopicSettings(), clientContext);
     this.publishCallable =
-        callableFactory.createUnaryCallable(
+        callableFactory.createBatchingCallable(
             publishTransportSettings, settings.publishSettings(), clientContext);
     this.getTopicCallable =
         callableFactory.createUnaryCallable(
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
index 89900c0e4..914a95d8c 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
@@ -35,10 +35,10 @@
 import com.google.iam.v1.SetIamPolicyRequest;
 import com.google.iam.v1.TestIamPermissionsRequest;
 import com.google.protobuf.ByteString;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PubsubMessage;
 import com.google.pubsub.v1.PushConfig;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.TopicName;
 import java.util.Collections;
 import java.util.List;
@@ -94,7 +94,7 @@ private String formatForTest(String resourceName) {
   }
 
   private Subscription getSubscription(
-      ProjectSubscriptionName subscriptionName,
+      SubscriptionName subscriptionName,
       TopicName topicName,
       PushConfig pushConfig,
       int ackDeadline) {
@@ -151,9 +151,8 @@ public void testVPCPushSubscriber() {
             .setProject(projectId)
             .setTopic(formatForTest("testing-vpc-push-subscriber-topic"))
             .build();
-    ProjectSubscriptionName subscriptionName =
-        ProjectSubscriptionName.of(
-            projectId, formatForTest("testing-vpc-push-subscriber-subscription"));
+    SubscriptionName subscriptionName =
+        SubscriptionName.of(projectId, formatForTest("testing-vpc-push-subscriber-subscription"));
     topicAdminClient.createTopic(topicName);
 
     try {
@@ -179,9 +178,8 @@ public void testPublishSubscribe() throws Exception {
             .setProject(projectId)
             .setTopic(formatForTest("testing-publish-subscribe-topic"))
             .build();
-    ProjectSubscriptionName subscriptionName =
-        ProjectSubscriptionName.of(
-            projectId, formatForTest("testing-publish-subscribe-subscription"));
+    SubscriptionName subscriptionName =
+        SubscriptionName.of(projectId, formatForTest("testing-publish-subscribe-subscription"));
 
     topicAdminClient.createTopic(topicName);
 
@@ -191,7 +189,7 @@ public void testPublishSubscribe() throws Exception {
     final BlockingQueue receiveQueue = new LinkedBlockingQueue<>();
     Subscriber subscriber =
         Subscriber.newBuilder(
-                subscriptionName,
+                subscriptionName.toString(),
                 new MessageReceiver() {
                   @Override
                   public void receiveMessage(
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
index 00753a6fb..9d53a7554 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
@@ -59,8 +59,6 @@
 import com.google.pubsub.v1.ModifyAckDeadlineRequest;
 import com.google.pubsub.v1.ModifyPushConfigRequest;
 import com.google.pubsub.v1.ProjectName;
-import com.google.pubsub.v1.ProjectSnapshotName;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PullRequest;
 import com.google.pubsub.v1.PullResponse;
 import com.google.pubsub.v1.PushConfig;
@@ -69,9 +67,11 @@
 import com.google.pubsub.v1.SeekRequest;
 import com.google.pubsub.v1.SeekResponse;
 import com.google.pubsub.v1.Snapshot;
+import com.google.pubsub.v1.SnapshotName;
 import com.google.pubsub.v1.StreamingPullRequest;
 import com.google.pubsub.v1.StreamingPullResponse;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.TopicName;
 import com.google.pubsub.v1.UpdateSnapshotRequest;
 import com.google.pubsub.v1.UpdateSubscriptionRequest;
@@ -136,7 +136,7 @@ public void tearDown() throws Exception {
   public void createSubscriptionTest() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -153,7 +153,7 @@ public void createSubscriptionTest() throws Exception {
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     PushConfig pushConfig = PushConfig.newBuilder().build();
     int ackDeadlineSeconds = 2135351438;
@@ -182,7 +182,7 @@ public void createSubscriptionExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
       PushConfig pushConfig = PushConfig.newBuilder().build();
       int ackDeadlineSeconds = 2135351438;
@@ -197,7 +197,7 @@ public void createSubscriptionExceptionTest() throws Exception {
   public void createSubscriptionTest2() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -214,7 +214,7 @@ public void createSubscriptionTest2() throws Exception {
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     String topic = "topic110546223";
     PushConfig pushConfig = PushConfig.newBuilder().build();
     int ackDeadlineSeconds = 2135351438;
@@ -243,7 +243,7 @@ public void createSubscriptionExceptionTest2() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       String topic = "topic110546223";
       PushConfig pushConfig = PushConfig.newBuilder().build();
       int ackDeadlineSeconds = 2135351438;
@@ -258,7 +258,7 @@ public void createSubscriptionExceptionTest2() throws Exception {
   public void createSubscriptionTest3() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -319,7 +319,7 @@ public void createSubscriptionExceptionTest3() throws Exception {
   public void createSubscriptionTest4() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -380,7 +380,7 @@ public void createSubscriptionExceptionTest4() throws Exception {
   public void getSubscriptionTest() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -397,8 +397,7 @@ public void getSubscriptionTest() throws Exception {
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
 
     Subscription actualResponse = client.getSubscription(subscription);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -420,8 +419,7 @@ public void getSubscriptionExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       client.getSubscription(subscription);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -433,7 +431,7 @@ public void getSubscriptionExceptionTest() throws Exception {
   public void getSubscriptionTest2() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -484,7 +482,7 @@ public void getSubscriptionExceptionTest2() throws Exception {
   public void updateSubscriptionTest() throws Exception {
     Subscription expectedResponse =
         Subscription.newBuilder()
-            .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setPushConfig(PushConfig.newBuilder().build())
             .setAckDeadlineSeconds(2135351438)
@@ -633,8 +631,7 @@ public void deleteSubscriptionTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
 
     client.deleteSubscription(subscription);
 
@@ -655,8 +652,7 @@ public void deleteSubscriptionExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       client.deleteSubscription(subscription);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -703,8 +699,7 @@ public void modifyAckDeadlineTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     List ackIds = new ArrayList<>();
     int ackDeadlineSeconds = 2135351438;
 
@@ -729,8 +724,7 @@ public void modifyAckDeadlineExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       List ackIds = new ArrayList<>();
       int ackDeadlineSeconds = 2135351438;
       client.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
@@ -785,8 +779,7 @@ public void acknowledgeTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     List ackIds = new ArrayList<>();
 
     client.acknowledge(subscription, ackIds);
@@ -809,8 +802,7 @@ public void acknowledgeExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       List ackIds = new ArrayList<>();
       client.acknowledge(subscription, ackIds);
       Assert.fail("No exception raised");
@@ -862,8 +854,7 @@ public void pullTest() throws Exception {
         PullResponse.newBuilder().addAllReceivedMessages(new ArrayList()).build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     int maxMessages = 496131527;
 
     PullResponse actualResponse = client.pull(subscription, maxMessages);
@@ -887,8 +878,7 @@ public void pullExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       int maxMessages = 496131527;
       client.pull(subscription, maxMessages);
       Assert.fail("No exception raised");
@@ -942,8 +932,7 @@ public void pullTest3() throws Exception {
         PullResponse.newBuilder().addAllReceivedMessages(new ArrayList()).build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     boolean returnImmediately = true;
     int maxMessages = 496131527;
 
@@ -969,8 +958,7 @@ public void pullExceptionTest3() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       boolean returnImmediately = true;
       int maxMessages = 496131527;
       client.pull(subscription, returnImmediately, maxMessages);
@@ -1033,7 +1021,7 @@ public void streamingPullTest() throws Exception {
     mockSubscriber.addResponse(expectedResponse);
     StreamingPullRequest request =
         StreamingPullRequest.newBuilder()
-            .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .addAllAckIds(new ArrayList())
             .addAllModifyDeadlineSeconds(new ArrayList())
             .addAllModifyDeadlineAckIds(new ArrayList())
@@ -1064,7 +1052,7 @@ public void streamingPullExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
     StreamingPullRequest request =
         StreamingPullRequest.newBuilder()
-            .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .addAllAckIds(new ArrayList())
             .addAllModifyDeadlineSeconds(new ArrayList())
             .addAllModifyDeadlineAckIds(new ArrayList())
@@ -1098,8 +1086,7 @@ public void modifyPushConfigTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     PushConfig pushConfig = PushConfig.newBuilder().build();
 
     client.modifyPushConfig(subscription, pushConfig);
@@ -1122,8 +1109,7 @@ public void modifyPushConfigExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       PushConfig pushConfig = PushConfig.newBuilder().build();
       client.modifyPushConfig(subscription, pushConfig);
       Assert.fail("No exception raised");
@@ -1173,14 +1159,14 @@ public void modifyPushConfigExceptionTest2() throws Exception {
   public void getSnapshotTest() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+    SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
 
     Snapshot actualResponse = client.getSnapshot(snapshot);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -1202,7 +1188,7 @@ public void getSnapshotExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+      SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
       client.getSnapshot(snapshot);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1214,7 +1200,7 @@ public void getSnapshotExceptionTest() throws Exception {
   public void getSnapshotTest2() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
@@ -1343,16 +1329,15 @@ public void listSnapshotsExceptionTest2() throws Exception {
   public void createSnapshotTest() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
 
     Snapshot actualResponse = client.createSnapshot(name, subscription);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -1375,9 +1360,8 @@ public void createSnapshotExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       client.createSnapshot(name, subscription);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1389,14 +1373,14 @@ public void createSnapshotExceptionTest() throws Exception {
   public void createSnapshotTest2() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+    SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
     String subscription = "subscription341203229";
 
     Snapshot actualResponse = client.createSnapshot(name, subscription);
@@ -1420,7 +1404,7 @@ public void createSnapshotExceptionTest2() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+      SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
       String subscription = "subscription341203229";
       client.createSnapshot(name, subscription);
       Assert.fail("No exception raised");
@@ -1433,7 +1417,7 @@ public void createSnapshotExceptionTest2() throws Exception {
   public void createSnapshotTest3() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
@@ -1441,8 +1425,7 @@ public void createSnapshotTest3() throws Exception {
     mockSubscriber.addResponse(expectedResponse);
 
     String name = "name3373707";
-    ProjectSubscriptionName subscription =
-        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+    SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
 
     Snapshot actualResponse = client.createSnapshot(name, subscription);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -1466,8 +1449,7 @@ public void createSnapshotExceptionTest3() throws Exception {
 
     try {
       String name = "name3373707";
-      ProjectSubscriptionName subscription =
-          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+      SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       client.createSnapshot(name, subscription);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1479,7 +1461,7 @@ public void createSnapshotExceptionTest3() throws Exception {
   public void createSnapshotTest4() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
@@ -1523,7 +1505,7 @@ public void createSnapshotExceptionTest4() throws Exception {
   public void updateSnapshotTest() throws Exception {
     Snapshot expectedResponse =
         Snapshot.newBuilder()
-            .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+            .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
             .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
             .setExpireTime(Timestamp.newBuilder().build())
             .putAllLabels(new HashMap())
@@ -1574,7 +1556,7 @@ public void deleteSnapshotTest() throws Exception {
     Empty expectedResponse = Empty.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
 
-    ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+    SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
 
     client.deleteSnapshot(snapshot);
 
@@ -1595,7 +1577,7 @@ public void deleteSnapshotExceptionTest() throws Exception {
     mockSubscriber.addException(exception);
 
     try {
-      ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+      SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
       client.deleteSnapshot(snapshot);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
@@ -1644,7 +1626,7 @@ public void seekTest() throws Exception {
 
     SeekRequest request =
         SeekRequest.newBuilder()
-            .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .build();
 
     SeekResponse actualResponse = client.seek(request);
@@ -1671,7 +1653,7 @@ public void seekExceptionTest() throws Exception {
     try {
       SeekRequest request =
           SeekRequest.newBuilder()
-              .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+              .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
               .build();
       client.seek(request);
       Assert.fail("No exception raised");
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
index 4cf5a7502..02d6a5585 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
@@ -52,11 +52,11 @@
 import com.google.pubsub.v1.ListTopicsResponse;
 import com.google.pubsub.v1.MessageStoragePolicy;
 import com.google.pubsub.v1.ProjectName;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PublishRequest;
 import com.google.pubsub.v1.PublishResponse;
 import com.google.pubsub.v1.PubsubMessage;
 import com.google.pubsub.v1.SchemaSettings;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.Topic;
 import com.google.pubsub.v1.TopicName;
 import com.google.pubsub.v1.UpdateTopicRequest;
@@ -764,7 +764,7 @@ public void detachSubscriptionTest() throws Exception {
 
     DetachSubscriptionRequest request =
         DetachSubscriptionRequest.newBuilder()
-            .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+            .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
             .build();
 
     DetachSubscriptionResponse actualResponse = client.detachSubscription(request);
@@ -789,7 +789,7 @@ public void detachSubscriptionExceptionTest() throws Exception {
     try {
       DetachSubscriptionRequest request =
           DetachSubscriptionRequest.newBuilder()
-              .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+              .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
               .build();
       client.detachSubscription(request);
       Assert.fail("No exception raised");
diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java
index 380561fd8..638e841d7 100644
--- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java
+++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java
@@ -28,6 +28,7 @@
 @javax.annotation.Generated(
     value = "by gRPC proto compiler",
     comments = "Source: google/pubsub/v1/pubsub.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class PublisherGrpc {
 
   private PublisherGrpc() {}
diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java
index ce5099a57..c8061efe2 100644
--- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java
+++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java
@@ -27,6 +27,7 @@
 @javax.annotation.Generated(
     value = "by gRPC proto compiler",
     comments = "Source: google/pubsub/v1/schema.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class SchemaServiceGrpc {
 
   private SchemaServiceGrpc() {}
diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
index 295e5e724..de5a11c89 100644
--- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
+++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
@@ -29,6 +29,7 @@
 @javax.annotation.Generated(
     value = "by gRPC proto compiler",
     comments = "Source: google/pubsub/v1/pubsub.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class SubscriberGrpc {
 
   private SubscriberGrpc() {}
diff --git a/owlbot.py b/owlbot.py
index db3167aba..42af76ac6 100644
--- a/owlbot.py
+++ b/owlbot.py
@@ -406,7 +406,7 @@
    */
   @Deprecated
   public final Subscription createSubscription(
-      ProjectSubscriptionName name,
+      com.google.pubsub.v1.ProjectSubscriptionName name,
       ProjectTopicName topic,
       PushConfig pushConfig,
       int ackDeadlineSeconds) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java
index 009081161..cf164758b 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java
@@ -264,7 +264,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     for (int i = 0; i < ackIds_.size(); i++) {
@@ -279,7 +279,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java
index 6c7618f9c..e0a121785 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java
@@ -312,13 +312,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
     }
     if (schema_ != null) {
       output.writeMessage(2, getSchema());
     }
-    if (!getSchemaIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaId_);
     }
     unknownFields.writeTo(output);
@@ -330,13 +330,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
     }
     if (schema_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSchema());
     }
-    if (!getSchemaIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaId_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java
index 00ea43fcd..b37c9f64a 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java
@@ -392,10 +392,10 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subscription_);
     }
     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
@@ -409,10 +409,10 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subscription_);
     }
     for (java.util.Map.Entry entry :
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
index 773359cfa..e543187a8 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
@@ -222,7 +222,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getDeadLetterTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deadLetterTopic_);
     }
     if (maxDeliveryAttempts_ != 0) {
@@ -237,7 +237,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getDeadLetterTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deadLetterTopic_);
     }
     if (maxDeliveryAttempts_ != 0) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java
index b09de9b8e..69a7b241f 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
index d43936019..b5529abe6 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSnapshotBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSnapshotBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
index 82bd05b37..e4ca9d30f 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
index 68db7a957..db0ba9fbc 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
index 6b738acfa..8e56f9e90 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java
index d8dd20048..9eff93962 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java
@@ -227,7 +227,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
     if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) {
@@ -242,7 +242,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
     if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
index ee75fc7d3..2cdf4abfe 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSnapshotBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSnapshotBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
index 7aed4b01a..1c9992ee8 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
index acf62a7f7..0d3e779c5 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
@@ -180,7 +180,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
     }
     unknownFields.writeTo(output);
@@ -192,7 +192,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java
index 95cf9ecab..0c8e4883d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java
@@ -311,7 +311,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
     }
     if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) {
@@ -320,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (pageSize_ != 0) {
       output.writeInt32(3, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -332,7 +332,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
     }
     if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) {
@@ -341,7 +341,7 @@ public int getSerializedSize() {
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java
index ea77ff15a..27f189db1 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java
@@ -262,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < schemas_.size(); i++) {
       output.writeMessage(1, schemas_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -277,7 +277,7 @@ public int getSerializedSize() {
     for (int i = 0; i < schemas_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schemas_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
index 72ce020e1..6958265a6 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
@@ -264,13 +264,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_);
     }
     if (pageSize_ != 0) {
       output.writeInt32(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -282,13 +282,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_);
     }
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
index e355e42f6..d7747b6dd 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
@@ -263,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < snapshots_.size(); i++) {
       output.writeMessage(1, snapshots_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -278,7 +278,7 @@ public int getSerializedSize() {
     for (int i = 0; i < snapshots_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, snapshots_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
index a1484c696..7599fbf28 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
@@ -264,13 +264,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_);
     }
     if (pageSize_ != 0) {
       output.writeInt32(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -282,13 +282,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_);
     }
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
index 03b7ba951..614895dde 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
@@ -265,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < subscriptions_.size(); i++) {
       output.writeMessage(1, subscriptions_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -280,7 +280,7 @@ public int getSerializedSize() {
     for (int i = 0; i < subscriptions_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subscriptions_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java
index 2edd5bdc8..9ba97ba5a 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java
@@ -264,13 +264,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
     }
     if (pageSize_ != 0) {
       output.writeInt32(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -282,13 +282,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
     }
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
index a19c8778d..c098cc39a 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
@@ -257,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < snapshots_.size(); i++) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshots_.getRaw(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -277,7 +277,7 @@ public int getSerializedSize() {
       size += dataSize;
       size += 1 * getSnapshotsList().size();
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
index 2bd00bee6..d8a5d96fd 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
@@ -264,13 +264,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
     }
     if (pageSize_ != 0) {
       output.writeInt32(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -282,13 +282,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
     }
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
index 303bd86a4..c81e4fe62 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
@@ -258,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < subscriptions_.size(); i++) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscriptions_.getRaw(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -278,7 +278,7 @@ public int getSerializedSize() {
       size += dataSize;
       size += 1 * getSubscriptionsList().size();
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
index b6660177d..17f59fd63 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
@@ -264,13 +264,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_);
     }
     if (pageSize_ != 0) {
       output.writeInt32(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
     }
     unknownFields.writeTo(output);
@@ -282,13 +282,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getProjectBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_);
     }
     if (pageSize_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
     }
-    if (!getPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
index 6e42dbb0e..0af6dd447 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
@@ -262,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < topics_.size(); i++) {
       output.writeMessage(1, topics_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
     }
     unknownFields.writeTo(output);
@@ -277,7 +277,7 @@ public int getSerializedSize() {
     for (int i = 0; i < topics_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topics_.get(i));
     }
-    if (!getNextPageTokenBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java
index a3e24dce8..30831833d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java
@@ -286,7 +286,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     if (ackDeadlineSeconds_ != 0) {
@@ -304,7 +304,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     if (ackDeadlineSeconds_ != 0) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java
index 0ee605fad..8833432d8 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java
@@ -256,7 +256,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     if (pushConfig_ != null) {
@@ -271,7 +271,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     if (pushConfig_ != null) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java
index f255ee55b..3c1a2c428 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java
@@ -275,7 +275,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
     }
     for (int i = 0; i < messages_.size(); i++) {
@@ -290,7 +290,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
     }
     for (int i = 0; i < messages_.size(); i++) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java
index 297538098..bda025a24 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java
@@ -485,13 +485,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     }
     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
         output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2);
-    if (!getMessageIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageId_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, messageId_);
     }
     if (publishTime_ != null) {
       output.writeMessage(4, getPublishTime());
     }
-    if (!getOrderingKeyBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderingKey_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderingKey_);
     }
     unknownFields.writeTo(output);
@@ -516,13 +516,13 @@ public int getSerializedSize() {
               .build();
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__);
     }
-    if (!getMessageIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageId_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, messageId_);
     }
     if (publishTime_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPublishTime());
     }
-    if (!getOrderingKeyBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderingKey_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderingKey_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java
index 4c59e15a5..097ffd48d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java
@@ -234,7 +234,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     if (returnImmediately_ != false) {
@@ -252,7 +252,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     if (returnImmediately_ != false) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java
index 12614a75b..74e82b909 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java
@@ -460,10 +460,10 @@ public final boolean isInitialized() {
 
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-      if (!getServiceAccountEmailBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_);
       }
-      if (!getAudienceBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audience_);
       }
       unknownFields.writeTo(output);
@@ -475,10 +475,10 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getServiceAccountEmailBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_);
       }
-      if (!getAudienceBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audience_);
       }
       size += unknownFields.getSerializedSize();
@@ -1415,7 +1415,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getPushEndpointBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushEndpoint_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pushEndpoint_);
     }
     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
@@ -1432,7 +1432,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getPushEndpointBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushEndpoint_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pushEndpoint_);
     }
     for (java.util.Map.Entry entry :
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java
index 38e472e7a..84c1a8242 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java
@@ -269,7 +269,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getAckIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ackId_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackId_);
     }
     if (message_ != null) {
@@ -287,7 +287,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getAckIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ackId_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ackId_);
     }
     if (message_ != null) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java
index cd8adc77b..c157eb4ba 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java
@@ -435,13 +435,13 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
     if (type_ != com.google.pubsub.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) {
       output.writeEnum(2, type_);
     }
-    if (!getDefinitionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definition_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, definition_);
     }
     unknownFields.writeTo(output);
@@ -453,13 +453,13 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
     if (type_ != com.google.pubsub.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) {
       size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_);
     }
-    if (!getDefinitionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definition_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, definition_);
     }
     size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java
index bca71d432..ee21a2fe6 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java
@@ -227,7 +227,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSchemaBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_);
     }
     if (encoding_ != com.google.pubsub.v1.Encoding.ENCODING_UNSPECIFIED.getNumber()) {
@@ -242,7 +242,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSchemaBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_);
     }
     if (encoding_ != com.google.pubsub.v1.Encoding.ENCODING_UNSPECIFIED.getNumber()) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java
index f9d6cc75d..a10126f4a 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java
@@ -402,7 +402,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     if (targetCase_ == 2) {
@@ -420,7 +420,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     if (targetCase_ == 2) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java
index 7097a40b5..765007468 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java
@@ -448,10 +448,10 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_);
     }
     if (expireTime_ != null) {
@@ -468,10 +468,10 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_);
     }
     if (expireTime_ != null) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
index d0c8d9a3f..a5b507540 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java
@@ -631,7 +631,7 @@ public final boolean isInitialized() {
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
     getSerializedSize();
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_);
     }
     for (int i = 0; i < ackIds_.size(); i++) {
@@ -651,7 +651,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (streamAckDeadlineSeconds_ != 0) {
       output.writeInt32(5, streamAckDeadlineSeconds_);
     }
-    if (!getClientIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clientId_);
     }
     if (maxOutstandingMessages_ != 0L) {
@@ -669,7 +669,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getSubscriptionBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_);
     }
     {
@@ -705,7 +705,7 @@ public int getSerializedSize() {
     if (streamAckDeadlineSeconds_ != 0) {
       size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, streamAckDeadlineSeconds_);
     }
-    if (!getClientIdBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clientId_);
     }
     if (maxOutstandingMessages_ != 0L) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
index a4e0edaa8..6b45b5f6c 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
@@ -1029,10 +1029,10 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_);
     }
     if (pushConfig_ != null) {
@@ -1055,7 +1055,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (expirationPolicy_ != null) {
       output.writeMessage(11, getExpirationPolicy());
     }
-    if (!getFilterBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 12, filter_);
     }
     if (deadLetterPolicy_ != null) {
@@ -1079,10 +1079,10 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
-    if (!getTopicBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_);
     }
     if (pushConfig_ != null) {
@@ -1115,7 +1115,7 @@ public int getSerializedSize() {
     if (expirationPolicy_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy());
     }
-    if (!getFilterBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, filter_);
     }
     if (deadLetterPolicy_ != null) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java
index f2d2bb19f..1682c2329 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java
@@ -612,7 +612,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
     }
     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
@@ -620,7 +620,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (messageStoragePolicy_ != null) {
       output.writeMessage(3, getMessageStoragePolicy());
     }
-    if (!getKmsKeyNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kmsKeyName_);
     }
     if (schemaSettings_ != null) {
@@ -641,7 +641,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
     }
     for (java.util.Map.Entry entry :
@@ -658,7 +658,7 @@ public int getSerializedSize() {
       size +=
           com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMessageStoragePolicy());
     }
-    if (!getKmsKeyNameBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, kmsKeyName_);
     }
     if (schemaSettings_ != null) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java
index d1a77c968..c5bdcde47 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java
@@ -440,7 +440,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
     }
     if (schemaSpecCase_ == 2) {
@@ -464,7 +464,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
     }
     if (schemaSpecCase_ == 2) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java
index 631fca4ef..0e62b8478 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java
@@ -240,7 +240,7 @@ public final boolean isInitialized() {
 
   @java.lang.Override
   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
     }
     if (schema_ != null) {
@@ -255,7 +255,7 @@ public int getSerializedSize() {
     if (size != -1) return size;
 
     size = 0;
-    if (!getParentBytes().isEmpty()) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
     }
     if (schema_ != null) {
diff --git a/samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java
index b8ba1ae68..e58fd621e 100644
--- a/samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java
+++ b/samples/snippets/src/main/java/pubsub/CreatePullSubscriptionExample.java
@@ -19,9 +19,9 @@
 // [START pubsub_create_pull_subscription]
 
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PushConfig;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.TopicName;
 import java.io.IOException;
 
@@ -39,8 +39,7 @@ public static void createPullSubscriptionExample(
       String projectId, String subscriptionId, String topicId) throws IOException {
     try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
       TopicName topicName = TopicName.of(projectId, topicId);
-      ProjectSubscriptionName subscriptionName =
-          ProjectSubscriptionName.of(projectId, subscriptionId);
+      SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
       // Create a pull subscription with default acknowledgement deadline of 10 seconds.
       // Messages not successfully acknowledged within 10 seconds will get resent by the server.
       Subscription subscription =
diff --git a/samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java
index db0175b07..b77795290 100644
--- a/samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java
+++ b/samples/snippets/src/main/java/pubsub/CreatePushSubscriptionExample.java
@@ -19,9 +19,9 @@
 // [START pubsub_create_push_subscription]
 
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PushConfig;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.TopicName;
 import java.io.IOException;
 
@@ -41,8 +41,7 @@ public static void createPushSubscriptionExample(
       throws IOException {
     try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
       TopicName topicName = TopicName.of(projectId, topicId);
-      ProjectSubscriptionName subscriptionName =
-          ProjectSubscriptionName.of(projectId, subscriptionId);
+      SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
       PushConfig pushConfig = PushConfig.newBuilder().setPushEndpoint(pushEndpoint).build();
 
       // Create a push subscription with default acknowledgement deadline of 10 seconds.
diff --git a/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java
index 28d683f1f..0142ba2c3 100644
--- a/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java
+++ b/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.java
@@ -20,7 +20,7 @@
 
 import com.google.api.gax.rpc.NotFoundException;
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
-import com.google.pubsub.v1.ProjectSubscriptionName;
+import com.google.pubsub.v1.SubscriptionName;
 import java.io.IOException;
 
 public class DeleteSubscriptionExample {
@@ -36,8 +36,7 @@ public static void main(String... args) throws Exception {
   public static void deleteSubscriptionExample(String projectId, String subscriptionId)
       throws IOException {
     try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-      ProjectSubscriptionName subscriptionName =
-          ProjectSubscriptionName.of(projectId, subscriptionId);
+      SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
       try {
         subscriptionAdminClient.deleteSubscription(subscriptionName);
         System.out.println("Deleted subscription.");
diff --git a/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java
index 88ebb8e05..b414563c2 100644
--- a/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java
+++ b/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java
@@ -20,8 +20,8 @@
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
 import com.google.cloud.pubsub.v1.TopicAdminClient;
 import com.google.pubsub.v1.DetachSubscriptionRequest;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import java.io.IOException;
 
 public class DetachSubscriptionExample {
@@ -36,8 +36,7 @@ public static void main(String... args) throws Exception {
 
   public static void detachSubscriptionExample(String projectId, String subscriptionId)
       throws IOException {
-    ProjectSubscriptionName subscriptionName =
-        ProjectSubscriptionName.of(projectId, subscriptionId);
+    SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
 
     try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
       topicAdminClient.detachSubscription(
diff --git a/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java b/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java
index c8d7babee..d2946e8f3 100644
--- a/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java
+++ b/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java
@@ -21,8 +21,8 @@
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
 import com.google.protobuf.FieldMask;
 import com.google.pubsub.v1.DeadLetterPolicy;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.TopicName;
 import com.google.pubsub.v1.UpdateSubscriptionRequest;
 import java.io.IOException;
@@ -48,8 +48,7 @@ public static void updateDeadLetterPolicyExample(
       throws IOException {
     try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
 
-      ProjectSubscriptionName subscriptionName =
-          ProjectSubscriptionName.of(projectId, subscriptionId);
+      SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
 
       System.out.println(
           "Before: " + subscriptionAdminClient.getSubscription(subscriptionName).getAllFields());
diff --git a/samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java b/samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java
index ae674be74..d4a583e92 100644
--- a/samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java
+++ b/samples/snippets/src/main/java/pubsub/UpdatePushConfigurationExample.java
@@ -19,9 +19,9 @@
 // [START pubsub_update_push_configuration]
 
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
-import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.PushConfig;
 import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
 import java.io.IOException;
 
 public class UpdatePushConfigurationExample {
@@ -37,8 +37,7 @@ public static void main(String... args) throws Exception {
   public static void updatePushConfigurationExample(
       String projectId, String subscriptionId, String pushEndpoint) throws IOException {
     try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-      ProjectSubscriptionName subscriptionName =
-          ProjectSubscriptionName.of(projectId, subscriptionId);
+      SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
       PushConfig pushConfig = PushConfig.newBuilder().setPushEndpoint(pushEndpoint).build();
       subscriptionAdminClient.modifyPushConfig(subscriptionName, pushConfig);
       Subscription subscription = subscriptionAdminClient.getSubscription(subscriptionName);
diff --git a/samples/snippets/src/test/java/pubsub/AdminIT.java b/samples/snippets/src/test/java/pubsub/AdminIT.java
index 1d198044d..59bb4377d 100644
--- a/samples/snippets/src/test/java/pubsub/AdminIT.java
+++ b/samples/snippets/src/test/java/pubsub/AdminIT.java
@@ -22,8 +22,8 @@
 import com.google.api.gax.rpc.NotFoundException;
 import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
 import com.google.cloud.pubsub.v1.TopicAdminClient;
-import com.google.pubsub.v1.ProjectSubscriptionName;
-import com.google.pubsub.v1.ProjectTopicName;
+import com.google.pubsub.v1.SubscriptionName;
+import com.google.pubsub.v1.TopicName;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.util.UUID;
@@ -46,13 +46,13 @@ public class AdminIT {
   private static final String orderedSubscriptionId = "iam-ordered-subscription-" + _suffix;
   private static final String pushEndpoint = "https://my-test-project.appspot.com/push";
 
-  private static final ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId);
-  private static final ProjectSubscriptionName pullSubscriptionName =
-      ProjectSubscriptionName.of(projectId, pullSubscriptionId);
-  private static final ProjectSubscriptionName pushSubscriptionName =
-      ProjectSubscriptionName.of(projectId, pushSubscriptionId);
-  private static final ProjectSubscriptionName orderedSubscriptionName =
-      ProjectSubscriptionName.of(projectId, orderedSubscriptionId);
+  private static final TopicName topicName = TopicName.of(projectId, topicId);
+  private static final SubscriptionName pullSubscriptionName =
+      SubscriptionName.of(projectId, pullSubscriptionId);
+  private static final SubscriptionName pushSubscriptionName =
+      SubscriptionName.of(projectId, pushSubscriptionId);
+  private static final SubscriptionName orderedSubscriptionName =
+      SubscriptionName.of(projectId, orderedSubscriptionId);
 
   private static void requireEnvVar(String varName) {
     assertNotNull(
diff --git a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java
index fd9e72a33..8a97d25f5 100644
--- a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java
+++ b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java
@@ -24,10 +24,10 @@
 import com.google.cloud.pubsub.v1.TopicAdminClient;
 import com.google.cloud.testing.junit4.MultipleAttemptsRule;
 import com.google.protobuf.ByteString;
-import com.google.pubsub.v1.ProjectSubscriptionName;
-import com.google.pubsub.v1.ProjectTopicName;
 import com.google.pubsub.v1.PubsubMessage;
+import com.google.pubsub.v1.SubscriptionName;
 import com.google.pubsub.v1.Topic;
+import com.google.pubsub.v1.TopicName;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.util.UUID;
@@ -48,9 +48,9 @@ public class DeadLetterQueueIT {
   private static String topicId;
   private static String subscriptionId;
   private static String deadLetterTopicId;
-  private static ProjectTopicName topicName;
-  private static ProjectTopicName deadLetterTopicName;
-  private static ProjectSubscriptionName subscriptionName;
+  private static TopicName topicName;
+  private static TopicName deadLetterTopicName;
+  private static SubscriptionName subscriptionName;
 
   private static void requireEnvVar(String varName) {
     assertNotNull(
@@ -60,7 +60,7 @@ private static void requireEnvVar(String varName) {
 
   // Helper function to publish a message.
   private static void publishSomeMessages() throws Exception {
-    ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId);
+    TopicName topicName = TopicName.of(projectId, topicId);
     Publisher publisher = Publisher.newBuilder(topicName).build();
     ByteString data = ByteString.copyFromUtf8("Hello");
     PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build();
@@ -77,9 +77,9 @@ public static void checkRequirements() {
     topicId = "topic-" + _suffix;
     subscriptionId = "subscription-" + _suffix;
     deadLetterTopicId = "topic-dlq-" + _suffix;
-    topicName = ProjectTopicName.of(projectId, topicId);
-    deadLetterTopicName = ProjectTopicName.of(projectId, deadLetterTopicId);
-    subscriptionName = ProjectSubscriptionName.of(projectId, subscriptionId);
+    topicName = TopicName.of(projectId, topicId);
+    deadLetterTopicName = TopicName.of(projectId, deadLetterTopicId);
+    subscriptionName = SubscriptionName.of(projectId, subscriptionId);
   }
 
   @Before

From d969f571fc3e58542066b2220de22454fd85ca1d Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 30 Nov 2021 12:52:00 -0500
Subject: [PATCH 22/28] chore: keep beta version intact (#1293) (#936)

Source-Link: https://github.com/googleapis/synthtool/commit/6b5cee730c12697d78183545467319b339b0ba4f
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:94580e16bbb4ea1592fa9dd5c5df76716e17858c0dc975582d096c6ae0dc91f5

Co-authored-by: Owl Bot 
---
 .github/.OwlBot.lock.yaml |  2 +-
 CONTRIBUTING.md           | 61 +++++----------------------------------
 2 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 5d788be0b..621c0d66c 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -1,3 +1,3 @@
 docker:
   image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
-  digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0
+  digest: sha256:94580e16bbb4ea1592fa9dd5c5df76716e17858c0dc975582d096c6ae0dc91f5
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f2dbdee06..b65dd279c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify
 
 ## Code Samples
 
-Code Samples must be bundled in separate Maven modules, and guarded by a
-Maven profile with the name `enable-samples`.
+All code samples must be in compliance with the [java sample formatting guide][3].
+Code Samples must be bundled in separate Maven modules.
 
 The samples must be separate from the primary project for a few reasons:
-1. Primary projects have a minimum Java version of Java 7 whereas samples have
-   a minimum Java version of Java 8. Due to this we need the ability to
+1. Primary projects have a minimum Java version of Java 8 whereas samples can have
+   Java version of Java 11. Due to this we need the ability to
    selectively exclude samples from a build run.
 2. Many code samples depend on external GCP services and need
    credentials to access the service.
@@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons:
 ### Building
 
 ```bash
-mvn -Penable-samples clean verify
+mvn clean verify
 ```
 
 Some samples require access to GCP services and require a service account:
 
 ```bash
 export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json
-mvn -Penable-samples clean verify
+mvn clean verify
 ```
 
-### Profile Config
-
-1. To add samples in a profile to your Maven project, add the following to your
-`pom.xml`
-
-    ```xml
-    
-      [...]
-      
-        
-          enable-samples
-          
-            sample
-          
-        
-      
-      [...]
-    
-    ```
-
-2. [Activate](#profile-activation) the profile.
-3. Define your samples in a normal Maven project in the `samples/` directory.
-
 ### Code Formatting
 
 Code in this repo is formatted with
@@ -110,30 +87,6 @@ To run formatting on your project, you can run:
 mvn com.coveo:fmt-maven-plugin:format
 ```
 
-### Profile Activation
-
-To include code samples when building and testing the project, enable the 
-`enable-samples` Maven profile.
-
-#### Command line
-
-To activate the Maven profile on the command line add `-Penable-samples` to your
-Maven command.
-
-#### Maven `settings.xml`
-
-To activate the Maven profile in your `~/.m2/settings.xml` add an entry of
-`enable-samples` following the instructions in [Active Profiles][2].
-
-This method has the benefit of applying to all projects you build (and is
-respected by IntelliJ IDEA) and is recommended if you are going to be
-contributing samples to several projects.
-
-#### IntelliJ IDEA
-
-To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in
-[Activate Maven profiles][3] to activate `enable-samples`.
-
 [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account
 [2]: https://maven.apache.org/settings.html#Active_Profiles
-[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles
+[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md
\ No newline at end of file

From 04297f2318272b8a5dc981effce6077f6193130e Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 30 Nov 2021 23:36:12 +0000
Subject: [PATCH 23/28] chore(ruby): Re-enable bigquery-storage-v1 generation,
 which also required updating protobuf from 3.15.3 to 3.18.1 for codegen
 (#876)

- [x] Regenerate this pull request now.

PiperOrigin-RevId: 403132955

Source-Link: https://github.com/googleapis/googleapis/commit/d2977af9e9f1fc0c9dc8368352daa032471f3c63

Source-Link: https://github.com/googleapis/googleapis-gen/commit/99bb13c813c0e9c2682d03a8b3c3bcb382a909c9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTliYjEzYzgxM2MwZTljMjY4MmQwM2E4YjNjM2JjYjM4MmE5MDljOSJ9
---
 .../clirr-ignored-differences.xml             |   6 -
 .../pubsub/v1/SubscriptionAdminClient.java    | 610 ++++++++++++++-
 owlbot.py                                     | 697 +++++++++++++++++-
 3 files changed, 1300 insertions(+), 13 deletions(-)

diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml
index 95c46b0f0..8e64f2d62 100644
--- a/google-cloud-pubsub/clirr-ignored-differences.xml
+++ b/google-cloud-pubsub/clirr-ignored-differences.xml
@@ -1,12 +1,6 @@
 
 
 
-  
-    7005
-    com/google/cloud/pubsub/v1/SubscriptionAdminClient
-    *
-    *
-  
   
     7002
     com/google/cloud/pubsub/v1/TopicAdminClient$ListTopicSubscriptions*
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
index eb837a289..c3090f67d 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
@@ -48,6 +48,8 @@
 import com.google.pubsub.v1.ModifyAckDeadlineRequest;
 import com.google.pubsub.v1.ModifyPushConfigRequest;
 import com.google.pubsub.v1.ProjectName;
+import com.google.pubsub.v1.ProjectSnapshotName;
+import com.google.pubsub.v1.ProjectSubscriptionName;
 import com.google.pubsub.v1.ProjectTopicName;
 import com.google.pubsub.v1.PullRequest;
 import com.google.pubsub.v1.PullResponse;
@@ -556,7 +558,7 @@ public final Subscription createSubscription(Subscription request) {
    */
   @Deprecated
   public final Subscription createSubscription(
-      com.google.pubsub.v1.ProjectSubscriptionName name,
+      ProjectSubscriptionName name,
       ProjectTopicName topic,
       PushConfig pushConfig,
       int ackDeadlineSeconds) {
@@ -570,6 +572,145 @@ public final Subscription createSubscription(
     return createSubscription(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD.
+  /**
+   * Creates a subscription to a given topic. See the [resource name rules]
+   * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already
+   * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns
+   * `NOT_FOUND`.
+   *
+   * 

If the name is not provided in the request, the server will assign a random name for this + * subscription on the same project as the topic, conforming to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in + * the returned Subscription object. Note that for REST API requests, you must specify a name in + * the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   Subscription response =
+   *       subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param name Required. The name of the subscription. It must have the format + * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a + * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores + * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 + * and 255 characters in length, and it must not start with `"goog"`. + * @param topic Required. The name of the topic from which this subscription is receiving + * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be + * `_deleted-topic_` if the topic has been deleted. + * @param pushConfig If push delivery is used with this subscription, this field is used to + * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack + * messages using API methods. + * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits + * for the subscriber to acknowledge receipt before resending the message. In the interval + * after the message is delivered and before it is acknowledged, it is considered to be + * <i>outstanding</i>. During that time period, the message will not be + * redelivered (on a best-effort basis). + *

For pull subscriptions, this value is used as the initial value for the ack deadline. To + * override this value for a given message, call `ModifyAckDeadline` with the corresponding + * `ack_id` if using non-streaming pull or send the `ack_id` in a + * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline + * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds + * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. + *

For push delivery, this value is also used to set the request timeout for the call to + * the push endpoint. + *

If the subscriber never acknowledges the message, the Pub/Sub system will eventually + * redeliver the message. + * @deprecated Use {@link #createSubscription(SubscriptionName, String, PushConfig, int)} instead. + */ + @Deprecated + public final Subscription createSubscription( + ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { + Subscription request = + Subscription.newBuilder() + .setName(name == null ? null : name.toString()) + .setTopic(topic) + .setPushConfig(pushConfig) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + return createSubscription(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a subscription to a given topic. See the [resource name rules] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already + * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * `NOT_FOUND`. + * + *

If the name is not provided in the request, the server will assign a random name for this + * subscription on the same project as the topic, conforming to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in + * the returned Subscription object. Note that for REST API requests, you must specify a name in + * the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   Subscription response =
+   *       subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param name Required. The name of the subscription. It must have the format + * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a + * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores + * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 + * and 255 characters in length, and it must not start with `"goog"`. + * @param topic Required. The name of the topic from which this subscription is receiving + * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be + * `_deleted-topic_` if the topic has been deleted. + * @param pushConfig If push delivery is used with this subscription, this field is used to + * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack + * messages using API methods. + * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits + * for the subscriber to acknowledge receipt before resending the message. In the interval + * after the message is delivered and before it is acknowledged, it is considered to be + * <i>outstanding</i>. During that time period, the message will not be + * redelivered (on a best-effort basis). + *

For pull subscriptions, this value is used as the initial value for the ack deadline. To + * override this value for a given message, call `ModifyAckDeadline` with the corresponding + * `ack_id` if using non-streaming pull or send the `ack_id` in a + * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline + * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds + * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. + *

For push delivery, this value is also used to set the request timeout for the call to + * the push endpoint. + *

If the subscriber never acknowledges the message, the Pub/Sub system will eventually + * redeliver the message. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} + * instead. + */ + @Deprecated + public final Subscription createSubscription( + ProjectSubscriptionName name, + TopicName topic, + PushConfig pushConfig, + int ackDeadlineSeconds) { + Subscription request = + Subscription.newBuilder() + .setName(name == null ? null : name.toString()) + .setTopic(topic == null ? null : topic.toString()) + .setPushConfig(pushConfig) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + return createSubscription(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] @@ -686,6 +827,33 @@ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration details of a subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Subscription response = subscriptionAdminClient.getSubscription(subscription);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription to get. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getSubscription(SubscriptionName)} instead. + */ + @Deprecated + public final Subscription getSubscription(ProjectSubscriptionName subscription) { + GetSubscriptionRequest request = + GetSubscriptionRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return getSubscription(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the configuration details of a subscription. @@ -981,6 +1149,36 @@ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing subscription. All messages retained in the subscription are immediately + * dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is + * deleted, a new one may be created with the same name, but the new one has no association with + * the old subscription or its topic unless the same topic is specified. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   subscriptionAdminClient.deleteSubscription(subscription);
+   * }
+   * }
+ * + * @param subscription Required. The subscription to delete. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #deleteSubscription(SubscriptionName)} instead. + */ + @Deprecated + public final void deleteSubscription(ProjectSubscriptionName subscription) { + DeleteSubscriptionRequest request = + DeleteSubscriptionRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + deleteSubscription(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an existing subscription. All messages retained in the subscription are immediately @@ -1117,6 +1315,49 @@ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) { modifyAckDeadlineCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Modifies the ack deadline for a specific message. This method is useful to indicate that more + * time is needed to process a message by the subscriber, or to make the message available for + * redelivery if the processing was interrupted. Note that this does not modify the + * subscription-level `ackDeadlineSeconds` used for subsequent messages. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   List ackIds = new ArrayList<>();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param ackIds Required. List of acknowledgment IDs. + * @param ackDeadlineSeconds Required. The new ack deadline with respect to the time this request + * was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will + * expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might + * immediately make the message available for delivery to another subscriber client. This + * typically results in an increase in the rate of message redeliveries (that is, duplicates). + * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is + * 600 seconds (10 minutes). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #modifyAckDeadline(SubscriptionName, List, int)} instead. + */ + @Deprecated + final void modifyAckDeadline( + ProjectSubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { + ModifyAckDeadlineRequest request = + ModifyAckDeadlineRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .addAllAckIds(ackIds) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + modifyAckDeadline(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Modifies the ack deadline for a specific message. This method is useful to indicate that more @@ -1236,6 +1477,41 @@ public final void acknowledge(AcknowledgeRequest request) { acknowledgeCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The + * Pub/Sub system can remove the relevant messages from the subscription. + * + *

Acknowledging a message whose ack deadline has expired may succeed, but such a message may + * be redelivered later. Acknowledging a message more than once will not result in an error. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   List ackIds = new ArrayList<>();
+   *   subscriptionAdminClient.acknowledge(subscription, ackIds);
+   * }
+   * }
+ * + * @param subscription Required. The subscription whose message is being acknowledged. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was + * returned by the Pub/Sub system in the `Pull` response. Must not be empty. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #acknowledge(SubscriptionName, List)} instead. + */ + @Deprecated + public final void acknowledge(ProjectSubscriptionName subscription, List ackIds) { + AcknowledgeRequest request = + AcknowledgeRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .addAllAckIds(ackIds) + .build(); + acknowledge(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The @@ -1418,11 +1694,85 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i * } * } * - * @param request The request object containing all of the parameters for the API call. + * @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 PullResponse pull(PullRequest request) { + return pullCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many + * concurrent pull requests pending for the given subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   int maxMessages = 496131527;
+   *   PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
+   * }
+   * }
+ * + * @param subscription Required. The subscription from which messages should be pulled. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param maxMessages Required. The maximum number of messages to return for this request. Must be + * a positive integer. The Pub/Sub system may return fewer than the number specified. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #pull(SubscriptionName, int)} instead. + */ + @Deprecated + public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) { + PullRequest request = + PullRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setMaxMessages(maxMessages) + .build(); + return pull(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many + * concurrent pull requests pending for the given subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   boolean returnImmediately = true;
+   *   int maxMessages = 496131527;
+   *   PullResponse response =
+   *       subscriptionAdminClient.pull(subscription, returnImmediately, maxMessages);
+   * }
+   * }
+ * + * @param subscription Required. The subscription from which messages should be pulled. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param returnImmediately Optional. If this field set to true, the system will respond + * immediately even if it there are no messages available to return in the `Pull` response. + * Otherwise, the system may wait (for a bounded amount of time) until at least one message is + * available, rather than returning no messages. Warning: setting this field to `true` is + * discouraged because it adversely impacts the performance of `Pull` operations. We recommend + * that users do not set this field. + * @param maxMessages Required. The maximum number of messages to return for this request. Must be + * a positive integer. The Pub/Sub system may return fewer than the number specified. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #pull(SubscriptionName, boolean, int)} instead. */ - public final PullResponse pull(PullRequest request) { - return pullCallable().call(request); + @Deprecated + final PullResponse pull( + ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) { + PullRequest request = + PullRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setReturnImmediately(returnImmediately) + .setMaxMessages(maxMessages) + .build(); + return pull(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -1589,6 +1939,44 @@ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Modifies the `PushConfig` for a specified subscription. + * + *

This may be used to change a push subscription to a pull one (signified by an empty + * `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push + * subscription. Messages will accumulate for delivery continuously through the call regardless of + * changes to the `PushConfig`. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param pushConfig Required. The push configuration for future deliveries. + *

An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages + * from the given subscription and allow messages to be pulled and acknowledged - effectively + * pausing the subscription if `Pull` or `StreamingPull` is not called. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #modifyPushConfig(SubscriptionName, PushConfig)} instead. + */ + @Deprecated + public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { + ModifyPushConfigRequest request = + ModifyPushConfigRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setPushConfig(pushConfig) + .build(); + modifyPushConfig(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Modifies the `PushConfig` for a specified subscription. @@ -1697,6 +2085,36 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration details of a snapshot. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
+   * }
+   * }
+ * + * @param snapshot Required. The name of the snapshot to get. Format is + * `projects/{project}/snapshots/{snap}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #getSnapshot(SnapshotName)} instead. + */ + @Deprecated + public final Snapshot getSnapshot(ProjectSnapshotName snapshot) { + GetSnapshotRequest request = + GetSnapshotRequest.newBuilder() + .setSnapshot(snapshot == null ? null : snapshot.toString()) + .build(); + return getSnapshot(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the configuration details of a snapshot. Snapshots are used in <a @@ -2103,6 +2521,157 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(SnapshotName, SubscriptionName)} instead. + */ + @Deprecated + public final Snapshot createSnapshot( + ProjectSnapshotName name, ProjectSubscriptionName subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return createSnapshot(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(String, SubscriptionName)} instead. + */ + @Deprecated + public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name) + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return createSnapshot(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(SnapshotName, String)} instead. + */ + @Deprecated + public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSubscription(subscription) + .build(); + return createSnapshot(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a snapshot from the requested subscription. Snapshots are used in @@ -2282,6 +2851,39 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes an existing snapshot. Snapshots are used in [Seek] + * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage + * message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in + * an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all + * messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new + * one may be created with the same name, but the new one has no association with the old snapshot + * or its subscription, unless the same subscription is specified. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   subscriptionAdminClient.deleteSnapshot(snapshot);
+   * }
+   * }
+ * + * @param snapshot Required. The name of the snapshot to delete. Format is + * `projects/{project}/snapshots/{snap}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #deleteSnapshot(SnapshotName)} instead. + */ + @Deprecated + public final void deleteSnapshot(ProjectSnapshotName snapshot) { + DeleteSnapshotRequest request = + DeleteSnapshotRequest.newBuilder() + .setSnapshot(snapshot == null ? null : snapshot.toString()) + .build(); + deleteSnapshot(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes an existing snapshot. Snapshots are used in [Seek] diff --git a/owlbot.py b/owlbot.py index 42af76ac6..0d280ad71 100644 --- a/owlbot.py +++ b/owlbot.py @@ -402,11 +402,11 @@ *

If the subscriber never acknowledges the message, the Pub/Sub system will eventually * redeliver the message. * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #createSubscription(ProjectSubscriptionName, TopicName, PushConfig, int)} instead. + * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} instead. */ @Deprecated public final Subscription createSubscription( - com.google.pubsub.v1.ProjectSubscriptionName name, + ProjectSubscriptionName name, ProjectTopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) { @@ -419,11 +419,648 @@ .build(); return createSubscription(request); } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a subscription to a given topic. See the [resource name rules] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already + * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * `NOT_FOUND`. + * + *

If the name is not provided in the request, the server will assign a random name for this + * subscription on the same project as the topic, conforming to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in + * the returned Subscription object. Note that for REST API requests, you must specify a name in + * the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   Subscription response =
+   *       subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param name Required. The name of the subscription. It must have the format + * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a + * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores + * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 + * and 255 characters in length, and it must not start with `"goog"`. + * @param topic Required. The name of the topic from which this subscription is receiving + * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be + * `_deleted-topic_` if the topic has been deleted. + * @param pushConfig If push delivery is used with this subscription, this field is used to + * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack + * messages using API methods. + * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits + * for the subscriber to acknowledge receipt before resending the message. In the interval + * after the message is delivered and before it is acknowledged, it is considered to be + * <i>outstanding</i>. During that time period, the message will not be + * redelivered (on a best-effort basis). + *

For pull subscriptions, this value is used as the initial value for the ack deadline. To + * override this value for a given message, call `ModifyAckDeadline` with the corresponding + * `ack_id` if using non-streaming pull or send the `ack_id` in a + * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline + * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds + * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. + *

For push delivery, this value is also used to set the request timeout for the call to + * the push endpoint. + *

If the subscriber never acknowledges the message, the Pub/Sub system will eventually + * redeliver the message. + * @deprecated Use {@link #createSubscription(SubscriptionName, String, PushConfig, int)} instead. + */ + @Deprecated + public final Subscription createSubscription( + ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { + Subscription request = + Subscription.newBuilder() + .setName(name == null ? null : name.toString()) + .setTopic(topic) + .setPushConfig(pushConfig) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + return createSubscription(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a subscription to a given topic. See the [resource name rules] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already + * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns + * `NOT_FOUND`. + * + *

If the name is not provided in the request, the server will assign a random name for this + * subscription on the same project as the topic, conforming to the [resource name format] + * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in + * the returned Subscription object. Note that for REST API requests, you must specify a name in + * the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   Subscription response =
+   *       subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param name Required. The name of the subscription. It must have the format + * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a + * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores + * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 + * and 255 characters in length, and it must not start with `"goog"`. + * @param topic Required. The name of the topic from which this subscription is receiving + * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be + * `_deleted-topic_` if the topic has been deleted. + * @param pushConfig If push delivery is used with this subscription, this field is used to + * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack + * messages using API methods. + * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits + * for the subscriber to acknowledge receipt before resending the message. In the interval + * after the message is delivered and before it is acknowledged, it is considered to be + * <i>outstanding</i>. During that time period, the message will not be + * redelivered (on a best-effort basis). + *

For pull subscriptions, this value is used as the initial value for the ack deadline. To + * override this value for a given message, call `ModifyAckDeadline` with the corresponding + * `ack_id` if using non-streaming pull or send the `ack_id` in a + * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline + * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds + * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. + *

For push delivery, this value is also used to set the request timeout for the call to + * the push endpoint. + *

If the subscriber never acknowledges the message, the Pub/Sub system will eventually + * redeliver the message. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} instead. + */ + @Deprecated + public final Subscription createSubscription( + ProjectSubscriptionName name, + TopicName topic, + PushConfig pushConfig, + int ackDeadlineSeconds) { + Subscription request = + Subscription.newBuilder() + .setName(name == null ? null : name.toString()) + .setTopic(topic == null ? null : topic.toString()) + .setPushConfig(pushConfig) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + return createSubscription(request); + } +""" + +GET_SUBSCRIPTION_PREVIOUS = r'(\s+public final Subscription getSubscription\(GetSubscriptionRequest request\) {\n\s+return.*\n\s+})' + +GET_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration details of a subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Subscription response = subscriptionAdminClient.getSubscription(subscription);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription to get. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getSubscription(SubscriptionName)} instead. + */ + @Deprecated + public final Subscription getSubscription(ProjectSubscriptionName subscription) { + GetSubscriptionRequest request = + GetSubscriptionRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return getSubscription(request); + } +""" + +DELETE_SUBSCRIPTION_PREVIOUS = r'(\s+public final void deleteSubscription\(DeleteSubscriptionRequest request\) {\n\s+deleteSubscription.*\n\s+})' + +DELETE_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing subscription. All messages retained in the subscription are immediately + * dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is + * deleted, a new one may be created with the same name, but the new one has no association with + * the old subscription or its topic unless the same topic is specified. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   subscriptionAdminClient.deleteSubscription(subscription);
+   * }
+   * }
+ * + * @param subscription Required. The subscription to delete. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #deleteSubscription(SubscriptionName)} instead. + */ + @Deprecated + public final void deleteSubscription(ProjectSubscriptionName subscription) { + DeleteSubscriptionRequest request = + DeleteSubscriptionRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + deleteSubscription(request); + } +""" + +MODIFY_ACK_DEADLINE_PREVIOUS = r'(\s+public final void modifyAckDeadline\(ModifyAckDeadlineRequest request\) {\n\s+modifyAckDeadline.*\n\s+})' + +MODIFY_ACK_DEADLINE = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Modifies the ack deadline for a specific message. This method is useful to indicate that more + * time is needed to process a message by the subscriber, or to make the message available for + * redelivery if the processing was interrupted. Note that this does not modify the + * subscription-level `ackDeadlineSeconds` used for subsequent messages. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   List ackIds = new ArrayList<>();
+   *   int ackDeadlineSeconds = 2135351438;
+   *   subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param ackIds Required. List of acknowledgment IDs. + * @param ackDeadlineSeconds Required. The new ack deadline with respect to the time this request + * was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will + * expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might + * immediately make the message available for delivery to another subscriber client. This + * typically results in an increase in the rate of message redeliveries (that is, duplicates). + * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is + * 600 seconds (10 minutes). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #modifyAckDeadline(SubscriptionName, List, int)} instead. + */ + @Deprecated + final void modifyAckDeadline( + ProjectSubscriptionName subscription, List ackIds, int ackDeadlineSeconds) { + ModifyAckDeadlineRequest request = + ModifyAckDeadlineRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .addAllAckIds(ackIds) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); + modifyAckDeadline(request); + } +""" + +ACKNOWLEDGE_PREVIOUS = r'(\s+public final void acknowledge\(AcknowledgeRequest request\) {\n\s+acknowledge.*\n\s+})' + +ACKNOWLEDGE = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The + * Pub/Sub system can remove the relevant messages from the subscription. + * + *

Acknowledging a message whose ack deadline has expired may succeed, but such a message may + * be redelivered later. Acknowledging a message more than once will not result in an error. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   List ackIds = new ArrayList<>();
+   *   subscriptionAdminClient.acknowledge(subscription, ackIds);
+   * }
+   * }
+ * + * @param subscription Required. The subscription whose message is being acknowledged. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was + * returned by the Pub/Sub system in the `Pull` response. Must not be empty. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #acknowledge(SubscriptionName, List)} instead. + */ + @Deprecated + public final void acknowledge(ProjectSubscriptionName subscription, List ackIds) { + AcknowledgeRequest request = + AcknowledgeRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .addAllAckIds(ackIds) + .build(); + acknowledge(request); + } +""" + +PULL_PREVIOUS = r'(\s+public final PullResponse pull\(PullRequest request\) {\n\s+return.*\n\s+})' + +PULL = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many + * concurrent pull requests pending for the given subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   int maxMessages = 496131527;
+   *   PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
+   * }
+   * }
+ * + * @param subscription Required. The subscription from which messages should be pulled. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param maxMessages Required. The maximum number of messages to return for this request. Must be + * a positive integer. The Pub/Sub system may return fewer than the number specified. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #pull(SubscriptionName, int)} instead. + */ + @Deprecated + public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) { + PullRequest request = + PullRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setMaxMessages(maxMessages) + .build(); + return pull(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many + * concurrent pull requests pending for the given subscription. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   boolean returnImmediately = true;
+   *   int maxMessages = 496131527;
+   *   PullResponse response =
+   *       subscriptionAdminClient.pull(subscription, returnImmediately, maxMessages);
+   * }
+   * }
+ * + * @param subscription Required. The subscription from which messages should be pulled. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param returnImmediately Optional. If this field set to true, the system will respond + * immediately even if it there are no messages available to return in the `Pull` response. + * Otherwise, the system may wait (for a bounded amount of time) until at least one message is + * available, rather than returning no messages. Warning: setting this field to `true` is + * discouraged because it adversely impacts the performance of `Pull` operations. We recommend + * that users do not set this field. + * @param maxMessages Required. The maximum number of messages to return for this request. Must be + * a positive integer. The Pub/Sub system may return fewer than the number specified. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #pull(SubscriptionName, boolean, int)} instead. + */ + @Deprecated + final PullResponse pull( + ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) { + PullRequest request = + PullRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setReturnImmediately(returnImmediately) + .setMaxMessages(maxMessages) + .build(); + return pull(request); + } +""" + +MODIFY_PUSH_CONFIG_PREVIOUS = r'(\s+public final void modifyPushConfig\(ModifyPushConfigRequest request\) {\n\s+modifyPushConfig.*\n\s+})' + +MODIFY_PUSH_CONFIG = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Modifies the `PushConfig` for a specified subscription. + * + *

This may be used to change a push subscription to a pull one (signified by an empty + * `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push + * subscription. Messages will accumulate for delivery continuously through the call regardless of + * changes to the `PushConfig`. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
+   * }
+   * }
+ * + * @param subscription Required. The name of the subscription. Format is + * `projects/{project}/subscriptions/{sub}`. + * @param pushConfig Required. The push configuration for future deliveries. + *

An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages + * from the given subscription and allow messages to be pulled and acknowledged - effectively + * pausing the subscription if `Pull` or `StreamingPull` is not called. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #modifyPushConfig(SubscriptionName, PushConfig)} instead. + */ + @Deprecated + public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { + ModifyPushConfigRequest request = + ModifyPushConfigRequest.newBuilder() + .setSubscription(subscription == null ? null : subscription.toString()) + .setPushConfig(pushConfig) + .build(); + modifyPushConfig(request); + } +""" + +CREATE_SNAPSHOT_PREVIOUS = r'(\s+public final Snapshot createSnapshot\(CreateSnapshotRequest request\) {\n\s+return.*\n\s+})' + +CREATE_SNAPSHOT = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(SnapshotName, SubscriptionName)} instead. + */ + @Deprecated + public final Snapshot createSnapshot( + ProjectSnapshotName name, ProjectSubscriptionName subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return createSnapshot(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(String, SubscriptionName)} instead. + */ + @Deprecated + public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name) + .setSubscription(subscription == null ? null : subscription.toString()) + .build(); + return createSnapshot(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a snapshot from the requested subscription. Snapshots are used in + * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to + * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of + * messages in an existing subscription to the state captured by a snapshot. If the snapshot + * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns + * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would + * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the + * `Snapshot.expire_time` field. If the name is not provided in the request, the server will + * assign a random name for this snapshot on the same project as the subscription, conforming to + * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * generated name is populated in the returned Snapshot object. Note that for REST API requests, + * you must specify a name in the request. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+   *   Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+   * }
+   * }
+ * + * @param name Required. User-provided name for this snapshot. If the name is not provided in the + * request, the server will assign a random name for this snapshot on the same project as the + * subscription. Note that for REST API requests, you must specify a name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. Format is `projects/{project}/snapshots/{snap}`. + * @param subscription Required. The subscription whose backlog the snapshot retains. + * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the + * subscription. More precisely, this is defined as the messages in the subscription's backlog + * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as + * well as: (b) Any messages published to the subscription's topic following the successful + * completion of the CreateSnapshot request. Format is + * `projects/{project}/subscriptions/{sub}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #createSnapshot(SnapshotName, String)} instead. + */ + @Deprecated + public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) { + CreateSnapshotRequest request = + CreateSnapshotRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSubscription(subscription) + .build(); + return createSnapshot(request); + } +""" + +DELETE_SNAPSHOT_PREVIOUS = r'(\s+public final void deleteSnapshot\(DeleteSnapshotRequest request\) {\n\s+deleteSnapshot.*\n\s+})' + +DELETE_SNAPSHOT = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes an existing snapshot. Snapshots are used in [Seek] + * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage + * message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in + * an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all + * messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new + * one may be created with the same name, but the new one has no association with the old snapshot + * or its subscription, unless the same subscription is specified. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   subscriptionAdminClient.deleteSnapshot(snapshot);
+   * }
+   * }
+ * + * @param snapshot Required. The name of the snapshot to delete. Format is + * `projects/{project}/snapshots/{snap}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #deleteSnapshot(SnapshotName)} instead. + */ + @Deprecated + public final void deleteSnapshot(ProjectSnapshotName snapshot) { + DeleteSnapshotRequest request = + DeleteSnapshotRequest.newBuilder() + .setSnapshot(snapshot == null ? null : snapshot.toString()) + .build(); + deleteSnapshot(request); + } +""" + +GET_SNAPSHOT_PREVIOUS = r'(\s+public final Snapshot getSnapshot\(GetSnapshotRequest request\) {\n\s+return.*\n\s+})' + +GET_SNAPSHOT = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration details of a snapshot. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *

{@code
+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
+   * }
+   * }
+ * + * @param snapshot Required. The name of the snapshot to get. Format is + * `projects/{project}/snapshots/{snap}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use Use {@link #getSnapshot(SnapshotName)} instead. + */ + @Deprecated + public final Snapshot getSnapshot(ProjectSnapshotName snapshot) { + GetSnapshotRequest request = + GetSnapshotRequest.newBuilder() + .setSnapshot(snapshot == null ? null : snapshot.toString()) + .build(); + return getSnapshot(request); + } """ PACKAGE = 'package com.google.cloud.pubsub.v1;' IMPORT_PROJECT_TOPIC_NAME = 'import com.google.pubsub.v1.ProjectTopicName;' +IMPORT_PROJECT_SUBSCRIPTION_NAME = 'import com.google.pubsub.v1.ProjectSubscriptionName;' +IMPORT_PROJECT_SNAPSHOT_NAME = 'import com.google.pubsub.v1.ProjectSnapshotName;' for library in s.get_staging_dirs(): # put any special-case replacements here @@ -504,10 +1141,64 @@ "\g<1>\n\n" + CREATE_SUBSCRIPTION ) + s.replace( + '**/SubscriptionAdminClient.java', + DELETE_SUBSCRIPTION_PREVIOUS, + "\g<1>\n\n" + DELETE_SUBSCRIPTION + ) + + s.replace( + '**/SubscriptionAdminClient.java', + GET_SUBSCRIPTION_PREVIOUS, + "\g<1>\n\n" + GET_SUBSCRIPTION + ) + + s.replace( + '**/SubscriptionAdminClient.java', + MODIFY_ACK_DEADLINE_PREVIOUS, + "\g<1>\n\n" + MODIFY_ACK_DEADLINE + ) + + s.replace( + '**/SubscriptionAdminClient.java', + ACKNOWLEDGE_PREVIOUS, + "\g<1>\n\n" + ACKNOWLEDGE + ) + + s.replace( + '**/SubscriptionAdminClient.java', + PULL_PREVIOUS, + "\g<1>\n\n" + PULL + ) + + s.replace( + '**/SubscriptionAdminClient.java', + MODIFY_PUSH_CONFIG_PREVIOUS, + "\g<1>\n\n" + MODIFY_PUSH_CONFIG + ) + + s.replace( + '**/SubscriptionAdminClient.java', + CREATE_SNAPSHOT_PREVIOUS, + "\g<1>\n\n" + CREATE_SNAPSHOT + ) + + s.replace( + '**/SubscriptionAdminClient.java', + GET_SNAPSHOT_PREVIOUS, + "\g<1>\n\n" + GET_SNAPSHOT + ) + + s.replace( + '**/SubscriptionAdminClient.java', + DELETE_SNAPSHOT_PREVIOUS, + "\g<1>\n\n" + DELETE_SNAPSHOT + ) + s.replace( '**/*AdminClient.java', PACKAGE, - PACKAGE + '\n\n' + IMPORT_PROJECT_TOPIC_NAME + '\n' + PACKAGE + '\n\n' + IMPORT_PROJECT_TOPIC_NAME + '\n' + IMPORT_PROJECT_SUBSCRIPTION_NAME + '\n' + IMPORT_PROJECT_SNAPSHOT_NAME + '\n' ) s.move(library) From ff64f76da6d9c2499ee843255e8e7e68128a82cd Mon Sep 17 00:00:00 2001 From: Tianzi Cai Date: Wed, 1 Dec 2021 14:36:44 -0500 Subject: [PATCH 24/28] samples: use LinkedHashMap for ordered publish (#938) * samples: use LinkedHashMap for ordered publish * also update resume publish sample --- .../src/main/java/pubsub/PublishWithOrderingKeys.java | 4 ++-- .../src/main/java/pubsub/ResumePublishWithOrderingKeys.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java index d199e7ff8..e1509db5a 100644 --- a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java +++ b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java @@ -27,7 +27,7 @@ import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.TopicName; import java.io.IOException; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -54,7 +54,7 @@ public static void publishWithOrderingKeysExample(String projectId, String topic .build(); try { - Map messages = new HashMap(); + Map messages = new LinkedHashMap(); messages.put("message1", "key1"); messages.put("message2", "key2"); messages.put("message3", "key1"); diff --git a/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java b/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java index 06489637d..ce5e91754 100644 --- a/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java +++ b/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java @@ -27,7 +27,7 @@ import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.TopicName; import java.io.IOException; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -52,7 +52,7 @@ public static void resumePublishWithOrderingKeysExample(String projectId, String .build(); try { - Map messages = new HashMap(); + Map messages = new LinkedHashMap(); messages.put("message1", "key1"); messages.put("message2", "key2"); messages.put("message3", "key1"); From 44cdcf5d3f1815654b9b255c1096e290a7db9030 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Dec 2021 17:06:29 +0100 Subject: [PATCH 25/28] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 (#942) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.5.0` -> `2.5.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/compatibility-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/confidence-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​251-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare250v251-2021-12-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.5.0...v2.5.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3205a02aa..b225e6d12 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.5.0 + 2.5.1 pom import From 41f881b2d075f9ee730f5eaf24885146d9fadccf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Dec 2021 21:16:24 +0100 Subject: [PATCH 26/28] deps: update dependency com.google.cloud:google-cloud-core to v2.3.2 (#941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.3.1` -> `2.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.2/compatibility-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.2/confidence-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-core ### [`v2.3.2`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#​232-httpswwwgithubcomgoogleapisjava-corecomparev231v232-2021-12-02) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.3.1...v2.3.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index dd12c7f48..a0b977b9e 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.3.1 + 2.3.2 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index e85f5a995..06653bfec 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.3.1 + 2.3.2 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index e39780f6f..04f4002bf 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-core - 2.3.1 + 2.3.2 tests From df3a5fecd4d87ae79cba312109242146b84f9e55 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 5 Dec 2021 06:30:23 +0100 Subject: [PATCH 27/28] deps: update dependency com.google.cloud:google-cloud-core to v2.3.3 (#943) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.3.2` -> `2.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.3/compatibility-slim/2.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.3.3/confidence-slim/2.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-core ### [`v2.3.3`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#​233-httpswwwgithubcomgoogleapisjava-corecomparev232v233-2021-12-02) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.3.2...v2.3.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index a0b977b9e..90237c256 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.3.2 + 2.3.3 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 06653bfec..3c1cfeabf 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.3.2 + 2.3.3 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 04f4002bf..e93ed15c9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-core - 2.3.2 + 2.3.3 tests From cf45b2ea68af95ee9923cb8a7639b6e18bcb804e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 16:40:13 +0000 Subject: [PATCH 28/28] chore: release 1.115.0 (#889) :robot: I have created a release \*beep\* \*boop\* --- ## [1.115.0](https://www.github.com/googleapis/java-pubsub/compare/v1.114.7...v1.115.0) (2021-12-05) ### Features * creating java backport ([#895](https://www.github.com/googleapis/java-pubsub/issues/895)) ([51b01e2](https://www.github.com/googleapis/java-pubsub/commit/51b01e254a4be87a8a779fbc5da697c70920d82f)) ### Bug Fixes * **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-pubsub/issues/1266)) ([#888](https://www.github.com/googleapis/java-pubsub/issues/888)) ([ed3ae2f](https://www.github.com/googleapis/java-pubsub/commit/ed3ae2fb0a0c72073f6bae5dc4111424740fd883)) ### Dependencies * update dependency com.google.cloud:google-cloud-core to v2.3.0 ([#913](https://www.github.com/googleapis/java-pubsub/issues/913)) ([adfd456](https://www.github.com/googleapis/java-pubsub/commit/adfd4562a8041d71af65cd98cf1d17b881e35dd3)) * update dependency com.google.cloud:google-cloud-core to v2.3.1 ([#927](https://www.github.com/googleapis/java-pubsub/issues/927)) ([9fcc996](https://www.github.com/googleapis/java-pubsub/commit/9fcc9965284f6a57dc79f31eb96a2e430cef72e4)) * update dependency com.google.cloud:google-cloud-core to v2.3.2 ([#941](https://www.github.com/googleapis/java-pubsub/issues/941)) ([41f881b](https://www.github.com/googleapis/java-pubsub/commit/41f881b2d075f9ee730f5eaf24885146d9fadccf)) * update dependency com.google.cloud:google-cloud-core to v2.3.3 ([#943](https://www.github.com/googleapis/java-pubsub/issues/943)) ([df3a5fe](https://www.github.com/googleapis/java-pubsub/commit/df3a5fecd4d87ae79cba312109242146b84f9e55)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#919](https://www.github.com/googleapis/java-pubsub/issues/919)) ([4adf335](https://www.github.com/googleapis/java-pubsub/commit/4adf335b78ce6b13af22c3c3a64c4ea1a24f05cd)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#942](https://www.github.com/googleapis/java-pubsub/issues/942)) ([44cdcf5](https://www.github.com/googleapis/java-pubsub/commit/44cdcf5d3f1815654b9b255c1096e290a7db9030)) * update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#901](https://www.github.com/googleapis/java-pubsub/issues/901)) ([8733144](https://www.github.com/googleapis/java-pubsub/commit/8733144854aaebfec0cd5f03ab14d820c6d22c0e)) * update dependency com.google.protobuf:protobuf-java-util to v3.19.1 ([#885](https://www.github.com/googleapis/java-pubsub/issues/885)) ([d0a02a9](https://www.github.com/googleapis/java-pubsub/commit/d0a02a9f320b254a3e4ef60bfff47a6bb3a2427f)) * update dependency org.apache.avro:avro to v1.11.0 ([#894](https://www.github.com/googleapis/java-pubsub/issues/894)) ([b7ba1a8](https://www.github.com/googleapis/java-pubsub/commit/b7ba1a871c4c26f50d87b41c2627b6e6aef63b3c)) * update gson to 2.8.9 ([ec97e93](https://www.github.com/googleapis/java-pubsub/commit/ec97e93ae53666d5c5cad71821f12cefa4fbaf2e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ google-cloud-pubsub-bom/pom.xml | 8 ++++---- google-cloud-pubsub/pom.xml | 4 ++-- grpc-google-cloud-pubsub-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-pubsub-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 8 files changed, 44 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 844c15108..56f92b58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [1.115.0](https://www.github.com/googleapis/java-pubsub/compare/v1.114.7...v1.115.0) (2021-12-05) + + +### Features + +* creating java backport ([#895](https://www.github.com/googleapis/java-pubsub/issues/895)) ([51b01e2](https://www.github.com/googleapis/java-pubsub/commit/51b01e254a4be87a8a779fbc5da697c70920d82f)) + + +### Bug Fixes + +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-pubsub/issues/1266)) ([#888](https://www.github.com/googleapis/java-pubsub/issues/888)) ([ed3ae2f](https://www.github.com/googleapis/java-pubsub/commit/ed3ae2fb0a0c72073f6bae5dc4111424740fd883)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-core to v2.3.0 ([#913](https://www.github.com/googleapis/java-pubsub/issues/913)) ([adfd456](https://www.github.com/googleapis/java-pubsub/commit/adfd4562a8041d71af65cd98cf1d17b881e35dd3)) +* update dependency com.google.cloud:google-cloud-core to v2.3.1 ([#927](https://www.github.com/googleapis/java-pubsub/issues/927)) ([9fcc996](https://www.github.com/googleapis/java-pubsub/commit/9fcc9965284f6a57dc79f31eb96a2e430cef72e4)) +* update dependency com.google.cloud:google-cloud-core to v2.3.2 ([#941](https://www.github.com/googleapis/java-pubsub/issues/941)) ([41f881b](https://www.github.com/googleapis/java-pubsub/commit/41f881b2d075f9ee730f5eaf24885146d9fadccf)) +* update dependency com.google.cloud:google-cloud-core to v2.3.3 ([#943](https://www.github.com/googleapis/java-pubsub/issues/943)) ([df3a5fe](https://www.github.com/googleapis/java-pubsub/commit/df3a5fecd4d87ae79cba312109242146b84f9e55)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#919](https://www.github.com/googleapis/java-pubsub/issues/919)) ([4adf335](https://www.github.com/googleapis/java-pubsub/commit/4adf335b78ce6b13af22c3c3a64c4ea1a24f05cd)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#942](https://www.github.com/googleapis/java-pubsub/issues/942)) ([44cdcf5](https://www.github.com/googleapis/java-pubsub/commit/44cdcf5d3f1815654b9b255c1096e290a7db9030)) +* update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#901](https://www.github.com/googleapis/java-pubsub/issues/901)) ([8733144](https://www.github.com/googleapis/java-pubsub/commit/8733144854aaebfec0cd5f03ab14d820c6d22c0e)) +* update dependency com.google.protobuf:protobuf-java-util to v3.19.1 ([#885](https://www.github.com/googleapis/java-pubsub/issues/885)) ([d0a02a9](https://www.github.com/googleapis/java-pubsub/commit/d0a02a9f320b254a3e4ef60bfff47a6bb3a2427f)) +* update dependency org.apache.avro:avro to v1.11.0 ([#894](https://www.github.com/googleapis/java-pubsub/issues/894)) ([b7ba1a8](https://www.github.com/googleapis/java-pubsub/commit/b7ba1a871c4c26f50d87b41c2627b6e6aef63b3c)) +* update gson to 2.8.9 ([ec97e93](https://www.github.com/googleapis/java-pubsub/commit/ec97e93ae53666d5c5cad71821f12cefa4fbaf2e)) + ### [1.114.7](https://www.github.com/googleapis/java-pubsub/compare/v1.114.6...v1.114.7) (2021-10-19) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 2519a0eb6..ced5ea112 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.114.8-SNAPSHOT + 1.115.0 pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.114.8-SNAPSHOT + 1.115.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index a0b0644ff..7b79ff876 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.114.8-SNAPSHOT + 1.115.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.114.8-SNAPSHOT + 1.115.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index e61f7eb21..068478a89 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.114.8-SNAPSHOT + 1.115.0 diff --git a/pom.xml b/pom.xml index b225e6d12..eb90896c0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.114.8-SNAPSHOT + 1.115.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 com.google.cloud google-cloud-pubsub - 1.114.8-SNAPSHOT + 1.115.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 0a92c26a4..3d94f06a8 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.96.8-SNAPSHOT + 1.97.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.114.8-SNAPSHOT + 1.115.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 3c1cfeabf..d6ba900f6 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.114.8-SNAPSHOT + 1.115.0 diff --git a/versions.txt b/versions.txt index fab6b0810..75deb1c0a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.114.7:1.114.8-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT -proto-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT +google-cloud-pubsub:1.115.0:1.115.0 +grpc-google-cloud-pubsub-v1:1.97.0:1.97.0 +proto-google-cloud-pubsub-v1:1.97.0:1.97.0