From bf316caa67b0e475d8d2148ea5d09d3e9cac3693 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 9 Mar 2020 09:25:20 -0700 Subject: [PATCH 01/16] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. (#101) --- .../main/java/com/google/pubsub/v1/DeletedTopic.java | 7 +------ .../java/com/google/pubsub/v1/ProjectTopicName.java | 7 +------ synth.metadata | 12 ++++++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java index a0b52bae5..b32fcbfc0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java @@ -19,13 +19,8 @@ import com.google.common.collect.ImmutableMap; import java.util.Map; -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated public class DeletedTopic extends TopicName { private static final String FIXED_VALUE = "_deleted-topic_"; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java index fb6494ee0..9549f7c65 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java @@ -23,13 +23,8 @@ import java.util.List; import java.util.Map; -/** - * AUTO-GENERATED DOCUMENTATION AND CLASS - * - * @deprecated This resource name class will be removed in the next major version. - */ +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -@Deprecated public class ProjectTopicName extends TopicName { private static final PathTemplate PATH_TEMPLATE = diff --git a/synth.metadata b/synth.metadata index 5a78620ad..4c204715a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-02-27T19:30:38.568868Z", + "updateTime": "2020-03-02T23:00:50.055052Z", "sources": [ { "generator": { "name": "artman", - "version": "0.46.0", - "dockerImage": "googleapis/artman@sha256:6248a21fba8f0d618c3b032669cec2618e684b66922bb70391fe08c41b05f6ee" + "version": "0.47.0", + "dockerImage": "googleapis/artman@sha256:b3e50d6b8de03920b9f065bbc3d210e2ca93a043446f1fa16cdf567393c09678" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1a2b05cc3541a5f7714529c665aecc3ea042c646", - "internalRef": "297570622", - "log": "1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\n" + "sha": "244ab2b83a82076a1fa7be63b7e0671af73f5c02", + "internalRef": "298455048", + "log": "244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n" } }, { From 7a54bc48360f15a946e23bbf69e654d09658f13b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2020 10:35:50 -0400 Subject: [PATCH 02/16] chore: release 1.103.2-SNAPSHOT (#103) * updated versions.txt [ci skip] * updated google-cloud-pubsub-bom/pom.xml [ci skip] * updated google-cloud-pubsub/pom.xml [ci skip] * updated grpc-google-cloud-pubsub-v1/pom.xml [ci skip] * updated pom.xml [ci skip] * updated proto-google-cloud-pubsub-v1/pom.xml [ci skip] Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- 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 ++-- versions.txt | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 166b656a7..34c71afea 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.103.1 + 1.103.2-SNAPSHOT pom com.google.cloud @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.85.1 + 1.85.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.85.1 + 1.85.2-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.103.1 + 1.103.2-SNAPSHOT diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 4a4665b99..aa9fe12e3 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.103.1 + 1.103.2-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.103.1 + 1.103.2-SNAPSHOT google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 413d1bf6b..ea132fef3 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.85.1 + 1.85.2-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.103.1 + 1.103.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index dbef5a7f7..aa9acb08c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.103.1 + 1.103.2-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -86,17 +86,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.85.1 + 1.85.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.85.1 + 1.85.2-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.103.1 + 1.103.2-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index f64d20a95..ec3696952 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.85.1 + 1.85.2-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.103.1 + 1.103.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 69ee70174..0b31de2c3 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-pubsub-v1:1.85.1:1.85.1 -grpc-google-cloud-pubsub-v1:1.85.1:1.85.1 -google-cloud-pubsub:1.103.1:1.103.1 \ No newline at end of file +proto-google-cloud-pubsub-v1:1.85.1:1.85.2-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.85.1:1.85.2-SNAPSHOT +google-cloud-pubsub:1.103.1:1.103.2-SNAPSHOT \ No newline at end of file From 8d4b27a2c5cfe31b7b3c2f372922c50be18ca9d5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 Mar 2020 16:11:17 +0100 Subject: [PATCH 03/16] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.2.0 (#109) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-javadoc-plugin | minor | `3.1.1` -> `3.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-pubsub). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aa9acb08c..8a60469d0 100644 --- a/pom.xml +++ b/pom.xml @@ -266,7 +266,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 html From 0e366c35580116fcd6aa40caadedd95be07bdd87 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Mar 2020 18:02:07 -0700 Subject: [PATCH 04/16] fix: Re-generated to pick up changes in the API or client library generator. (#104) --- .../pubsub/v1/SubscriptionAdminClient.java | 20 +- .../google/pubsub/v1/AcknowledgeRequest.java | 65 +-- .../v1/AcknowledgeRequestOrBuilder.java | 20 +- .../pubsub/v1/CreateSnapshotRequest.java | 56 +-- .../v1/CreateSnapshotRequestOrBuilder.java | 16 +- .../pubsub/v1/ListTopicSnapshotsRequest.java | 42 +- .../ListTopicSnapshotsRequestOrBuilder.java | 12 +- .../pubsub/v1/ModifyAckDeadlineRequest.java | 32 +- .../v1/ModifyAckDeadlineRequestOrBuilder.java | 8 +- .../com/google/pubsub/v1/PubsubProto.java | 437 +++++++++--------- .../com/google/pubsub/v1/PullRequest.java | 79 ++-- .../pubsub/v1/PullRequestOrBuilder.java | 19 +- .../pubsub/v1/StreamingPullRequest.java | 44 +- .../v1/StreamingPullRequestOrBuilder.java | 12 +- .../com/google/pubsub/v1/Subscription.java | 49 +- .../pubsub/v1/SubscriptionOrBuilder.java | 14 +- .../google/pubsub/v1/UpdateTopicRequest.java | 48 +- .../v1/UpdateTopicRequestOrBuilder.java | 12 +- .../main/proto/google/pubsub/v1/pubsub.proto | 164 +++---- synth.metadata | 12 +- 20 files changed, 612 insertions(+), 549 deletions(-) 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 20d06d3d9..b5c7b51c7 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 @@ -1071,10 +1071,12 @@ public final UnaryCallable deleteSubscriptionC * * @param subscription Required. The subscription from which messages should be pulled. Format is * `projects/{project}/subscriptions/{sub}`. - * @param returnImmediately 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. + * @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 @@ -1108,10 +1110,12 @@ public final UnaryCallable deleteSubscriptionC * * @param subscription Required. The subscription from which messages should be pulled. Format is * `projects/{project}/subscriptions/{sub}`. - * @param returnImmediately 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. + * @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 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 abfe740a5..e29a1fcca 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 @@ -185,8 +185,9 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -200,8 +201,9 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -215,8 +217,9 @@ public int getAckIdsCount() { * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -231,8 +234,9 @@ public java.lang.String getAckIds(int index) { * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -729,8 +733,9 @@ private void ensureAckIdsIsMutable() { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -744,8 +749,9 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -759,8 +765,9 @@ public int getAckIdsCount() { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -775,8 +782,9 @@ public java.lang.String getAckIds(int index) { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -791,8 +799,9 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -814,8 +823,9 @@ public Builder setAckIds(int index, java.lang.String value) { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -836,8 +846,9 @@ public Builder addAckIds(java.lang.String value) { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -855,8 +866,9 @@ public Builder addAllAckIds(java.lang.Iterable values) { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -873,8 +885,9 @@ public Builder clearAckIds() { * * *
-     * 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.
+     * 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.
      * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java index 294551012..4951b0bb1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java @@ -58,8 +58,9 @@ public interface AcknowledgeRequestOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -71,8 +72,9 @@ public interface AcknowledgeRequestOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -84,8 +86,9 @@ public interface AcknowledgeRequestOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -98,8 +101,9 @@ public interface AcknowledgeRequestOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED]; 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 ae660b8f1..9c6e4bd87 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 @@ -150,10 +150,10 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * *
-   * 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
+   * 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}`.
    * 
@@ -179,10 +179,10 @@ public java.lang.String getName() { * * *
-   * 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
+   * 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}`.
    * 
@@ -750,10 +750,10 @@ public Builder mergeFrom( * * *
-     * 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
+     * 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}`.
      * 
@@ -779,10 +779,10 @@ public java.lang.String getName() { * * *
-     * 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
+     * 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}`.
      * 
@@ -808,10 +808,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * 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
+     * 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}`.
      * 
@@ -836,10 +836,10 @@ public Builder setName(java.lang.String value) { * * *
-     * 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
+     * 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}`.
      * 
@@ -860,10 +860,10 @@ public Builder clearName() { * * *
-     * 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
+     * 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}`.
      * 
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java index ab50a6f1b..b8e0ef2f9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface CreateSnapshotRequestOrBuilder * * *
-   * 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
+   * 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}`.
    * 
@@ -46,10 +46,10 @@ public interface CreateSnapshotRequestOrBuilder * * *
-   * 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
+   * 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}`.
    * 
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 353db1071..5e59b993c 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 @@ -130,11 +130,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the topic that snapshots are attached to.
+   * Required. The name of the topic that snapshots are attached to.
    * Format is `projects/{project}/topics/{topic}`.
    * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -153,11 +155,13 @@ public java.lang.String getTopic() { * * *
-   * The name of the topic that snapshots are attached to.
+   * Required. The name of the topic that snapshots are attached to.
    * Format is `projects/{project}/topics/{topic}`.
    * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -593,11 +597,13 @@ public Builder mergeFrom( * * *
-     * The name of the topic that snapshots are attached to.
+     * Required. The name of the topic that snapshots are attached to.
      * Format is `projects/{project}/topics/{topic}`.
      * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -616,11 +622,13 @@ public java.lang.String getTopic() { * * *
-     * The name of the topic that snapshots are attached to.
+     * Required. The name of the topic that snapshots are attached to.
      * Format is `projects/{project}/topics/{topic}`.
      * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -639,11 +647,13 @@ public com.google.protobuf.ByteString getTopicBytes() { * * *
-     * The name of the topic that snapshots are attached to.
+     * Required. The name of the topic that snapshots are attached to.
      * Format is `projects/{project}/topics/{topic}`.
      * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The topic to set. * @return This builder for chaining. @@ -661,11 +671,13 @@ public Builder setTopic(java.lang.String value) { * * *
-     * The name of the topic that snapshots are attached to.
+     * Required. The name of the topic that snapshots are attached to.
      * Format is `projects/{project}/topics/{topic}`.
      * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -679,11 +691,13 @@ public Builder clearTopic() { * * *
-     * The name of the topic that snapshots are attached to.
+     * Required. The name of the topic that snapshots are attached to.
      * Format is `projects/{project}/topics/{topic}`.
      * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for topic to set. * @return This builder for chaining. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java index 484ea34c2..3e3382705 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface ListTopicSnapshotsRequestOrBuilder * * *
-   * The name of the topic that snapshots are attached to.
+   * Required. The name of the topic that snapshots are attached to.
    * Format is `projects/{project}/topics/{topic}`.
    * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -40,11 +42,13 @@ public interface ListTopicSnapshotsRequestOrBuilder * * *
-   * The name of the topic that snapshots are attached to.
+   * Required. The name of the topic that snapshots are attached to.
    * Format is `projects/{project}/topics/{topic}`.
    * 
* - * string topic = 1; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ 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 c2a92e215..76bbfe4b6 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 @@ -251,10 +251,10 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { * * *
-   * 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
+   * 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.
@@ -930,10 +930,10 @@ public Builder addAckIdsBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * 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
+     * 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.
@@ -951,10 +951,10 @@ public int getAckDeadlineSeconds() {
      *
      *
      * 
-     * 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
+     * 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.
@@ -976,10 +976,10 @@ public Builder setAckDeadlineSeconds(int value) {
      *
      *
      * 
-     * 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
+     * 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.
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java
index eacaf0964..663ca36d9 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java
@@ -109,10 +109,10 @@ public interface ModifyAckDeadlineRequestOrBuilder
    *
    *
    * 
-   * 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
+   * 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.
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
index 9320aa828..44f66abf3 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
@@ -225,13 +225,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
   static {
     java.lang.String[] descriptorData = {
       "\n\035google/pubsub/v1/pubsub.proto\022\020google."
-          + "pubsub.v1\032\027google/api/client.proto\032\037goog"
-          + "le/api/field_behavior.proto\032\031google/api/"
-          + "resource.proto\032\036google/protobuf/duration"
-          + ".proto\032\033google/protobuf/empty.proto\032 goo"
-          + "gle/protobuf/field_mask.proto\032\037google/pr"
-          + "otobuf/timestamp.proto\032\034google/api/annot"
-          + "ations.proto\";\n\024MessageStoragePolicy\022#\n\033"
+          + "pubsub.v1\032\034google/api/annotations.proto\032"
+          + "\027google/api/client.proto\032\037google/api/fie"
+          + "ld_behavior.proto\032\031google/api/resource.p"
+          + "roto\032\036google/protobuf/duration.proto\032\033go"
+          + "ogle/protobuf/empty.proto\032 google/protob"
+          + "uf/field_mask.proto\032\037google/protobuf/tim"
+          + "estamp.proto\";\n\024MessageStoragePolicy\022#\n\033"
           + "allowed_persistence_regions\030\001 \003(\t\"\262\002\n\005To"
           + "pic\022\021\n\004name\030\001 \001(\tB\003\340A\002\0223\n\006labels\030\002 \003(\0132#"
           + ".google.pubsub.v1.Topic.LabelsEntry\022F\n\026m"
@@ -267,221 +267,223 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "n\030\003 \001(\t\"y\n\036ListTopicSubscriptionsRespons"
           + "e\022>\n\rsubscriptions\030\001 \003(\tB\'\372A$\n\"pubsub.go"
           + "ogleapis.com/Subscription\022\027\n\017next_page_t"
-          + "oken\030\002 \001(\t\"Q\n\031ListTopicSnapshotsRequest\022"
-          + "\r\n\005topic\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag"
-          + "e_token\030\003 \001(\t\"H\n\032ListTopicSnapshotsRespo"
-          + "nse\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_toke"
-          + "n\030\002 \001(\t\"H\n\022DeleteTopicRequest\0222\n\005topic\030\001"
-          + " \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topi"
-          + "c\"\351\004\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n"
-          + "\005topic\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis."
-          + "com/Topic\0221\n\013push_config\030\004 \001(\0132\034.google."
-          + "pubsub.v1.PushConfig\022\034\n\024ack_deadline_sec"
-          + "onds\030\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001("
-          + "\010\022=\n\032message_retention_duration\030\010 \001(\0132\031."
-          + "google.protobuf.Duration\022:\n\006labels\030\t \003(\013"
-          + "2*.google.pubsub.v1.Subscription.LabelsE"
-          + "ntry\022\037\n\027enable_message_ordering\030\n \001(\010\022=\n"
-          + "\021expiration_policy\030\013 \001(\0132\".google.pubsub"
-          + ".v1.ExpirationPolicy\022>\n\022dead_letter_poli"
-          + "cy\030\r \001(\0132\".google.pubsub.v1.DeadLetterPo"
-          + "licy\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu"
-          + "e\030\002 \001(\t:\0028\001:X\352AU\n\"pubsub.googleapis.com/"
-          + "Subscription\022/projects/{project}/subscri"
-          + "ptions/{subscription}\"L\n\020DeadLetterPolic"
-          + "y\022\031\n\021dead_letter_topic\030\001 \001(\t\022\035\n\025max_deli"
-          + "very_attempts\030\002 \001(\005\":\n\020ExpirationPolicy\022"
-          + "&\n\003ttl\030\001 \001(\0132\031.google.protobuf.Duration\""
-          + "\255\002\n\nPushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n"
-          + "\nattributes\030\002 \003(\0132,.google.pubsub.v1.Pus"
-          + "hConfig.AttributesEntry\022<\n\noidc_token\030\003 "
-          + "\001(\0132&.google.pubsub.v1.PushConfig.OidcTo"
-          + "kenH\000\032<\n\tOidcToken\022\035\n\025service_account_em"
-          + "ail\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t\0321\n\017Attribute"
-          + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027"
-          + "\n\025authentication_method\"m\n\017ReceivedMessa"
-          + "ge\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 \001(\0132\037.go"
-          + "ogle.pubsub.v1.PubsubMessage\022\030\n\020delivery"
-          + "_attempt\030\003 \001(\005\"Z\n\026GetSubscriptionRequest"
-          + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g"
-          + "oogleapis.com/Subscription\"\214\001\n\031UpdateSub"
-          + "scriptionRequest\0229\n\014subscription\030\001 \001(\0132\036"
-          + ".google.pubsub.v1.SubscriptionB\003\340A\002\0224\n\013u"
-          + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field"
-          + "MaskB\003\340A\002\"\207\001\n\030ListSubscriptionsRequest\022D"
-          + "\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcema"
-          + "nager.googleapis.com/Project\022\021\n\tpage_siz"
-          + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031ListSubsc"
-          + "riptionsResponse\0225\n\rsubscriptions\030\001 \003(\0132"
-          + "\036.google.pubsub.v1.Subscription\022\027\n\017next_"
-          + "page_token\030\002 \001(\t\"]\n\031DeleteSubscriptionRe"
-          + "quest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pub"
-          + "sub.googleapis.com/Subscription\"\223\001\n\027Modi"
-          + "fyPushConfigRequest\022@\n\014subscription\030\001 \001("
-          + "\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscri"
-          + "ption\0226\n\013push_config\030\002 \001(\0132\034.google.pubs"
-          + "ub.v1.PushConfigB\003\340A\002\"\206\001\n\013PullRequest\022@\n"
+          + "oken\030\002 \001(\t\"v\n\031ListTopicSnapshotsRequest\022"
+          + "2\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapi"
+          + "s.com/Topic\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t"
+          + "oken\030\003 \001(\t\"H\n\032ListTopicSnapshotsResponse"
+          + "\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_token\030\002"
+          + " \001(\t\"H\n\022DeleteTopicRequest\0222\n\005topic\030\001 \001("
+          + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"\351"
+          + "\004\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005to"
+          + "pic\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com"
+          + "/Topic\0221\n\013push_config\030\004 \001(\0132\034.google.pub"
+          + "sub.v1.PushConfig\022\034\n\024ack_deadline_second"
+          + "s\030\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022="
+          + "\n\032message_retention_duration\030\010 \001(\0132\031.goo"
+          + "gle.protobuf.Duration\022:\n\006labels\030\t \003(\0132*."
+          + "google.pubsub.v1.Subscription.LabelsEntr"
+          + "y\022\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021ex"
+          + "piration_policy\030\013 \001(\0132\".google.pubsub.v1"
+          + ".ExpirationPolicy\022>\n\022dead_letter_policy\030"
+          + "\r \001(\0132\".google.pubsub.v1.DeadLetterPolic"
+          + "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002"
+          + " \001(\t:\0028\001:X\352AU\n\"pubsub.googleapis.com/Sub"
+          + "scription\022/projects/{project}/subscripti"
+          + "ons/{subscription}\"L\n\020DeadLetterPolicy\022\031"
+          + "\n\021dead_letter_topic\030\001 \001(\t\022\035\n\025max_deliver"
+          + "y_attempts\030\002 \001(\005\":\n\020ExpirationPolicy\022&\n\003"
+          + "ttl\030\001 \001(\0132\031.google.protobuf.Duration\"\255\002\n"
+          + "\nPushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nat"
+          + "tributes\030\002 \003(\0132,.google.pubsub.v1.PushCo"
+          + "nfig.AttributesEntry\022<\n\noidc_token\030\003 \001(\013"
+          + "2&.google.pubsub.v1.PushConfig.OidcToken"
+          + "H\000\032<\n\tOidcToken\022\035\n\025service_account_email"
+          + "\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t\0321\n\017AttributesEn"
+          + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025a"
+          + "uthentication_method\"m\n\017ReceivedMessage\022"
+          + "\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 \001(\0132\037.googl"
+          + "e.pubsub.v1.PubsubMessage\022\030\n\020delivery_at"
+          + "tempt\030\003 \001(\005\"Z\n\026GetSubscriptionRequest\022@\n"
           + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog"
-          + "leapis.com/Subscription\022\032\n\022return_immedi"
-          + "ately\030\002 \001(\010\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"L"
-          + "\n\014PullResponse\022<\n\021received_messages\030\001 \003("
-          + "\0132!.google.pubsub.v1.ReceivedMessage\"\225\001\n"
-          + "\030ModifyAckDeadlineRequest\022@\n\014subscriptio"
-          + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S"
-          + "ubscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack"
-          + "_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022Acknowle"
-          + "dgeRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$"
-          + "\n\"pubsub.googleapis.com/Subscription\022\024\n\007"
-          + "ack_ids\030\002 \003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequ"
-          + "est\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsu"
-          + "b.googleapis.com/Subscription\022\017\n\007ack_ids"
-          + "\030\002 \003(\t\022\037\n\027modify_deadline_seconds\030\003 \003(\005\022"
-          + "\037\n\027modify_deadline_ack_ids\030\004 \003(\t\022(\n\033stre"
-          + "am_ack_deadline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tcl"
-          + "ient_id\030\006 \001(\t\"U\n\025StreamingPullResponse\022<"
-          + "\n\021received_messages\030\001 \003(\0132!.google.pubsu"
-          + "b.v1.ReceivedMessage\"\203\002\n\025CreateSnapshotR"
-          + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.goo"
-          + "gleapis.com/Snapshot\022@\n\014subscription\030\002 \001"
-          + "(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscr"
-          + "iption\022C\n\006labels\030\003 \003(\01323.google.pubsub.v"
-          + "1.CreateSnapshotRequest.LabelsEntry\032-\n\013L"
-          + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
-          + "8\001\"\200\001\n\025UpdateSnapshotRequest\0221\n\010snapshot"
-          + "\030\001 \001(\0132\032.google.pubsub.v1.SnapshotB\003\340A\002\022"
-          + "4\n\013update_mask\030\002 \001(\0132\032.google.protobuf.F"
-          + "ieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t"
-          + "\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.googleapis."
-          + "com/Topic\022/\n\013expire_time\030\003 \001(\0132\032.google."
-          + "protobuf.Timestamp\0226\n\006labels\030\004 \003(\0132&.goo"
-          + "gle.pubsub.v1.Snapshot.LabelsEntry\032-\n\013La"
-          + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
-          + "\001:L\352AI\n\036pubsub.googleapis.com/Snapshot\022\'"
-          + "projects/{project}/snapshots/{snapshot}\""
-          + "N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB"
-          + "&\340A\002\372A \n\036pubsub.googleapis.com/Snapshot\""
-          + "\203\001\n\024ListSnapshotsRequest\022D\n\007project\030\001 \001("
-          + "\tB3\340A\002\372A-\n+cloudresourcemanager.googleap"
-          + "is.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag"
-          + "e_token\030\003 \001(\t\"_\n\025ListSnapshotsResponse\022-"
-          + "\n\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1.Sna"
-          + "pshot\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\025Delete"
-          + "SnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A"
-          + " \n\036pubsub.googleapis.com/Snapshot\"\276\001\n\013Se"
-          + "ekRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n"
-          + "\"pubsub.googleapis.com/Subscription\022*\n\004t"
-          + "ime\030\002 \001(\0132\032.google.protobuf.TimestampH\000\022"
-          + "7\n\010snapshot\030\003 \001(\tB#\372A \n\036pubsub.googleapi"
-          + "s.com/SnapshotH\000B\010\n\006target\"\016\n\014SeekRespon"
-          + "se2\353\t\n\tPublisher\022q\n\013CreateTopic\022\027.google"
-          + ".pubsub.v1.Topic\032\027.google.pubsub.v1.Topi"
-          + "c\"0\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/*"
-          + "}:\001*\332A\004name\022}\n\013UpdateTopic\022$.google.pubs"
-          + "ub.v1.UpdateTopicRequest\032\027.google.pubsub"
-          + ".v1.Topic\"/\202\323\344\223\002)2$/v1/{topic.name=proje"
-          + "cts/*/topics/*}:\001*\022\223\001\n\007Publish\022 .google."
-          + "pubsub.v1.PublishRequest\032!.google.pubsub"
-          + ".v1.PublishResponse\"C\202\323\344\223\002,\"\'/v1/{topic="
-          + "projects/*/topics/*}:publish:\001*\332A\016topic,"
-          + "messages\022w\n\010GetTopic\022!.google.pubsub.v1."
-          + "GetTopicRequest\032\027.google.pubsub.v1.Topic"
-          + "\"/\202\323\344\223\002!\022\037/v1/{topic=projects/*/topics/*"
-          + "}\332A\005topic\022\212\001\n\nListTopics\022#.google.pubsub"
-          + ".v1.ListTopicsRequest\032$.google.pubsub.v1"
-          + ".ListTopicsResponse\"1\202\323\344\223\002!\022\037/v1/{projec"
-          + "t=projects/*}/topics\332A\007project\022\272\001\n\026ListT"
-          + "opicSubscriptions\022/.google.pubsub.v1.Lis"
-          + "tTopicSubscriptionsRequest\0320.google.pubs"
-          + "ub.v1.ListTopicSubscriptionsResponse\"=\202\323"
-          + "\344\223\002/\022-/v1/{topic=projects/*/topics/*}/su"
-          + "bscriptions\332A\005topic\022\242\001\n\022ListTopicSnapsho"
-          + "ts\022+.google.pubsub.v1.ListTopicSnapshots"
-          + "Request\032,.google.pubsub.v1.ListTopicSnap"
-          + "shotsResponse\"1\202\323\344\223\002+\022)/v1/{topic=projec"
-          + "ts/*/topics/*}/snapshots\022|\n\013DeleteTopic\022"
-          + "$.google.pubsub.v1.DeleteTopicRequest\032\026."
-          + "google.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topi"
-          + "c=projects/*/topics/*}\332A\005topic\032p\312A\025pubsu"
-          + "b.googleapis.com\322AUhttps://www.googleapi"
-          + "s.com/auth/cloud-platform,https://www.go"
-          + "ogleapis.com/auth/pubsub2\367\024\n\nSubscriber\022"
-          + "\264\001\n\022CreateSubscription\022\036.google.pubsub.v"
-          + "1.Subscription\032\036.google.pubsub.v1.Subscr"
-          + "iption\"^\202\323\344\223\002*\032%/v1/{name=projects/*/sub"
-          + "scriptions/*}:\001*\332A+name,topic,push_confi"
-          + "g,ack_deadline_seconds\022\241\001\n\017GetSubscripti"
-          + "on\022(.google.pubsub.v1.GetSubscriptionReq"
-          + "uest\032\036.google.pubsub.v1.Subscription\"D\202\323"
-          + "\344\223\002/\022-/v1/{subscription=projects/*/subsc"
-          + "riptions/*}\332A\014subscription\022\240\001\n\022UpdateSub"
-          + "scription\022+.google.pubsub.v1.UpdateSubsc"
-          + "riptionRequest\032\036.google.pubsub.v1.Subscr"
-          + "iption\"=\202\323\344\223\002722/v1/{subscription.name=p"
-          + "rojects/*/subscriptions/*}:\001*\022\246\001\n\021ListSu"
-          + "bscriptions\022*.google.pubsub.v1.ListSubsc"
-          + "riptionsRequest\032+.google.pubsub.v1.ListS"
-          + "ubscriptionsResponse\"8\202\323\344\223\002(\022&/v1/{proje"
-          + "ct=projects/*}/subscriptions\332A\007project\022\237"
-          + "\001\n\022DeleteSubscription\022+.google.pubsub.v1"
-          + ".DeleteSubscriptionRequest\032\026.google.prot"
-          + "obuf.Empty\"D\202\323\344\223\002/*-/v1/{subscription=pr"
-          + "ojects/*/subscriptions/*}\332A\014subscription"
-          + "\022\317\001\n\021ModifyAckDeadline\022*.google.pubsub.v"
-          + "1.ModifyAckDeadlineRequest\032\026.google.prot"
-          + "obuf.Empty\"v\202\323\344\223\002D\"?/v1/{subscription=pr"
-          + "ojects/*/subscriptions/*}:modifyAckDeadl"
-          + "ine:\001*\332A)subscription,ack_ids,ack_deadli"
-          + "ne_seconds\022\250\001\n\013Acknowledge\022$.google.pubs"
-          + "ub.v1.AcknowledgeRequest\032\026.google.protob"
-          + "uf.Empty\"[\202\323\344\223\002>\"9/v1/{subscription=proj"
-          + "ects/*/subscriptions/*}:acknowledge:\001*\332A"
-          + "\024subscription,ack_ids\022\263\001\n\004Pull\022\035.google."
-          + "pubsub.v1.PullRequest\032\036.google.pubsub.v1"
-          + ".PullResponse\"l\202\323\344\223\0027\"2/v1/{subscription"
-          + "=projects/*/subscriptions/*}:pull:\001*\332A,s"
-          + "ubscription,return_immediately,max_messa"
-          + "ges\022f\n\rStreamingPull\022&.google.pubsub.v1."
-          + "StreamingPullRequest\032\'.google.pubsub.v1."
-          + "StreamingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPu"
-          + "shConfig\022).google.pubsub.v1.ModifyPushCo"
-          + "nfigRequest\032\026.google.protobuf.Empty\"d\202\323\344"
-          + "\223\002C\">/v1/{subscription=projects/*/subscr"
-          + "iptions/*}:modifyPushConfig:\001*\332A\030subscri"
-          + "ption,push_config\022~\n\013GetSnapshot\022$.googl"
-          + "e.pubsub.v1.GetSnapshotRequest\032\032.google."
-          + "pubsub.v1.Snapshot\"-\202\323\344\223\002\'\022%/v1/{snapsho"
-          + "t=projects/*/snapshots/*}\022\226\001\n\rListSnapsh"
-          + "ots\022&.google.pubsub.v1.ListSnapshotsRequ"
-          + "est\032\'.google.pubsub.v1.ListSnapshotsResp"
-          + "onse\"4\202\323\344\223\002$\022\"/v1/{project=projects/*}/s"
-          + "napshots\332A\007project\022\227\001\n\016CreateSnapshot\022\'."
-          + "google.pubsub.v1.CreateSnapshotRequest\032\032"
-          + ".google.pubsub.v1.Snapshot\"@\202\323\344\223\002&\032!/v1/"
-          + "{name=projects/*/snapshots/*}:\001*\332A\021name,"
-          + "subscription\022\214\001\n\016UpdateSnapshot\022\'.google"
-          + ".pubsub.v1.UpdateSnapshotRequest\032\032.googl"
-          + "e.pubsub.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snaps"
-          + "hot.name=projects/*/snapshots/*}:\001*\022\213\001\n\016"
-          + "DeleteSnapshot\022\'.google.pubsub.v1.Delete"
-          + "SnapshotRequest\032\026.google.protobuf.Empty\""
-          + "8\202\323\344\223\002\'*%/v1/{snapshot=projects/*/snapsh"
-          + "ots/*}\332A\010snapshot\022\204\001\n\004Seek\022\035.google.pubs"
-          + "ub.v1.SeekRequest\032\036.google.pubsub.v1.See"
-          + "kResponse\"=\202\323\344\223\0027\"2/v1/{subscription=pro"
-          + "jects/*/subscriptions/*}:seek:\001*\032p\312A\025pub"
-          + "sub.googleapis.com\322AUhttps://www.googlea"
-          + "pis.com/auth/cloud-platform,https://www."
-          + "googleapis.com/auth/pubsubB\256\001\n\024com.googl"
-          + "e.pubsub.v1B\013PubsubProtoP\001Z6google.golan"
-          + "g.org/genproto/googleapis/pubsub/v1;pubs"
-          + "ub\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\"
-          + "Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubSub:"
-          + ":V1b\006proto3"
+          + "leapis.com/Subscription\"\214\001\n\031UpdateSubscr"
+          + "iptionRequest\0229\n\014subscription\030\001 \001(\0132\036.go"
+          + "ogle.pubsub.v1.SubscriptionB\003\340A\002\0224\n\013upda"
+          + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas"
+          + "kB\003\340A\002\"\207\001\n\030ListSubscriptionsRequest\022D\n\007p"
+          + "roject\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanag"
+          + "er.googleapis.com/Project\022\021\n\tpage_size\030\002"
+          + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031ListSubscrip"
+          + "tionsResponse\0225\n\rsubscriptions\030\001 \003(\0132\036.g"
+          + "oogle.pubsub.v1.Subscription\022\027\n\017next_pag"
+          + "e_token\030\002 \001(\t\"]\n\031DeleteSubscriptionReque"
+          + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub"
+          + ".googleapis.com/Subscription\"\223\001\n\027ModifyP"
+          + "ushConfigRequest\022@\n\014subscription\030\001 \001(\tB*"
+          + "\340A\002\372A$\n\"pubsub.googleapis.com/Subscripti"
+          + "on\0226\n\013push_config\030\002 \001(\0132\034.google.pubsub."
+          + "v1.PushConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014su"
+          + "bscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googlea"
+          + "pis.com/Subscription\022!\n\022return_immediate"
+          + "ly\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340"
+          + "A\002\"L\n\014PullResponse\022<\n\021received_messages\030"
+          + "\001 \003(\0132!.google.pubsub.v1.ReceivedMessage"
+          + "\"\225\001\n\030ModifyAckDeadlineRequest\022@\n\014subscri"
+          + "ption\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.c"
+          + "om/Subscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n"
+          + "\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022Ackn"
+          + "owledgeRequest\022@\n\014subscription\030\001 \001(\tB*\340A"
+          + "\002\372A$\n\"pubsub.googleapis.com/Subscription"
+          + "\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\350\001\n\024StreamingPull"
+          + "Request\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"p"
+          + "ubsub.googleapis.com/Subscription\022\017\n\007ack"
+          + "_ids\030\002 \003(\t\022\037\n\027modify_deadline_seconds\030\003 "
+          + "\003(\005\022\037\n\027modify_deadline_ack_ids\030\004 \003(\t\022(\n\033"
+          + "stream_ack_deadline_seconds\030\005 \001(\005B\003\340A\002\022\021"
+          + "\n\tclient_id\030\006 \001(\t\"U\n\025StreamingPullRespon"
+          + "se\022<\n\021received_messages\030\001 \003(\0132!.google.p"
+          + "ubsub.v1.ReceivedMessage\"\203\002\n\025CreateSnaps"
+          + "hotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub"
+          + ".googleapis.com/Snapshot\022@\n\014subscription"
+          + "\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su"
+          + "bscription\022C\n\006labels\030\003 \003(\01323.google.pubs"
+          + "ub.v1.CreateSnapshotRequest.LabelsEntry\032"
+          + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
+          + "(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest\0221\n\010snap"
+          + "shot\030\001 \001(\0132\032.google.pubsub.v1.SnapshotB\003"
+          + "\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protob"
+          + "uf.FieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001"
+          + " \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.googlea"
+          + "pis.com/Topic\022/\n\013expire_time\030\003 \001(\0132\032.goo"
+          + "gle.protobuf.Timestamp\0226\n\006labels\030\004 \003(\0132&"
+          + ".google.pubsub.v1.Snapshot.LabelsEntry\032-"
+          + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001("
+          + "\t:\0028\001:L\352AI\n\036pubsub.googleapis.com/Snapsh"
+          + "ot\022\'projects/{project}/snapshots/{snapsh"
+          + "ot}\"N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 "
+          + "\001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snaps"
+          + "hot\"\203\001\n\024ListSnapshotsRequest\022D\n\007project\030"
+          + "\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goog"
+          + "leapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n"
+          + "\npage_token\030\003 \001(\t\"_\n\025ListSnapshotsRespon"
+          + "se\022-\n\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1"
+          + ".Snapshot\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\025De"
+          + "leteSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340"
+          + "A\002\372A \n\036pubsub.googleapis.com/Snapshot\"\276\001"
+          + "\n\013SeekRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002"
+          + "\372A$\n\"pubsub.googleapis.com/Subscription\022"
+          + "*\n\004time\030\002 \001(\0132\032.google.protobuf.Timestam"
+          + "pH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036pubsub.googl"
+          + "eapis.com/SnapshotH\000B\010\n\006target\"\016\n\014SeekRe"
+          + "sponse2\363\t\n\tPublisher\022q\n\013CreateTopic\022\027.go"
+          + "ogle.pubsub.v1.Topic\032\027.google.pubsub.v1."
+          + "Topic\"0\202\323\344\223\002#\032\036/v1/{name=projects/*/topi"
+          + "cs/*}:\001*\332A\004name\022}\n\013UpdateTopic\022$.google."
+          + "pubsub.v1.UpdateTopicRequest\032\027.google.pu"
+          + "bsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topic.name=p"
+          + "rojects/*/topics/*}:\001*\022\223\001\n\007Publish\022 .goo"
+          + "gle.pubsub.v1.PublishRequest\032!.google.pu"
+          + "bsub.v1.PublishResponse\"C\202\323\344\223\002,\"\'/v1/{to"
+          + "pic=projects/*/topics/*}:publish:\001*\332A\016to"
+          + "pic,messages\022w\n\010GetTopic\022!.google.pubsub"
+          + ".v1.GetTopicRequest\032\027.google.pubsub.v1.T"
+          + "opic\"/\202\323\344\223\002!\022\037/v1/{topic=projects/*/topi"
+          + "cs/*}\332A\005topic\022\212\001\n\nListTopics\022#.google.pu"
+          + "bsub.v1.ListTopicsRequest\032$.google.pubsu"
+          + "b.v1.ListTopicsResponse\"1\202\323\344\223\002!\022\037/v1/{pr"
+          + "oject=projects/*}/topics\332A\007project\022\272\001\n\026L"
+          + "istTopicSubscriptions\022/.google.pubsub.v1"
+          + ".ListTopicSubscriptionsRequest\0320.google."
+          + "pubsub.v1.ListTopicSubscriptionsResponse"
+          + "\"=\202\323\344\223\002/\022-/v1/{topic=projects/*/topics/*"
+          + "}/subscriptions\332A\005topic\022\252\001\n\022ListTopicSna"
+          + "pshots\022+.google.pubsub.v1.ListTopicSnaps"
+          + "hotsRequest\032,.google.pubsub.v1.ListTopic"
+          + "SnapshotsResponse\"9\202\323\344\223\002+\022)/v1/{topic=pr"
+          + "ojects/*/topics/*}/snapshots\332A\005topic\022|\n\013"
+          + "DeleteTopic\022$.google.pubsub.v1.DeleteTop"
+          + "icRequest\032\026.google.protobuf.Empty\"/\202\323\344\223\002"
+          + "!*\037/v1/{topic=projects/*/topics/*}\332A\005top"
+          + "ic\032p\312A\025pubsub.googleapis.com\322AUhttps://w"
+          + "ww.googleapis.com/auth/cloud-platform,ht"
+          + "tps://www.googleapis.com/auth/pubsub2\203\025\n"
+          + "\nSubscriber\022\264\001\n\022CreateSubscription\022\036.goo"
+          + "gle.pubsub.v1.Subscription\032\036.google.pubs"
+          + "ub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=pr"
+          + "ojects/*/subscriptions/*}:\001*\332A+name,topi"
+          + "c,push_config,ack_deadline_seconds\022\241\001\n\017G"
+          + "etSubscription\022(.google.pubsub.v1.GetSub"
+          + "scriptionRequest\032\036.google.pubsub.v1.Subs"
+          + "cription\"D\202\323\344\223\002/\022-/v1/{subscription=proj"
+          + "ects/*/subscriptions/*}\332A\014subscription\022\240"
+          + "\001\n\022UpdateSubscription\022+.google.pubsub.v1"
+          + ".UpdateSubscriptionRequest\032\036.google.pubs"
+          + "ub.v1.Subscription\"=\202\323\344\223\002722/v1/{subscri"
+          + "ption.name=projects/*/subscriptions/*}:\001"
+          + "*\022\246\001\n\021ListSubscriptions\022*.google.pubsub."
+          + "v1.ListSubscriptionsRequest\032+.google.pub"
+          + "sub.v1.ListSubscriptionsResponse\"8\202\323\344\223\002("
+          + "\022&/v1/{project=projects/*}/subscriptions"
+          + "\332A\007project\022\237\001\n\022DeleteSubscription\022+.goog"
+          + "le.pubsub.v1.DeleteSubscriptionRequest\032\026"
+          + ".google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{sub"
+          + "scription=projects/*/subscriptions/*}\332A\014"
+          + "subscription\022\317\001\n\021ModifyAckDeadline\022*.goo"
+          + "gle.pubsub.v1.ModifyAckDeadlineRequest\032\026"
+          + ".google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{sub"
+          + "scription=projects/*/subscriptions/*}:mo"
+          + "difyAckDeadline:\001*\332A)subscription,ack_id"
+          + "s,ack_deadline_seconds\022\250\001\n\013Acknowledge\022$"
+          + ".google.pubsub.v1.AcknowledgeRequest\032\026.g"
+          + "oogle.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{subsc"
+          + "ription=projects/*/subscriptions/*}:ackn"
+          + "owledge:\001*\332A\024subscription,ack_ids\022\263\001\n\004Pu"
+          + "ll\022\035.google.pubsub.v1.PullRequest\032\036.goog"
+          + "le.pubsub.v1.PullResponse\"l\202\323\344\223\0027\"2/v1/{"
+          + "subscription=projects/*/subscriptions/*}"
+          + ":pull:\001*\332A,subscription,return_immediate"
+          + "ly,max_messages\022f\n\rStreamingPull\022&.googl"
+          + "e.pubsub.v1.StreamingPullRequest\032\'.googl"
+          + "e.pubsub.v1.StreamingPullResponse\"\000(\0010\001\022"
+          + "\273\001\n\020ModifyPushConfig\022).google.pubsub.v1."
+          + "ModifyPushConfigRequest\032\026.google.protobu"
+          + "f.Empty\"d\202\323\344\223\002C\">/v1/{subscription=proje"
+          + "cts/*/subscriptions/*}:modifyPushConfig:"
+          + "\001*\332A\030subscription,push_config\022\211\001\n\013GetSna"
+          + "pshot\022$.google.pubsub.v1.GetSnapshotRequ"
+          + "est\032\032.google.pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022"
+          + "%/v1/{snapshot=projects/*/snapshots/*}\332A"
+          + "\010snapshot\022\226\001\n\rListSnapshots\022&.google.pub"
+          + "sub.v1.ListSnapshotsRequest\032\'.google.pub"
+          + "sub.v1.ListSnapshotsResponse\"4\202\323\344\223\002$\022\"/v"
+          + "1/{project=projects/*}/snapshots\332A\007proje"
+          + "ct\022\227\001\n\016CreateSnapshot\022\'.google.pubsub.v1"
+          + ".CreateSnapshotRequest\032\032.google.pubsub.v"
+          + "1.Snapshot\"@\202\323\344\223\002&\032!/v1/{name=projects/*"
+          + "/snapshots/*}:\001*\332A\021name,subscription\022\214\001\n"
+          + "\016UpdateSnapshot\022\'.google.pubsub.v1.Updat"
+          + "eSnapshotRequest\032\032.google.pubsub.v1.Snap"
+          + "shot\"5\202\323\344\223\002/2*/v1/{snapshot.name=project"
+          + "s/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'"
+          + ".google.pubsub.v1.DeleteSnapshotRequest\032"
+          + "\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%/v1/{sn"
+          + "apshot=projects/*/snapshots/*}\332A\010snapsho"
+          + "t\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekReques"
+          + "t\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344\223\002"
+          + "7\"2/v1/{subscription=projects/*/subscrip"
+          + "tions/*}:seek:\001*\032p\312A\025pubsub.googleapis.c"
+          + "om\322AUhttps://www.googleapis.com/auth/clo"
+          + "ud-platform,https://www.googleapis.com/a"
+          + "uth/pubsubB\256\001\n\024com.google.pubsub.v1B\013Pub"
+          + "subProtoP\001Z6google.golang.org/genproto/g"
+          + "oogleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google.C"
+          + "loud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352"
+          + "\002\031Google::Cloud::PubSub::V1b\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
             descriptorData,
             new com.google.protobuf.Descriptors.FileDescriptor[] {
+              com.google.api.AnnotationsProto.getDescriptor(),
               com.google.api.ClientProto.getDescriptor(),
               com.google.api.FieldBehaviorProto.getDescriptor(),
               com.google.api.ResourceProto.getDescriptor(),
@@ -489,7 +491,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               com.google.protobuf.EmptyProto.getDescriptor(),
               com.google.protobuf.FieldMaskProto.getDescriptor(),
               com.google.protobuf.TimestampProto.getDescriptor(),
-              com.google.api.AnnotationsProto.getDescriptor(),
             });
     internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor =
         getDescriptor().getMessageTypes().get(0);
@@ -888,6 +889,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     registry.add(com.google.api.ResourceProto.resourceReference);
     com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
         descriptor, registry);
+    com.google.api.AnnotationsProto.getDescriptor();
     com.google.api.ClientProto.getDescriptor();
     com.google.api.FieldBehaviorProto.getDescriptor();
     com.google.api.ResourceProto.getDescriptor();
@@ -895,7 +897,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     com.google.protobuf.EmptyProto.getDescriptor();
     com.google.protobuf.FieldMaskProto.getDescriptor();
     com.google.protobuf.TimestampProto.getDescriptor();
-    com.google.api.AnnotationsProto.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
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 2c6f5e56d..401fdeb0f 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
@@ -178,16 +178,21 @@ public com.google.protobuf.ByteString getSubscriptionBytes() {
    *
    *
    * 
-   * 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.
+   * 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.
    * 
* - * bool return_immediately = 2; + * bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * * * @return The returnImmediately. */ + @java.lang.Deprecated public boolean getReturnImmediately() { return returnImmediately_; } @@ -198,8 +203,8 @@ public boolean getReturnImmediately() { * * *
-   * 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
+   * 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.
    * 
* @@ -680,16 +685,22 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * 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.
+     * 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.
      * 
* - * bool return_immediately = 2; + * + * bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * * * @return The returnImmediately. */ + @java.lang.Deprecated public boolean getReturnImmediately() { return returnImmediately_; } @@ -697,17 +708,23 @@ public boolean getReturnImmediately() { * * *
-     * 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.
+     * 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.
      * 
* - * bool return_immediately = 2; + * + * bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * * * @param value The returnImmediately to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setReturnImmediately(boolean value) { returnImmediately_ = value; @@ -718,16 +735,22 @@ public Builder setReturnImmediately(boolean value) { * * *
-     * 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.
+     * 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.
      * 
* - * bool return_immediately = 2; + * + * bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearReturnImmediately() { returnImmediately_ = false; @@ -740,8 +763,8 @@ public Builder clearReturnImmediately() { * * *
-     * 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
+     * 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.
      * 
* @@ -756,8 +779,8 @@ public int getMaxMessages() { * * *
-     * 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
+     * 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.
      * 
* @@ -776,8 +799,8 @@ public Builder setMaxMessages(int value) { * * *
-     * 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
+     * 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.
      * 
* diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index a908386fb..eb88907a9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -58,24 +58,29 @@ public interface PullRequestOrBuilder * * *
-   * 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.
+   * 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.
    * 
* - * bool return_immediately = 2; + * bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * * * @return The returnImmediately. */ + @java.lang.Deprecated boolean getReturnImmediately(); /** * * *
-   * 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
+   * 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.
    * 
* 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 cf748b70c..6d30c9daf 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 @@ -188,8 +188,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The subscription for which to initialize the new stream. This must be
-   * provided in the first request on the stream, and must not be set in
+   * Required. The subscription for which to initialize the new stream. This
+   * must be provided in the first request on the stream, and must not be set in
    * subsequent requests from client to server.
    * Format is `projects/{project}/subscriptions/{sub}`.
    * 
@@ -215,8 +215,8 @@ public java.lang.String getSubscription() { * * *
-   * Required. The subscription for which to initialize the new stream. This must be
-   * provided in the first request on the stream, and must not be set in
+   * Required. The subscription for which to initialize the new stream. This
+   * must be provided in the first request on the stream, and must not be set in
    * subsequent requests from client to server.
    * Format is `projects/{project}/subscriptions/{sub}`.
    * 
@@ -477,8 +477,8 @@ public com.google.protobuf.ByteString getModifyDeadlineAckIdsBytes(int index) { * * *
-   * Required. The ack deadline to use for the stream. This must be provided in the
-   * first request on the stream, but it can also be updated on subsequent
+   * Required. The ack deadline to use for the stream. This must be provided in
+   * the first request on the stream, but it can also be updated on subsequent
    * requests from client to server. The minimum deadline you can specify is 10
    * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
    * 
@@ -1016,8 +1016,8 @@ public Builder mergeFrom( * * *
-     * Required. The subscription for which to initialize the new stream. This must be
-     * provided in the first request on the stream, and must not be set in
+     * Required. The subscription for which to initialize the new stream. This
+     * must be provided in the first request on the stream, and must not be set in
      * subsequent requests from client to server.
      * Format is `projects/{project}/subscriptions/{sub}`.
      * 
@@ -1043,8 +1043,8 @@ public java.lang.String getSubscription() { * * *
-     * Required. The subscription for which to initialize the new stream. This must be
-     * provided in the first request on the stream, and must not be set in
+     * Required. The subscription for which to initialize the new stream. This
+     * must be provided in the first request on the stream, and must not be set in
      * subsequent requests from client to server.
      * Format is `projects/{project}/subscriptions/{sub}`.
      * 
@@ -1070,8 +1070,8 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * *
-     * Required. The subscription for which to initialize the new stream. This must be
-     * provided in the first request on the stream, and must not be set in
+     * Required. The subscription for which to initialize the new stream. This
+     * must be provided in the first request on the stream, and must not be set in
      * subsequent requests from client to server.
      * Format is `projects/{project}/subscriptions/{sub}`.
      * 
@@ -1096,8 +1096,8 @@ public Builder setSubscription(java.lang.String value) { * * *
-     * Required. The subscription for which to initialize the new stream. This must be
-     * provided in the first request on the stream, and must not be set in
+     * Required. The subscription for which to initialize the new stream. This
+     * must be provided in the first request on the stream, and must not be set in
      * subsequent requests from client to server.
      * Format is `projects/{project}/subscriptions/{sub}`.
      * 
@@ -1118,8 +1118,8 @@ public Builder clearSubscription() { * * *
-     * Required. The subscription for which to initialize the new stream. This must be
-     * provided in the first request on the stream, and must not be set in
+     * Required. The subscription for which to initialize the new stream. This
+     * must be provided in the first request on the stream, and must not be set in
      * subsequent requests from client to server.
      * Format is `projects/{project}/subscriptions/{sub}`.
      * 
@@ -1752,8 +1752,8 @@ public Builder addModifyDeadlineAckIdsBytes(com.google.protobuf.ByteString value * * *
-     * Required. The ack deadline to use for the stream. This must be provided in the
-     * first request on the stream, but it can also be updated on subsequent
+     * Required. The ack deadline to use for the stream. This must be provided in
+     * the first request on the stream, but it can also be updated on subsequent
      * requests from client to server. The minimum deadline you can specify is 10
      * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
      * 
@@ -1769,8 +1769,8 @@ public int getStreamAckDeadlineSeconds() { * * *
-     * Required. The ack deadline to use for the stream. This must be provided in the
-     * first request on the stream, but it can also be updated on subsequent
+     * Required. The ack deadline to use for the stream. This must be provided in
+     * the first request on the stream, but it can also be updated on subsequent
      * requests from client to server. The minimum deadline you can specify is 10
      * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
      * 
@@ -1790,8 +1790,8 @@ public Builder setStreamAckDeadlineSeconds(int value) { * * *
-     * Required. The ack deadline to use for the stream. This must be provided in the
-     * first request on the stream, but it can also be updated on subsequent
+     * Required. The ack deadline to use for the stream. This must be provided in
+     * the first request on the stream, but it can also be updated on subsequent
      * requests from client to server. The minimum deadline you can specify is 10
      * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
      * 
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java index daed9c34d..db56d7d25 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface StreamingPullRequestOrBuilder * * *
-   * Required. The subscription for which to initialize the new stream. This must be
-   * provided in the first request on the stream, and must not be set in
+   * Required. The subscription for which to initialize the new stream. This
+   * must be provided in the first request on the stream, and must not be set in
    * subsequent requests from client to server.
    * Format is `projects/{project}/subscriptions/{sub}`.
    * 
@@ -44,8 +44,8 @@ public interface StreamingPullRequestOrBuilder * * *
-   * Required. The subscription for which to initialize the new stream. This must be
-   * provided in the first request on the stream, and must not be set in
+   * Required. The subscription for which to initialize the new stream. This
+   * must be provided in the first request on the stream, and must not be set in
    * subsequent requests from client to server.
    * Format is `projects/{project}/subscriptions/{sub}`.
    * 
@@ -264,8 +264,8 @@ public interface StreamingPullRequestOrBuilder * * *
-   * Required. The ack deadline to use for the stream. This must be provided in the
-   * first request on the stream, but it can also be updated on subsequent
+   * Required. The ack deadline to use for the stream. This must be provided in
+   * the first request on the stream, but it can also be updated on subsequent
    * requests from client to server. The minimum deadline you can specify is 10
    * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
    * 
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 af7af8ecd..760cf6234 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 @@ -284,10 +284,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * 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.
+   * 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.
    * 
* * @@ -311,10 +310,9 @@ public java.lang.String getTopic() { * * *
-   * 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.
+   * 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.
    * 
* * @@ -1420,10 +1418,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * 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.
+     * 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.
      * 
* * @@ -1447,10 +1444,9 @@ public java.lang.String getTopic() { * * *
-     * 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.
+     * 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.
      * 
* * @@ -1474,10 +1470,9 @@ public com.google.protobuf.ByteString getTopicBytes() { * * *
-     * 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.
+     * 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.
      * 
* * @@ -1500,10 +1495,9 @@ public Builder setTopic(java.lang.String value) { * * *
-     * 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.
+     * 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.
      * 
* * @@ -1522,10 +1516,9 @@ public Builder clearTopic() { * * *
-     * 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.
+     * 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.
      * 
* * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 840cd7f6a..acc4e7572 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -62,10 +62,9 @@ public interface SubscriptionOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * @@ -79,10 +78,9 @@ public interface SubscriptionOrBuilder * * *
-   * 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.
+   * 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.
    * 
* * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java index d4f95780f..5309c9bd7 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java @@ -180,8 +180,8 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { * * *
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
@@ -199,8 +199,8 @@ public boolean hasUpdateMask() {
    *
    *
    * 
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
@@ -218,8 +218,8 @@ public com.google.protobuf.FieldMask getUpdateMask() {
    *
    *
    * 
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
@@ -774,8 +774,8 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -793,8 +793,8 @@ public boolean hasUpdateMask() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -818,8 +818,8 @@ public com.google.protobuf.FieldMask getUpdateMask() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -845,8 +845,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -869,8 +869,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -898,8 +898,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -923,8 +923,8 @@ public Builder clearUpdateMask() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -942,8 +942,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
@@ -965,8 +965,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
      *
      *
      * 
-     * Required. Indicates which fields in the provided topic to update. Must be specified
-     * and non-empty. Note that if `update_mask` contains
+     * Required. Indicates which fields in the provided topic to update. Must be
+     * specified and non-empty. Note that if `update_mask` contains
      * "message_storage_policy" then the new value will be determined based on the
      * policy configured at the project or organization level. The
      * `message_storage_policy` must not be set in the `topic` provided above.
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java
index 6cf4e911a..257f0fdb8 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java
@@ -62,8 +62,8 @@ public interface UpdateTopicRequestOrBuilder
    *
    *
    * 
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
@@ -79,8 +79,8 @@ public interface UpdateTopicRequestOrBuilder
    *
    *
    * 
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
@@ -96,8 +96,8 @@ public interface UpdateTopicRequestOrBuilder
    *
    *
    * 
-   * Required. Indicates which fields in the provided topic to update. Must be specified
-   * and non-empty. Note that if `update_mask` contains
+   * Required. Indicates which fields in the provided topic to update. Must be
+   * specified and non-empty. Note that if `update_mask` contains
    * "message_storage_policy" then the new value will be determined based on the
    * policy configured at the project or organization level. The
    * `message_storage_policy` must not be set in the `topic` provided above.
diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
index adaf8c6fc..55cfa531f 100644
--- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
+++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
@@ -16,6 +16,7 @@ syntax = "proto3";
 
 package google.pubsub.v1;
 
+import "google/api/annotations.proto";
 import "google/api/client.proto";
 import "google/api/field_behavior.proto";
 import "google/api/resource.proto";
@@ -23,7 +24,6 @@ import "google/protobuf/duration.proto";
 import "google/protobuf/empty.proto";
 import "google/protobuf/field_mask.proto";
 import "google/protobuf/timestamp.proto";
-import "google/api/annotations.proto";
 
 option cc_enable_arenas = true;
 option csharp_namespace = "Google.Cloud.PubSub.V1";
@@ -89,7 +89,8 @@ service Publisher {
   }
 
   // Lists the names of the subscriptions on this topic.
-  rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) {
+  rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest)
+      returns (ListTopicSubscriptionsResponse) {
     option (google.api.http) = {
       get: "/v1/{topic=projects/*/topics/*}/subscriptions"
     };
@@ -102,10 +103,12 @@ service Publisher {
   // 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.
-  rpc ListTopicSnapshots(ListTopicSnapshotsRequest) returns (ListTopicSnapshotsResponse) {
+  rpc ListTopicSnapshots(ListTopicSnapshotsRequest)
+      returns (ListTopicSnapshotsResponse) {
     option (google.api.http) = {
       get: "/v1/{topic=projects/*/topics/*}/snapshots"
     };
+    option (google.api.method_signature) = "topic";
   }
 
   // Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
@@ -208,9 +211,7 @@ message GetTopicRequest {
   // Format is `projects/{project}/topics/{topic}`.
   string topic = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Topic"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
   ];
 }
 
@@ -219,12 +220,13 @@ message UpdateTopicRequest {
   // Required. The updated topic object.
   Topic topic = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // Required. Indicates which fields in the provided topic to update. Must be specified
-  // and non-empty. Note that if `update_mask` contains
+  // Required. Indicates which fields in the provided topic to update. Must be
+  // specified and non-empty. Note that if `update_mask` contains
   // "message_storage_policy" then the new value will be determined based on the
   // policy configured at the project or organization level. The
   // `message_storage_policy` must not be set in the `topic` provided above.
-  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FieldMask update_mask = 2
+      [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the Publish method.
@@ -233,9 +235,7 @@ message PublishRequest {
   // Format is `projects/{project}/topics/{topic}`.
   string topic = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Topic"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
   ];
 
   // Required. The messages to publish.
@@ -286,9 +286,7 @@ message ListTopicSubscriptionsRequest {
   // Format is `projects/{project}/topics/{topic}`.
   string topic = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Topic"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
   ];
 
   // Maximum number of subscription names to return.
@@ -304,8 +302,8 @@ message ListTopicSubscriptionsRequest {
 message ListTopicSubscriptionsResponse {
   // The names of the subscriptions that match the request.
   repeated string subscriptions = 1 [(google.api.resource_reference) = {
-                                       type: "pubsub.googleapis.com/Subscription"
-                                     }];
+    type: "pubsub.googleapis.com/Subscription"
+  }];
 
   // If not empty, indicates that there may be more subscriptions that match
   // the request; this value should be passed in a new
@@ -315,9 +313,12 @@ message ListTopicSubscriptionsResponse {
 
 // Request for the `ListTopicSnapshots` method.
 message ListTopicSnapshotsRequest {
-  // The name of the topic that snapshots are attached to.
+  // Required. The name of the topic that snapshots are attached to.
   // Format is `projects/{project}/topics/{topic}`.
-  string topic = 1;
+  string topic = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
+  ];
 
   // Maximum number of snapshot names to return.
   int32 page_size = 2;
@@ -345,9 +346,7 @@ message DeleteTopicRequest {
   // Format is `projects/{project}/topics/{topic}`.
   string topic = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Topic"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
   ];
 }
 
@@ -378,7 +377,8 @@ service Subscriber {
       put: "/v1/{name=projects/*/subscriptions/*}"
       body: "*"
     };
-    option (google.api.method_signature) = "name,topic,push_config,ack_deadline_seconds";
+    option (google.api.method_signature) =
+        "name,topic,push_config,ack_deadline_seconds";
   }
 
   // Gets the configuration details of a subscription.
@@ -399,7 +399,8 @@ service Subscriber {
   }
 
   // Lists matching subscriptions.
-  rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse) {
+  rpc ListSubscriptions(ListSubscriptionsRequest)
+      returns (ListSubscriptionsResponse) {
     option (google.api.http) = {
       get: "/v1/{project=projects/*}/subscriptions"
     };
@@ -411,7 +412,8 @@ service Subscriber {
   // `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.
-  rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty) {
+  rpc DeleteSubscription(DeleteSubscriptionRequest)
+      returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v1/{subscription=projects/*/subscriptions/*}"
     };
@@ -423,12 +425,14 @@ service Subscriber {
   // 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.
-  rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty) {
+  rpc ModifyAckDeadline(ModifyAckDeadlineRequest)
+      returns (google.protobuf.Empty) {
     option (google.api.http) = {
       post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline"
       body: "*"
     };
-    option (google.api.method_signature) = "subscription,ack_ids,ack_deadline_seconds";
+    option (google.api.method_signature) =
+        "subscription,ack_ids,ack_deadline_seconds";
   }
 
   // Acknowledges the messages associated with the `ack_ids` in the
@@ -454,7 +458,8 @@ service Subscriber {
       post: "/v1/{subscription=projects/*/subscriptions/*}:pull"
       body: "*"
     };
-    option (google.api.method_signature) = "subscription,return_immediately,max_messages";
+    option (google.api.method_signature) =
+        "subscription,return_immediately,max_messages";
   }
 
   // Establishes a stream with the server, which sends messages down to the
@@ -464,8 +469,8 @@ service Subscriber {
   // reassign server-side resources, in which case, the client should
   // re-establish the stream. Flow control can be achieved by configuring the
   // underlying RPC channel.
-  rpc StreamingPull(stream StreamingPullRequest) returns (stream StreamingPullResponse) {
-  }
+  rpc StreamingPull(stream StreamingPullRequest)
+      returns (stream StreamingPullResponse) {}
 
   // Modifies the `PushConfig` for a specified subscription.
   //
@@ -473,7 +478,8 @@ service Subscriber {
   // 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`.
-  rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty) {
+  rpc ModifyPushConfig(ModifyPushConfigRequest)
+      returns (google.protobuf.Empty) {
     option (google.api.http) = {
       post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig"
       body: "*"
@@ -490,6 +496,7 @@ service Subscriber {
     option (google.api.http) = {
       get: "/v1/{snapshot=projects/*/snapshots/*}"
     };
+    option (google.api.method_signature) = "snapshot";
   }
 
   // Lists the existing snapshots. Snapshots are used in
@@ -592,15 +599,12 @@ message Subscription {
   // in length, and it must not start with `"goog"`.
   string name = 1 [(google.api.field_behavior) = REQUIRED];
 
-  // 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.
+  // 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.
   string topic = 2 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Topic"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
   ];
 
   // If push delivery is used with this subscription, this field is
@@ -834,7 +838,8 @@ message UpdateSubscriptionRequest {
 
   // Required. Indicates which fields in the provided subscription to update.
   // Must be specified and non-empty.
-  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FieldMask update_mask = 2
+      [(google.api.field_behavior) = REQUIRED];
 }
 
 // Request for the `ListSubscriptions` method.
@@ -911,14 +916,18 @@ message PullRequest {
     }
   ];
 
-  // 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.
-  bool return_immediately = 2;
-
-  // 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
+  // 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.
+  bool return_immediately = 2
+      [deprecated = true, (google.api.field_behavior) = OPTIONAL];
+
+  // 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.
   int32 max_messages = 3 [(google.api.field_behavior) = REQUIRED];
 }
@@ -946,10 +955,10 @@ message ModifyAckDeadlineRequest {
   // Required. List of acknowledgment IDs.
   repeated string ack_ids = 4 [(google.api.field_behavior) = REQUIRED];
 
-  // 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
+  // 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.
@@ -968,8 +977,9 @@ message AcknowledgeRequest {
     }
   ];
 
-  // 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.
+  // 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.
   repeated string ack_ids = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
@@ -977,8 +987,8 @@ message AcknowledgeRequest {
 // establish the initial stream as well as to stream acknowledgements and ack
 // deadline modifications from the client to the server.
 message StreamingPullRequest {
-  // Required. The subscription for which to initialize the new stream. This must be
-  // provided in the first request on the stream, and must not be set in
+  // Required. The subscription for which to initialize the new stream. This
+  // must be provided in the first request on the stream, and must not be set in
   // subsequent requests from client to server.
   // Format is `projects/{project}/subscriptions/{sub}`.
   string subscription = 1 [
@@ -1015,11 +1025,12 @@ message StreamingPullRequest {
   // processing was interrupted.
   repeated string modify_deadline_ack_ids = 4;
 
-  // Required. The ack deadline to use for the stream. This must be provided in the
-  // first request on the stream, but it can also be updated on subsequent
+  // Required. The ack deadline to use for the stream. This must be provided in
+  // the first request on the stream, but it can also be updated on subsequent
   // requests from client to server. The minimum deadline you can specify is 10
   // seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
-  int32 stream_ack_deadline_seconds = 5 [(google.api.field_behavior) = REQUIRED];
+  int32 stream_ack_deadline_seconds = 5
+      [(google.api.field_behavior) = REQUIRED];
 
   // A unique identifier that is used to distinguish client instances from each
   // other. Only needs to be provided on the initial request. When a stream
@@ -1039,17 +1050,15 @@ message StreamingPullResponse {
 
 // Request for the `CreateSnapshot` method.
 message CreateSnapshotRequest {
-  // 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  resource
   // name rules. Format is `projects/{project}/snapshots/{snap}`.
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Snapshot"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
   ];
 
   // Required. The subscription whose backlog the snapshot retains.
@@ -1080,7 +1089,8 @@ message UpdateSnapshotRequest {
 
   // Required. Indicates which fields in the provided snapshot to update.
   // Must be specified and non-empty.
-  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.FieldMask update_mask = 2
+      [(google.api.field_behavior) = REQUIRED];
 }
 
 // A snapshot resource. Snapshots are used in
@@ -1099,9 +1109,9 @@ message Snapshot {
   string name = 1;
 
   // The name of the topic from which this snapshot is retaining messages.
-  string topic = 2 [(google.api.resource_reference) = {
-                      type: "pubsub.googleapis.com/Topic"
-                    }];
+  string topic = 2 [
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
+  ];
 
   // The snapshot is guaranteed to exist up until this time.
   // A newly-created snapshot expires no later than 7 days from the time of its
@@ -1126,9 +1136,7 @@ message GetSnapshotRequest {
   // Format is `projects/{project}/snapshots/{snap}`.
   string snapshot = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Snapshot"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
   ];
 }
 
@@ -1168,9 +1176,7 @@ message DeleteSnapshotRequest {
   // Format is `projects/{project}/snapshots/{snap}`.
   string snapshot = 1 [
     (google.api.field_behavior) = REQUIRED,
-    (google.api.resource_reference) = {
-      type: "pubsub.googleapis.com/Snapshot"
-    }
+    (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
   ];
 }
 
@@ -1202,12 +1208,10 @@ message SeekRequest {
     // the provided subscription.
     // Format is `projects/{project}/snapshots/{snap}`.
     string snapshot = 3 [(google.api.resource_reference) = {
-                           type: "pubsub.googleapis.com/Snapshot"
-                         }];
+      type: "pubsub.googleapis.com/Snapshot"
+    }];
   }
 }
 
 // Response for the `Seek` method (this response is empty).
-message SeekResponse {
-
-}
+message SeekResponse {}
diff --git a/synth.metadata b/synth.metadata
index 4c204715a..a8cfb72d0 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,20 +1,20 @@
 {
-  "updateTime": "2020-03-02T23:00:50.055052Z",
+  "updateTime": "2020-03-09T22:03:30.134601Z",
   "sources": [
     {
       "generator": {
         "name": "artman",
-        "version": "0.47.0",
-        "dockerImage": "googleapis/artman@sha256:b3e50d6b8de03920b9f065bbc3d210e2ca93a043446f1fa16cdf567393c09678"
+        "version": "1.0.0",
+        "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "244ab2b83a82076a1fa7be63b7e0671af73f5c02",
-        "internalRef": "298455048",
-        "log": "244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n  - adding get validation result\n  - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n"
+        "sha": "29a47c965aac79e3fe8e3314482ca0b5967680f0",
+        "internalRef": "299917154",
+        "log": "29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common  dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\nf0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n  Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n"
       }
     },
     {

From 7e2ee4fe5a10a6da10be69d4c6810907d08735d5 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Tue, 17 Mar 2020 15:39:30 +0100
Subject: [PATCH 05/16] build(deps): update dependency
 org.apache.maven.plugins:maven-dependency-plugin to v3.1.2 (#108)

---
 google-cloud-pubsub/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml
index aa9fe12e3..fc40ef539 100644
--- a/google-cloud-pubsub/pom.xml
+++ b/google-cloud-pubsub/pom.xml
@@ -145,7 +145,7 @@
         
           org.apache.maven.plugins
           maven-dependency-plugin
-          3.1.1
+          3.1.2
           
             io.opencensus:opencensus-impl
           

From c6783ecccd69608338437c8efc1cdda43bfc6d77 Mon Sep 17 00:00:00 2001
From: Jeff Ching 
Date: Mon, 23 Mar 2020 20:58:10 -0700
Subject: [PATCH 06/16] chore: enable context aware commits (#118)

---
 synth.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/synth.py b/synth.py
index d47677f84..bcc53646d 100644
--- a/synth.py
+++ b/synth.py
@@ -18,6 +18,8 @@
 import synthtool.gcp as gcp
 import synthtool.languages.java as java
 
+AUTOSYNTH_MULTIPLE_COMMITS = True
+
 gapic = gcp.GAPICGenerator()
 
 service = 'pubsub'

From 11f9712a7a98c59e58a8d904bcf3b166980944b0 Mon Sep 17 00:00:00 2001
From: Jeff Ching 
Date: Wed, 25 Mar 2020 07:26:44 -0700
Subject: [PATCH 07/16] chore: use java helper for templates (#114)

---
 synth.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/synth.py b/synth.py
index bcc53646d..3ee915346 100644
--- a/synth.py
+++ b/synth.py
@@ -49,8 +49,6 @@
     java.format_code(f'grpc-google-cloud-{service}-{version}/src')
     java.format_code(f'proto-google-cloud-{service}-{version}/src')
 
-common_templates = gcp.CommonTemplates()
-templates = common_templates.java_library()
-s.copy(templates, excludes=[
+java.common_templates(excludes=[
     'README.md'
-])
\ No newline at end of file
+])

From e7c007b917618e75f9c8fecd2475f31c7eba0817 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Wed, 25 Mar 2020 15:28:35 +0100
Subject: [PATCH 08/16] deps: update dependency org.threeten:threetenbp to
 v1.4.2 (#116)

---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8a60469d0..254a2ac6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
     4.13
     4.2
     28.2-android
-    1.4.1
+    1.4.2
     1.3.2
     2.3.4
     1.34.2

From fdd943433cface4bc6634f74aa12afa6e471f3a3 Mon Sep 17 00:00:00 2001
From: Kamal Aboul-Hosn 
Date: Wed, 25 Mar 2020 12:14:50 -0400
Subject: [PATCH 09/16] feat: Add flow control support to publisher (#119)

* feat: Add flow control support to publisher
---
 .../com/google/cloud/pubsub/v1/Publisher.java | 173 +++++++++++++++-
 .../pubsub/v1/SequentialExecutorService.java  |   4 +
 .../cloud/pubsub/v1/PublisherImplTest.java    | 190 ++++++++++++++++++
 3 files changed, 364 insertions(+), 3 deletions(-)

diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
index e28427eea..659d84bb6 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
@@ -25,6 +25,8 @@
 import com.google.api.core.BetaApi;
 import com.google.api.core.SettableApiFuture;
 import com.google.api.gax.batching.BatchingSettings;
+import com.google.api.gax.batching.FlowControlSettings;
+import com.google.api.gax.batching.FlowController;
 import com.google.api.gax.core.BackgroundResource;
 import com.google.api.gax.core.BackgroundResourceAggregation;
 import com.google.api.gax.core.CredentialsProvider;
@@ -55,6 +57,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
@@ -108,6 +111,8 @@ public class Publisher {
   private ScheduledFuture currentAlarmFuture;
   private final ApiFunction messageTransform;
 
+  private MessageFlowController flowController = null;
+
   /** The maximum number of messages in one request. Defined by the API. */
   public static long getApiMaxRequestElementCount() {
     return 1000L;
@@ -122,6 +127,16 @@ private Publisher(Builder builder) throws IOException {
     topicName = builder.topicName;
 
     this.batchingSettings = builder.batchingSettings;
+    FlowControlSettings flowControl = this.batchingSettings.getFlowControlSettings();
+    if (flowControl != null
+        && flowControl.getLimitExceededBehavior() != FlowController.LimitExceededBehavior.Ignore) {
+      this.flowController =
+          new MessageFlowController(
+              flowControl.getMaxOutstandingElementCount(),
+              flowControl.getMaxOutstandingRequestBytes(),
+              flowControl.getLimitExceededBehavior());
+    }
+
     this.enableMessageOrdering = builder.enableMessageOrdering;
     this.messageTransform = builder.messageTransform;
 
@@ -221,6 +236,19 @@ public ApiFuture publish(PubsubMessage message) {
 
     final OutstandingPublish outstandingPublish =
         new OutstandingPublish(messageTransform.apply(message));
+
+    if (flowController != null) {
+      try {
+        flowController.acquire(outstandingPublish.messageSize);
+      } catch (FlowController.FlowControlException e) {
+        if (!orderingKey.isEmpty()) {
+          sequentialExecutor.stopPublish(orderingKey);
+        }
+        outstandingPublish.publishResult.setException(e);
+        return outstandingPublish.publishResult;
+      }
+    }
+
     List batchesToSend;
     messagesBatchLock.lock();
     try {
@@ -454,7 +482,7 @@ public ApiFuture call() {
     ApiFutures.addCallback(future, futureCallback, directExecutor());
   }
 
-  private static final class OutstandingBatch {
+  private final class OutstandingBatch {
     final List outstandingPublishes;
     final long creationTime;
     int attempt;
@@ -484,6 +512,9 @@ private List getMessages() {
 
     private void onFailure(Throwable t) {
       for (OutstandingPublish outstandingPublish : outstandingPublishes) {
+        if (flowController != null) {
+          flowController.release(outstandingPublish.messageSize);
+        }
         outstandingPublish.publishResult.setException(t);
       }
     }
@@ -491,7 +522,11 @@ private void onFailure(Throwable t) {
     private void onSuccess(Iterable results) {
       Iterator messagesResultsIt = outstandingPublishes.iterator();
       for (String messageId : results) {
-        messagesResultsIt.next().publishResult.set(messageId);
+        OutstandingPublish nextPublish = messagesResultsIt.next();
+        if (flowController != null) {
+          flowController.release(nextPublish.messageSize);
+        }
+        nextPublish.publishResult.set(messageId);
       }
     }
   }
@@ -602,6 +637,10 @@ public static final class Builder {
             .setDelayThreshold(DEFAULT_DELAY_THRESHOLD)
             .setRequestByteThreshold(DEFAULT_REQUEST_BYTES_THRESHOLD)
             .setElementCountThreshold(DEFAULT_ELEMENT_COUNT_THRESHOLD)
+            .setFlowControlSettings(
+                FlowControlSettings.newBuilder()
+                    .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Ignore)
+                    .build())
             .build();
     static final RetrySettings DEFAULT_RETRY_SETTINGS =
         RetrySettings.newBuilder()
@@ -759,7 +798,135 @@ public Publisher build() throws IOException {
     }
   }
 
-  private static class MessagesBatch {
+  private static class MessageFlowController {
+    private final Lock lock;
+    private final Long messageLimit;
+    private final Long byteLimit;
+    private final FlowController.LimitExceededBehavior limitBehavior;
+
+    private Long outstandingMessages;
+    private Long outstandingBytes;
+    private LinkedList awaitingMessageAcquires;
+    private LinkedList awaitingBytesAcquires;
+
+    MessageFlowController(
+        Long messageLimit, Long byteLimit, FlowController.LimitExceededBehavior limitBehavior) {
+      this.messageLimit = messageLimit;
+      this.byteLimit = byteLimit;
+      this.limitBehavior = limitBehavior;
+      this.lock = new ReentrantLock();
+
+      this.outstandingMessages = 0L;
+      this.outstandingBytes = 0L;
+
+      this.awaitingMessageAcquires = new LinkedList();
+      this.awaitingBytesAcquires = new LinkedList();
+    }
+
+    void acquire(long messageSize) throws FlowController.FlowControlException {
+      lock.lock();
+      try {
+        if (outstandingMessages >= messageLimit
+            && limitBehavior == FlowController.LimitExceededBehavior.ThrowException) {
+          throw new FlowController.MaxOutstandingElementCountReachedException(messageLimit);
+        }
+        if (outstandingBytes + messageSize >= byteLimit
+            && limitBehavior == FlowController.LimitExceededBehavior.ThrowException) {
+          throw new FlowController.MaxOutstandingRequestBytesReachedException(byteLimit);
+        }
+
+        // We can acquire or we should wait until we can acquire.
+        // Start by acquiring a slot for a message.
+        CountDownLatch messageWaiter = null;
+        while (outstandingMessages >= messageLimit) {
+          if (messageWaiter == null) {
+            // This message gets added to the back of the line.
+            messageWaiter = new CountDownLatch(1);
+            awaitingMessageAcquires.addLast(messageWaiter);
+          } else {
+            // This message already in line stays at the head of the line.
+            messageWaiter = new CountDownLatch(1);
+            awaitingMessageAcquires.set(0, messageWaiter);
+          }
+          lock.unlock();
+          try {
+            messageWaiter.await();
+          } catch (InterruptedException e) {
+            logger.log(Level.WARNING, "Interrupted while waiting to acquire flow control tokens");
+          }
+          lock.lock();
+        }
+        ++outstandingMessages;
+        if (messageWaiter != null) {
+          awaitingMessageAcquires.removeFirst();
+        }
+
+        // There may be some surplus messages left; let the next message waiting for a token have
+        // one.
+        if (!awaitingMessageAcquires.isEmpty() && outstandingMessages < messageLimit) {
+          awaitingMessageAcquires.getFirst().countDown();
+        }
+
+        // Now acquire space for bytes.
+        CountDownLatch bytesWaiter = null;
+        Long bytesRemaining = messageSize;
+        while (outstandingBytes + bytesRemaining >= byteLimit) {
+          // Take what is available.
+          Long available = byteLimit - outstandingBytes;
+          bytesRemaining -= available;
+          outstandingBytes = byteLimit;
+          if (bytesWaiter == null) {
+            // This message gets added to the back of the line.
+            bytesWaiter = new CountDownLatch(1);
+            awaitingBytesAcquires.addLast(bytesWaiter);
+          } else {
+            // This message already in line stays at the head of the line.
+            bytesWaiter = new CountDownLatch(1);
+            awaitingBytesAcquires.set(0, bytesWaiter);
+          }
+          lock.unlock();
+          try {
+            bytesWaiter.await();
+          } catch (InterruptedException e) {
+            logger.log(Level.WARNING, "Interrupted while waiting to acquire flow control tokens");
+          }
+          lock.lock();
+        }
+
+        outstandingBytes += bytesRemaining;
+        if (bytesWaiter != null) {
+          awaitingBytesAcquires.removeFirst();
+        }
+        // There may be some surplus bytes left; let the next message waiting for bytes have some.
+        if (!awaitingBytesAcquires.isEmpty() && outstandingBytes < byteLimit) {
+          awaitingBytesAcquires.getFirst().countDown();
+        }
+      } finally {
+        lock.unlock();
+      }
+    }
+
+    private void notifyNextAcquires() {
+      if (!awaitingMessageAcquires.isEmpty()) {
+        CountDownLatch awaitingAcquire = awaitingMessageAcquires.getFirst();
+        awaitingAcquire.countDown();
+      }
+      if (!awaitingBytesAcquires.isEmpty()) {
+        CountDownLatch awaitingAcquire = awaitingBytesAcquires.getFirst();
+        awaitingAcquire.countDown();
+      }
+    }
+
+    void release(long messageSize) {
+      lock.lock();
+      --outstandingMessages;
+      outstandingBytes -= messageSize;
+      notifyNextAcquires();
+      lock.unlock();
+    }
+  }
+
+  private class MessagesBatch {
     private List messages;
     private int batchedBytes;
     private String orderingKey;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java
index 712f51eb5..292921850 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java
@@ -247,6 +247,10 @@ void resumePublish(String key) {
       keysWithErrors.remove(key);
     }
 
+    void stopPublish(String key) {
+      keysWithErrors.add(key);
+    }
+
     /** Cancels every task in the queue associated with {@code key}. */
     private void cancelQueuedTasks(final String key, Throwable e) {
       keysWithErrors.add(key);
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
index b1109c8fc..5ee5fdcfc 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java
@@ -25,6 +25,8 @@
 
 import com.google.api.core.ApiFuture;
 import com.google.api.gax.batching.BatchingSettings;
+import com.google.api.gax.batching.FlowControlSettings;
+import com.google.api.gax.batching.FlowController;
 import com.google.api.gax.core.ExecutorProvider;
 import com.google.api.gax.core.FixedExecutorProvider;
 import com.google.api.gax.core.InstantiatingExecutorProvider;
@@ -43,7 +45,10 @@
 import io.grpc.StatusException;
 import io.grpc.inprocess.InProcessServerBuilder;
 import java.util.List;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import org.easymock.EasyMock;
 import org.junit.After;
@@ -923,6 +928,191 @@ public void testShutDown() throws Exception {
     assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES));
   }
 
+  @Test
+  public void testPublishFlowControl_throwException() throws Exception {
+    Publisher publisher =
+        getTestPublisherBuilder()
+            .setExecutorProvider(SINGLE_THREAD_EXECUTOR)
+            .setBatchingSettings(
+                Publisher.Builder.DEFAULT_BATCHING_SETTINGS
+                    .toBuilder()
+                    .setElementCountThreshold(1L)
+                    .setDelayThreshold(Duration.ofSeconds(5))
+                    .setFlowControlSettings(
+                        FlowControlSettings.newBuilder()
+                            .setLimitExceededBehavior(
+                                FlowController.LimitExceededBehavior.ThrowException)
+                            .setMaxOutstandingElementCount(1L)
+                            .setMaxOutstandingRequestBytes(10L)
+                            .build())
+                    .build())
+            .build();
+
+    // Sending a message that is too large results in an exception.
+    ApiFuture publishFuture1 = sendTestMessage(publisher, "AAAAAAAAAAA");
+    try {
+      publishFuture1.get();
+      fail("Should have thrown an FlowController.MaxOutstandingRequestBytesReachedException");
+    } catch (ExecutionException e) {
+      assertThat(e.getCause())
+          .isInstanceOf(FlowController.MaxOutstandingRequestBytesReachedException.class);
+    }
+
+    // Sending a second message succeeds.
+    ApiFuture publishFuture2 = sendTestMessage(publisher, "AAAA");
+
+    // Sending a third message fails because of the outstanding message.
+    ApiFuture publishFuture3 = sendTestMessage(publisher, "AA");
+    try {
+      publishFuture3.get();
+      fail("Should have thrown an FlowController.MaxOutstandingElementCountReachedException");
+    } catch (ExecutionException e) {
+      assertThat(e.getCause())
+          .isInstanceOf(FlowController.MaxOutstandingElementCountReachedException.class);
+    }
+
+    testPublisherServiceImpl.addPublishResponse(PublishResponse.newBuilder().addMessageIds("1"));
+    assertEquals("1", publishFuture2.get());
+
+    // Sending another message succeeds.
+    ApiFuture publishFuture4 = sendTestMessage(publisher, "AAAA");
+    testPublisherServiceImpl.addPublishResponse(PublishResponse.newBuilder().addMessageIds("2"));
+    assertEquals("2", publishFuture4.get());
+  }
+
+  @Test
+  public void testPublishFlowControl_throwExceptionWithOrderingKey() throws Exception {
+    Publisher publisher =
+        getTestPublisherBuilder()
+            .setExecutorProvider(SINGLE_THREAD_EXECUTOR)
+            .setBatchingSettings(
+                Publisher.Builder.DEFAULT_BATCHING_SETTINGS
+                    .toBuilder()
+                    .setElementCountThreshold(1L)
+                    .setDelayThreshold(Duration.ofSeconds(5))
+                    .setFlowControlSettings(
+                        FlowControlSettings.newBuilder()
+                            .setLimitExceededBehavior(
+                                FlowController.LimitExceededBehavior.ThrowException)
+                            .setMaxOutstandingElementCount(1L)
+                            .setMaxOutstandingRequestBytes(10L)
+                            .build())
+                    .build())
+            .setEnableMessageOrdering(true)
+            .build();
+
+    // Sending a message that is too large results in an exception.
+    ApiFuture publishFuture1 =
+        sendTestMessageWithOrderingKey(publisher, "AAAAAAAAAAA", "a");
+    try {
+      publishFuture1.get();
+      fail("Should have thrown an FlowController.MaxOutstandingRequestBytesReachedException");
+    } catch (ExecutionException e) {
+      assertThat(e.getCause())
+          .isInstanceOf(FlowController.MaxOutstandingRequestBytesReachedException.class);
+    }
+
+    // Sending a second message for the same ordering key fails because the first one failed.
+    ApiFuture publishFuture2 = sendTestMessageWithOrderingKey(publisher, "AAAA", "a");
+    try {
+      publishFuture2.get();
+      Assert.fail("This should fail.");
+    } catch (ExecutionException e) {
+      assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause());
+    }
+  }
+
+  @Test
+  public void testPublishFlowControl_block() throws Exception {
+    final Publisher publisher =
+        getTestPublisherBuilder()
+            .setExecutorProvider(SINGLE_THREAD_EXECUTOR)
+            .setBatchingSettings(
+                Publisher.Builder.DEFAULT_BATCHING_SETTINGS
+                    .toBuilder()
+                    .setElementCountThreshold(1L)
+                    .setDelayThreshold(Duration.ofSeconds(5))
+                    .setFlowControlSettings(
+                        FlowControlSettings.newBuilder()
+                            .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block)
+                            .setMaxOutstandingElementCount(2L)
+                            .setMaxOutstandingRequestBytes(10L)
+                            .build())
+                    .build())
+            .build();
+    Executor responseExecutor = Executors.newScheduledThreadPool(10);
+    final CountDownLatch sendResponse1 = new CountDownLatch(1);
+    final CountDownLatch response1Sent = new CountDownLatch(1);
+    final CountDownLatch sendResponse2 = new CountDownLatch(1);
+    responseExecutor.execute(
+        new Runnable() {
+          @Override
+          public void run() {
+            try {
+              sendResponse1.await();
+              testPublisherServiceImpl.addPublishResponse(
+                  PublishResponse.newBuilder().addMessageIds("1"));
+              response1Sent.countDown();
+              sendResponse2.await();
+              testPublisherServiceImpl.addPublishResponse(
+                  PublishResponse.newBuilder().addMessageIds("2"));
+            } catch (Exception e) {
+            }
+          }
+        });
+
+    // Sending two messages succeeds.
+    ApiFuture publishFuture1 = sendTestMessage(publisher, "AA");
+    ApiFuture publishFuture2 = sendTestMessage(publisher, "AA");
+
+    // Sending a third message blocks because messages are outstanding.
+    final CountDownLatch publish3Completed = new CountDownLatch(1);
+    final CountDownLatch response3Sent = new CountDownLatch(1);
+    responseExecutor.execute(
+        new Runnable() {
+          @Override
+          public void run() {
+            ApiFuture publishFuture3 = sendTestMessage(publisher, "AAAAAA");
+            publish3Completed.countDown();
+          }
+        });
+
+    responseExecutor.execute(
+        new Runnable() {
+          @Override
+          public void run() {
+            try {
+              sendResponse1.countDown();
+              response1Sent.await();
+              sendResponse2.countDown();
+            } catch (Exception e) {
+            }
+          }
+        });
+
+    // Sending a fourth message blocks because although only one message has been sent,
+    // the third message claimed the tokens for outstanding bytes.
+    final CountDownLatch publish4Completed = new CountDownLatch(1);
+    responseExecutor.execute(
+        new Runnable() {
+          @Override
+          public void run() {
+            try {
+              publish3Completed.await();
+              ApiFuture publishFuture4 = sendTestMessage(publisher, "A");
+              publish4Completed.countDown();
+            } catch (Exception e) {
+            }
+          }
+        });
+
+    publish3Completed.await();
+    testPublisherServiceImpl.addPublishResponse(PublishResponse.newBuilder().addMessageIds("3"));
+    response3Sent.countDown();
+
+    publish4Completed.await();
+  }
+
   private Builder getTestPublisherBuilder() {
     return Publisher.newBuilder(TEST_TOPIC)
         .setExecutorProvider(FixedExecutorProvider.create(fakeExecutor))

From 30a1deecbecf63d1629ae93407658865518febce Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Thu, 26 Mar 2020 00:21:35 +0100
Subject: [PATCH 10/16] deps: update dependency com.google.api:api-common to
 v1.9.0 (#121)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [com.google.api:api-common](https://togithub.com/googleapis/api-common-java) | minor | `1.8.1` -> `1.9.0` |

---

### Release Notes

googleapis/api-common-java ### [`v1.9.0`](https://togithub.com/googleapis/api-common-java/releases/v1.9.0) [Compare Source](https://togithub.com/googleapis/api-common-java/compare/v1.8.1...v1.9.0) 03-25-2020 14:09 PST #### New Features - Add `@BetaApi` `ApiFutres.catchingAsync()` ([#​117](https://togithub.com/googleapis/api-common-java/pull/117)) ##### Dependencies - Update guava to v28.2-android ([#​110](https://togithub.com/googleapis/api-common-java/pull/110)) - Update error_prone_annotations to v2.2.3 ([#​111](https://togithub.com/googleapis/api-common-java/pull/111))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-pubsub). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 254a2ac6d..734355f06 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ github google-cloud-pubsub-parent 1.93.1 - 1.8.1 + 1.9.0 1.17.0 1.54.0 1.27.2 From 5639f6321e1506fdf803f5de58f2c7fdf5afb448 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 Mar 2020 18:44:46 +0100 Subject: [PATCH 11/16] deps: update core dependencies (#105) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 734355f06..401fae681 100644 --- a/pom.xml +++ b/pom.xml @@ -63,11 +63,11 @@ UTF-8 github google-cloud-pubsub-parent - 1.93.1 + 1.93.3 1.9.0 1.17.0 1.54.0 - 1.27.2 + 1.28.0 3.11.4 4.13 4.2 From 26aec5d7ee45bec5b39b6cbe67122a6e5944268e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 Mar 2020 18:45:25 +0100 Subject: [PATCH 12/16] deps: update opencensus.version to v0.26.0 (#115) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 401fae681..34dfa8702 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ 1.34.2 1.18 1.7 - 0.25.0 + 0.26.0 From 8fe6fe630e1970f2fac1a986853231fef188a3a4 Mon Sep 17 00:00:00 2001 From: Vadym Matsishevskyi <25311427+vam-google@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:11:49 -0700 Subject: [PATCH 13/16] chore: Migrate pubsub synth.py to bazel (#124) This PR migrates only synth.py but does not commit the regenerated files. The generation was tested and it works, the updated files are not commited due to breaking changes not related to bazel migration. --- synth.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/synth.py b/synth.py index 3ee915346..24cfcbf56 100644 --- a/synth.py +++ b/synth.py @@ -15,24 +15,19 @@ """This script is used to synthesize generated parts of this library.""" import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.java as java AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICGenerator() - service = 'pubsub' versions = ['v1'] -config_pattern = '/google/pubsub/artman_pubsub.yaml' for version in versions: - java.gapic_library( + java.bazel_library( service=service, version=version, - config_pattern=config_pattern, - package_pattern='com.google.{service}.{version}', - gapic=gapic, + proto_path=f'google/{service}/{version}', + bazel_target=f'//google/{service}/{version}:google-cloud-{service}-{version}-java', ) s.replace( '**/stub/SubscriberStubSettings.java', From 4558c3430901cdaec12a43e06ea4fafaa01c08e0 Mon Sep 17 00:00:00 2001 From: Hanzhen Yi Date: Wed, 1 Apr 2020 13:42:12 -0700 Subject: [PATCH 14/16] feat: add TopicName (#113) * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * regenerate * trigger kokoro * debug * trigger kokoro * remove debugging * Remove sample poms * add deprecation info * add back documentation * remove samples Co-authored-by: yoshi-automation --- .github/PULL_REQUEST_TEMPLATE.md | 8 +- .kokoro/build.sh | 19 +- .kokoro/common.sh | 44 + .kokoro/dependencies.sh | 15 +- .kokoro/linkage-monitor.sh | 22 +- .../pubsub/v1/SubscriptionAdminClient.java | 222 ++-- .../cloud/pubsub/v1/TopicAdminClient.java | 281 +++-- .../google/cloud/pubsub/v1/package-info.java | 4 +- .../google/cloud/pubsub/it/ITPubSubTest.java | 1 - .../v1/SubscriptionAdminClientTest.java | 82 +- .../cloud/pubsub/v1/TopicAdminClientTest.java | 92 +- .../google/pubsub/v1/ProjectTopicName.java | 2 +- .../com/google/pubsub/v1/PubsubProto.java | 459 ++++---- .../com/google/pubsub/v1/RetryPolicy.java | 1033 +++++++++++++++++ .../pubsub/v1/RetryPolicyOrBuilder.java | 101 ++ .../com/google/pubsub/v1/Subscription.java | 588 ++++++++++ .../pubsub/v1/SubscriptionOrBuilder.java | 96 ++ .../java/com/google/pubsub/v1/TopicName.java | 218 +++- .../main/proto/google/pubsub/v1/pubsub.proto | 42 + renovate.json | 6 +- synth.metadata | 21 +- synth.py | 467 ++++++++ 22 files changed, 3338 insertions(+), 485 deletions(-) create mode 100644 .kokoro/common.sh create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0bd0ee062..f2a217cb7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1 +1,7 @@ -Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-pubsub/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2bac08ee0..bbca9bc9d 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +# include common functions +source ${scriptDir}/common.sh + # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 000000000..a3bbc5f67 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# set -eo pipefail + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index eb1cb86db..0aade871c 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -15,7 +15,13 @@ set -eo pipefail -cd github/java-pubsub/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java java -version @@ -24,8 +30,9 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index 088ded29a..759ab4e2c 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,18 +17,26 @@ set -eo pipefail # Display commands being run. set -x -cd github/java-pubsub/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar 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 b5c7b51c7..227271f32 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 @@ -59,6 +59,7 @@ import com.google.pubsub.v1.StreamingPullRequest; import com.google.pubsub.v1.StreamingPullResponse; import com.google.pubsub.v1.Subscription; +import com.google.pubsub.v1.TopicName; import com.google.pubsub.v1.UpdateSnapshotRequest; import com.google.pubsub.v1.UpdateSubscriptionRequest; import java.io.IOException; @@ -81,7 +82,7 @@ * * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]"); + * TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); * PushConfig pushConfig = PushConfig.newBuilder().build(); * int ackDeadlineSeconds = 0; * Subscription response = subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds); @@ -211,7 +212,7 @@ public SubscriberStub getStub() { *

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 0;
    *   Subscription response = subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
@@ -248,7 +249,7 @@ public SubscriberStub getStub() {
    */
   public final Subscription createSubscription(
       ProjectSubscriptionName name,
-      ProjectTopicName topic,
+      TopicName topic,
       PushConfig pushConfig,
       int ackDeadlineSeconds) {
     Subscription request =
@@ -279,7 +280,7 @@ public final Subscription createSubscription(
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   PushConfig pushConfig = PushConfig.newBuilder().build();
    *   int ackDeadlineSeconds = 0;
    *   Subscription response = subscriptionAdminClient.createSubscription(name.toString(), topic.toString(), pushConfig, ackDeadlineSeconds);
@@ -344,7 +345,7 @@ public final Subscription createSubscription(
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-   *   TopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Subscription request = Subscription.newBuilder()
    *     .setName(name.toString())
    *     .setTopic(topic.toString())
@@ -378,7 +379,77 @@ public final Subscription createSubscription(Subscription request) {
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
    *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-   *   TopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 0;
+   *   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(ProjectSubscriptionName, TopicName, PushConfig, + * int)} instead. + */ + public final Subscription createSubscription( + ProjectSubscriptionName name, + ProjectTopicName 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 <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. 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: + * + *


+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Subscription request = Subscription.newBuilder()
    *     .setName(name.toString())
    *     .setTopic(topic.toString())
@@ -1924,23 +1995,21 @@ public final UnaryCallable seekCallable() {
    *
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   Policy policy = Policy.newBuilder().build();
-   *   Policy response = subscriptionAdminClient.setIamPolicy(formattedResource, policy);
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   Policy response = subscriptionAdminClient.setIamPolicy(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the - * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud - * Platform services (such as Projects) might reject them. + * @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 Policy setIamPolicy(String resource, Policy policy) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); - return setIamPolicy(request); + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1952,22 +2021,25 @@ public final Policy setIamPolicy(String resource, Policy policy) { *

Sample code: * *


-   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
    *   Policy policy = Policy.newBuilder().build();
-   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
-   *     .setPolicy(policy)
-   *     .build();
-   *   Policy response = subscriptionAdminClient.setIamPolicy(request);
+   *   Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead. */ - public final Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1980,10 +2052,10 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * *

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   Policy policy = Policy.newBuilder().build();
    *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .setPolicy(policy)
    *     .build();
    *   ApiFuture<Policy> future = subscriptionAdminClient.setIamPolicyCallable().futureCall(request);
@@ -2005,18 +2077,19 @@ public final UnaryCallable setIamPolicyCallable() {
    *
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
-   *   Policy response = subscriptionAdminClient.getIamPolicy(formattedResource);
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   Policy response = subscriptionAdminClient.getIamPolicy(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. + * @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 Policy getIamPolicy(String resource) { - GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); - return getIamPolicy(request); + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2027,20 +2100,20 @@ public final Policy getIamPolicy(String resource) { *

Sample code: * *


-   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
-   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
-   *     .build();
-   *   Policy response = subscriptionAdminClient.getIamPolicy(request);
+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   Policy response = topicAdminClient.getIamPolicy(formattedResource);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead. */ - public final Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2052,9 +2125,9 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * *

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .build();
    *   ApiFuture<Policy> future = subscriptionAdminClient.getIamPolicyCallable().futureCall(request);
    *   // Do something
@@ -2079,27 +2152,21 @@ public final UnaryCallable getIamPolicyCallable() {
    *
    * 

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsResponse response = subscriptionAdminClient.testIamPermissions(formattedResource, permissions);
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   TestIamPermissionsResponse response = subscriptionAdminClient.testIamPermissions(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy detail is being requested. See the - * operation documentation for the appropriate value for this field. - * @param permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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 TestIamPermissionsResponse testIamPermissions( - String resource, List permissions) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(resource) - .addAllPermissions(permissions) - .build(); - return testIamPermissions(request); + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2114,22 +2181,29 @@ public final TestIamPermissionsResponse testIamPermissions( *

Sample code: * *


-   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
    *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
-   *     .setResource(formattedResource)
-   *     .addAllPermissions(permissions)
-   *     .build();
-   *   TestIamPermissionsResponse response = subscriptionAdminClient.testIamPermissions(request);
+   *   TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead. */ - public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2145,10 +2219,10 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * *

    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .addAllPermissions(permissions)
    *     .build();
    *   ApiFuture<TestIamPermissionsResponse> future = subscriptionAdminClient.testIamPermissionsCallable().futureCall(request);
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 1612e898f..11951c869 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
@@ -49,6 +49,7 @@
 import com.google.pubsub.v1.PublishResponse;
 import com.google.pubsub.v1.PubsubMessage;
 import com.google.pubsub.v1.Topic;
+import com.google.pubsub.v1.TopicName;
 import com.google.pubsub.v1.UpdateTopicRequest;
 import java.io.IOException;
 import java.util.List;
@@ -68,7 +69,7 @@
  * 
  * 
  * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
  *   Topic response = topicAdminClient.createTopic(name);
  * }
  * 
@@ -185,7 +186,7 @@ public PublisherStub getStub() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic response = topicAdminClient.createTopic(name);
    * }
    * 
@@ -197,7 +198,7 @@ public PublisherStub getStub() { * length, and it must not start with `"goog"`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Topic createTopic(ProjectTopicName name) { + public final Topic createTopic(TopicName name) { Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); return createTopic(request); } @@ -212,7 +213,7 @@ public final Topic createTopic(ProjectTopicName name) { * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic response = topicAdminClient.createTopic(name.toString());
    * }
    * 
@@ -240,6 +241,34 @@ public final Topic createTopic(String name) { *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
    *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   Topic response = topicAdminClient.createTopic(name);
+   * }
+   * 
+ * + * @param name Required. The name of the topic. It must have the format + * `"projects/{project}/topics/{topic}"`. `{topic}` 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"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #createTopic(TopicName)} instead. + */ + public final Topic createTopic(ProjectTopicName name) { + Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); + return createTopic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates the given topic with the given name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic request = Topic.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -264,7 +293,7 @@ public final Topic createTopic(Topic request) {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic request = Topic.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -335,7 +364,7 @@ public final UnaryCallable updateTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ByteString data = ByteString.copyFromUtf8("");
    *   PubsubMessage messagesElement = PubsubMessage.newBuilder()
    *     .setData(data)
@@ -351,7 +380,7 @@ public final UnaryCallable updateTopicCallable() {
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   /* package-private */ final PublishResponse publish(
-      ProjectTopicName topic, List messages) {
+      TopicName topic, List messages) {
     PublishRequest request =
         PublishRequest.newBuilder()
             .setTopic(topic == null ? null : topic.toString())
@@ -368,7 +397,7 @@ public final UnaryCallable updateTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ByteString data = ByteString.copyFromUtf8("");
    *   PubsubMessage messagesElement = PubsubMessage.newBuilder()
    *     .setData(data)
@@ -397,7 +426,7 @@ public final UnaryCallable updateTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ByteString data = ByteString.copyFromUtf8("");
    *   PubsubMessage messagesElement = PubsubMessage.newBuilder()
    *     .setData(data)
@@ -426,7 +455,7 @@ public final UnaryCallable updateTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ByteString data = ByteString.copyFromUtf8("");
    *   PubsubMessage messagesElement = PubsubMessage.newBuilder()
    *     .setData(data)
@@ -454,7 +483,7 @@ public final UnaryCallable updateTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic response = topicAdminClient.getTopic(topic);
    * }
    * 
@@ -463,7 +492,7 @@ public final UnaryCallable updateTopicCallable() { * `projects/{project}/topics/{topic}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Topic getTopic(ProjectTopicName topic) { + public final Topic getTopic(TopicName topic) { GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); return getTopic(request); @@ -477,7 +506,7 @@ public final Topic getTopic(ProjectTopicName topic) { * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   Topic response = topicAdminClient.getTopic(topic.toString());
    * }
    * 
@@ -500,6 +529,30 @@ public final Topic getTopic(String topic) { *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
    *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   Topic response = topicAdminClient.getTopic(topic);
+   * }
+   * 
+ * + * @param topic Required. The name of the topic to get. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getTopic(TopicName)} instead. + */ + public final Topic getTopic(ProjectTopicName topic) { + GetTopicRequest request = + GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); + return getTopic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the configuration of a topic. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   GetTopicRequest request = GetTopicRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -522,7 +575,7 @@ public final Topic getTopic(GetTopicRequest request) {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   GetTopicRequest request = GetTopicRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -675,7 +728,7 @@ public final UnaryCallable listTopicsCall
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) {
    *     // doThingsWith(element);
    *   }
@@ -686,7 +739,7 @@ public final UnaryCallable listTopicsCall
    *     `projects/{project}/topics/{topic}`.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) {
+  public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName topic) {
     ListTopicSubscriptionsRequest request =
         ListTopicSubscriptionsRequest.newBuilder()
             .setTopic(topic == null ? null : topic.toString())
@@ -702,7 +755,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectT
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic.toString()).iterateAllAsProjectSubscriptionName()) {
    *     // doThingsWith(element);
    *   }
@@ -728,6 +781,34 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
    *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param topic Required. The name of the topic that subscriptions are attached to. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #listTopicSubscriptions(TopicName)} instead. + */ + public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) { + ListTopicSubscriptionsRequest request = + ListTopicSubscriptionsRequest.newBuilder() + .setTopic(topic == null ? null : topic.toString()) + .build(); + return listTopicSubscriptions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the subscriptions on this topic. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ListTopicSubscriptionsRequest request = ListTopicSubscriptionsRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -753,7 +834,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ListTopicSubscriptionsRequest request = ListTopicSubscriptionsRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -778,7 +859,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   ListTopicSubscriptionsRequest request = ListTopicSubscriptionsRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -813,7 +894,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   topicAdminClient.deleteTopic(topic);
    * }
    * 
@@ -822,7 +903,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( * `projects/{project}/topics/{topic}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteTopic(ProjectTopicName topic) { + public final void deleteTopic(TopicName topic) { DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); deleteTopic(request); @@ -839,7 +920,7 @@ public final void deleteTopic(ProjectTopicName topic) { * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   topicAdminClient.deleteTopic(topic.toString());
    * }
    * 
@@ -865,6 +946,33 @@ public final void deleteTopic(String topic) { *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
    *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   topicAdminClient.deleteTopic(topic);
+   * }
+   * 
+ * + * @param topic Required. Name of the topic to delete. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #deleteTopic(TopicName)} instead. + */ + public final void deleteTopic(ProjectTopicName topic) { + DeleteTopicRequest request = + DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); + deleteTopic(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a + * topic is deleted, a new topic may be created with the same name; this is an entirely new topic + * with none of the old configuration or subscriptions. Existing subscriptions to this topic are + * not deleted, but their `topic` field is set to `_deleted-topic_`. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   DeleteTopicRequest request = DeleteTopicRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -890,7 +998,7 @@ public final void deleteTopic(DeleteTopicRequest request) {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
    *   DeleteTopicRequest request = DeleteTopicRequest.newBuilder()
    *     .setTopic(topic.toString())
    *     .build();
@@ -914,23 +1022,21 @@ public final UnaryCallable deleteTopicCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   Policy policy = Policy.newBuilder().build();
-   *   Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   Policy response = topicAdminClient.setIamPolicy(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the - * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud - * Platform services (such as Projects) might reject them. + * @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 Policy setIamPolicy(String resource, Policy policy) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); - return setIamPolicy(request); + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -945,19 +1051,22 @@ public final Policy setIamPolicy(String resource, Policy policy) { * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]"); * Policy policy = Policy.newBuilder().build(); - * SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - * .setResource(formattedResource) - * .setPolicy(policy) - * .build(); - * Policy response = topicAdminClient.setIamPolicy(request); + * Policy response = topicAdminClient.setIamPolicy(formattedResource, policy); * } *
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead. */ - public final Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -970,10 +1079,10 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   Policy policy = Policy.newBuilder().build();
    *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .setPolicy(policy)
    *     .build();
    *   ApiFuture<Policy> future = topicAdminClient.setIamPolicyCallable().futureCall(request);
@@ -995,18 +1104,19 @@ public final UnaryCallable setIamPolicyCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
-   *   Policy response = topicAdminClient.getIamPolicy(formattedResource);
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   Policy response = topicAdminClient.getIamPolicy(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. + * @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 Policy getIamPolicy(String resource) { - GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); - return getIamPolicy(request); + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1019,18 +1129,18 @@ public final Policy getIamPolicy(String resource) { *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
    *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
-   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
-   *     .build();
-   *   Policy response = topicAdminClient.getIamPolicy(request);
+   *   Policy response = topicAdminClient.getIamPolicy(formattedResource);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead. */ - public final Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1042,9 +1152,9 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .build();
    *   ApiFuture<Policy> future = topicAdminClient.getIamPolicyCallable().futureCall(request);
    *   // Do something
@@ -1069,27 +1179,21 @@ public final UnaryCallable getIamPolicyCallable() {
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(request);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy detail is being requested. See the - * operation documentation for the appropriate value for this field. - * @param permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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 TestIamPermissionsResponse testIamPermissions( - String resource, List permissions) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(resource) - .addAllPermissions(permissions) - .build(); - return testIamPermissions(request); + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1107,19 +1211,26 @@ public final TestIamPermissionsResponse testIamPermissions( * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]"); * List<String> permissions = new ArrayList<>(); - * TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - * .setResource(formattedResource) - * .addAllPermissions(permissions) - * .build(); - * TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(request); + * TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions); * } *
* - * @param request The request object containing all of the parameters for the API call. + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead. */ - public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1135,10 +1246,10 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
-   *     .setResource(formattedResource)
+   *     .setResource(resource.toString())
    *     .addAllPermissions(permissions)
    *     .build();
    *   ApiFuture<TestIamPermissionsResponse> future = topicAdminClient.testIamPermissionsCallable().futureCall(request);
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 1df92ab40..f7d1e28c2 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
@@ -31,7 +31,7 @@
  * 
  * 
  * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ *   TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
  *   Topic response = topicAdminClient.createTopic(name);
  * }
  * 
@@ -51,7 +51,7 @@
  * 
  * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
  *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
- *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+ *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
  *   PushConfig pushConfig = PushConfig.newBuilder().build();
  *   int ackDeadlineSeconds = 0;
  *   Subscription response = subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
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 34f4f2cda..356f1c207 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
@@ -94,7 +94,6 @@ public void testTopicPolicy() {
     ProjectTopicName topicName =
         ProjectTopicName.of(projectId, formatForTest("testing-topic-policy"));
     topicAdminClient.createTopic(topicName);
-
     Policy policy = topicAdminClient.getIamPolicy(topicName.toString());
     Binding binding =
         Binding.newBuilder().setRole("roles/viewer").addMembers("allAuthenticatedUsers").build();
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 cd9367837..bfe959b50 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
@@ -29,6 +29,7 @@
 import com.google.api.gax.rpc.BidiStreamingCallable;
 import com.google.api.gax.rpc.InvalidArgumentException;
 import com.google.api.gax.rpc.StatusCode;
+import com.google.api.resourcenames.ResourceName;
 import com.google.common.collect.Lists;
 import com.google.iam.v1.GetIamPolicyRequest;
 import com.google.iam.v1.Policy;
@@ -54,11 +55,9 @@
 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;
 import com.google.pubsub.v1.PushConfig;
-import com.google.pubsub.v1.ReceivedMessage;
 import com.google.pubsub.v1.SeekRequest;
 import com.google.pubsub.v1.SeekResponse;
 import com.google.pubsub.v1.Snapshot;
@@ -131,10 +130,11 @@ public void tearDown() throws Exception {
   @SuppressWarnings("all")
   public void createSubscriptionTest() {
     ProjectSubscriptionName name2 = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-    TopicName topic2 = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic2 = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     int ackDeadlineSeconds2 = 921632575;
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
+    String filter = "filter-1274492040";
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name2.toString())
@@ -142,11 +142,12 @@ public void createSubscriptionTest() {
             .setAckDeadlineSeconds(ackDeadlineSeconds2)
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
+            .setFilter(filter)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
     ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     PushConfig pushConfig = PushConfig.newBuilder().build();
     int ackDeadlineSeconds = 2135351438;
 
@@ -159,7 +160,7 @@ public void createSubscriptionTest() {
     Subscription actualRequest = (Subscription) actualRequests.get(0);
 
     Assert.assertEquals(name, ProjectSubscriptionName.parse(actualRequest.getName()));
-    Assert.assertEquals(Objects.toString(topic), actualRequest.getTopic());
+    Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic()));
     Assert.assertEquals(pushConfig, actualRequest.getPushConfig());
     Assert.assertEquals(ackDeadlineSeconds, actualRequest.getAckDeadlineSeconds());
     Assert.assertTrue(
@@ -176,7 +177,7 @@ public void createSubscriptionExceptionTest() throws Exception {
 
     try {
       ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-      ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
       PushConfig pushConfig = PushConfig.newBuilder().build();
       int ackDeadlineSeconds = 2135351438;
 
@@ -191,10 +192,11 @@ public void createSubscriptionExceptionTest() throws Exception {
   @SuppressWarnings("all")
   public void getSubscriptionTest() {
     ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-    TopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     int ackDeadlineSeconds = 2135351438;
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
+    String filter = "filter-1274492040";
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name.toString())
@@ -202,6 +204,7 @@ public void getSubscriptionTest() {
             .setAckDeadlineSeconds(ackDeadlineSeconds)
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
+            .setFilter(filter)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
@@ -244,10 +247,11 @@ public void getSubscriptionExceptionTest() throws Exception {
   @SuppressWarnings("all")
   public void updateSubscriptionTest() {
     ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
-    TopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     int ackDeadlineSeconds2 = 921632575;
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
+    String filter = "filter-1274492040";
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name.toString())
@@ -255,6 +259,7 @@ public void updateSubscriptionTest() {
             .setAckDeadlineSeconds(ackDeadlineSeconds2)
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
+            .setFilter(filter)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
@@ -538,10 +543,7 @@ public void pullExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void streamingPullTest() throws Exception {
-    ReceivedMessage receivedMessagesElement = ReceivedMessage.newBuilder().build();
-    List receivedMessages = Arrays.asList(receivedMessagesElement);
-    StreamingPullResponse expectedResponse =
-        StreamingPullResponse.newBuilder().addAllReceivedMessages(receivedMessages).build();
+    StreamingPullResponse expectedResponse = StreamingPullResponse.newBuilder().build();
     mockSubscriber.addResponse(expectedResponse);
     ProjectSubscriptionName subscription =
         ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
@@ -695,7 +697,7 @@ public void listSnapshotsExceptionTest() throws Exception {
   @SuppressWarnings("all")
   public void createSnapshotTest() {
     ProjectSnapshotName name2 = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     Snapshot expectedResponse =
         Snapshot.newBuilder().setName(name2.toString()).setTopic(topic.toString()).build();
     mockSubscriber.addResponse(expectedResponse);
@@ -742,7 +744,7 @@ public void createSnapshotExceptionTest() throws Exception {
   @SuppressWarnings("all")
   public void updateSnapshotTest() {
     ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     Snapshot expectedResponse =
         Snapshot.newBuilder().setName(name.toString()).setTopic(topic.toString()).build();
     mockSubscriber.addResponse(expectedResponse);
@@ -886,17 +888,19 @@ public void setIamPolicyTest() {
     Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
     Policy policy = Policy.newBuilder().build();
+    SetIamPolicyRequest request =
+        SetIamPolicyRequest.newBuilder().setResource(resource.toString()).setPolicy(policy).build();
 
-    Policy actualResponse = client.setIamPolicy(formattedResource, policy);
+    Policy actualResponse = client.setIamPolicy(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     SetIamPolicyRequest actualRequest = (SetIamPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertEquals(policy, actualRequest.getPolicy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -911,10 +915,15 @@ public void setIamPolicyExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
       Policy policy = Policy.newBuilder().build();
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(resource.toString())
+              .setPolicy(policy)
+              .build();
 
-      client.setIamPolicy(formattedResource, policy);
+      client.setIamPolicy(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -929,16 +938,18 @@ public void getIamPolicyTest() {
     Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
+    GetIamPolicyRequest request =
+        GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build();
 
-    Policy actualResponse = client.getIamPolicy(formattedResource);
+    Policy actualResponse = client.getIamPolicy(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -952,9 +963,11 @@ public void getIamPolicyExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build();
 
-      client.getIamPolicy(formattedResource);
+      client.getIamPolicy(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -967,18 +980,22 @@ public void testIamPermissionsTest() {
     TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
     List permissions = new ArrayList<>();
+    TestIamPermissionsRequest request =
+        TestIamPermissionsRequest.newBuilder()
+            .setResource(resource.toString())
+            .addAllPermissions(permissions)
+            .build();
 
-    TestIamPermissionsResponse actualResponse =
-        client.testIamPermissions(formattedResource, permissions);
+    TestIamPermissionsResponse actualResponse = client.testIamPermissions(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertEquals(permissions, actualRequest.getPermissionsList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -993,10 +1010,15 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectSubscriptionName.format("[PROJECT]", "[SUBSCRIPTION]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
       List permissions = new ArrayList<>();
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(resource.toString())
+              .addAllPermissions(permissions)
+              .build();
 
-      client.testIamPermissions(formattedResource, permissions);
+      client.testIamPermissions(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
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 72d7bf86c..7d524361b 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
@@ -25,6 +25,7 @@
 import com.google.api.gax.grpc.testing.MockServiceHelper;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.InvalidArgumentException;
+import com.google.api.resourcenames.ResourceName;
 import com.google.common.collect.Lists;
 import com.google.iam.v1.GetIamPolicyRequest;
 import com.google.iam.v1.Policy;
@@ -43,11 +44,11 @@
 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;
 import com.google.pubsub.v1.PubsubMessage;
 import com.google.pubsub.v1.Topic;
+import com.google.pubsub.v1.TopicName;
 import com.google.pubsub.v1.UpdateTopicRequest;
 import io.grpc.Status;
 import io.grpc.StatusRuntimeException;
@@ -55,6 +56,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 import java.util.UUID;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -109,13 +111,13 @@ public void tearDown() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void createTopicTest() {
-    ProjectTopicName name2 = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName name2 = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     String kmsKeyName = "kmsKeyName2094986649";
     Topic expectedResponse =
         Topic.newBuilder().setName(name2.toString()).setKmsKeyName(kmsKeyName).build();
     mockPublisher.addResponse(expectedResponse);
 
-    ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
     Topic actualResponse = client.createTopic(name);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -124,7 +126,7 @@ public void createTopicTest() {
     Assert.assertEquals(1, actualRequests.size());
     Topic actualRequest = (Topic) actualRequests.get(0);
 
-    Assert.assertEquals(name, ProjectTopicName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, TopicName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -138,7 +140,7 @@ public void createTopicExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
       client.createTopic(name);
       Assert.fail("No exception raised");
@@ -150,7 +152,7 @@ public void createTopicExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateTopicTest() {
-    ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     String kmsKeyName = "kmsKeyName2094986649";
     Topic expectedResponse =
         Topic.newBuilder().setName(name.toString()).setKmsKeyName(kmsKeyName).build();
@@ -204,7 +206,7 @@ public void publishTest() {
         PublishResponse.newBuilder().addAllMessageIds(messageIds).build();
     mockPublisher.addResponse(expectedResponse);
 
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     ByteString data = ByteString.copyFromUtf8("-86");
     PubsubMessage messagesElement = PubsubMessage.newBuilder().setData(data).build();
     List messages = Arrays.asList(messagesElement);
@@ -216,7 +218,7 @@ public void publishTest() {
     Assert.assertEquals(1, actualRequests.size());
     PublishRequest actualRequest = (PublishRequest) actualRequests.get(0);
 
-    Assert.assertEquals(topic, ProjectTopicName.parse(actualRequest.getTopic()));
+    Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic()));
     Assert.assertEquals(messages, actualRequest.getMessagesList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -231,7 +233,7 @@ public void publishExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
       ByteString data = ByteString.copyFromUtf8("-86");
       PubsubMessage messagesElement = PubsubMessage.newBuilder().setData(data).build();
       List messages = Arrays.asList(messagesElement);
@@ -246,13 +248,13 @@ public void publishExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void getTopicTest() {
-    ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName name = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
     String kmsKeyName = "kmsKeyName2094986649";
     Topic expectedResponse =
         Topic.newBuilder().setName(name.toString()).setKmsKeyName(kmsKeyName).build();
     mockPublisher.addResponse(expectedResponse);
 
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
     Topic actualResponse = client.getTopic(topic);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -261,7 +263,7 @@ public void getTopicTest() {
     Assert.assertEquals(1, actualRequests.size());
     GetTopicRequest actualRequest = (GetTopicRequest) actualRequests.get(0);
 
-    Assert.assertEquals(topic, ProjectTopicName.parse(actualRequest.getTopic()));
+    Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -275,7 +277,7 @@ public void getTopicExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
       client.getTopic(topic);
       Assert.fail("No exception raised");
@@ -346,7 +348,7 @@ public void listTopicSubscriptionsTest() {
             .build();
     mockPublisher.addResponse(expectedResponse);
 
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
     ListTopicSubscriptionsPagedResponse pagedListResponse = client.listTopicSubscriptions(topic);
 
@@ -365,7 +367,7 @@ public void listTopicSubscriptionsTest() {
     ListTopicSubscriptionsRequest actualRequest =
         (ListTopicSubscriptionsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(topic, ProjectTopicName.parse(actualRequest.getTopic()));
+    Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -379,7 +381,7 @@ public void listTopicSubscriptionsExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
       client.listTopicSubscriptions(topic);
       Assert.fail("No exception raised");
@@ -394,7 +396,7 @@ public void deleteTopicTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockPublisher.addResponse(expectedResponse);
 
-    ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+    TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
     client.deleteTopic(topic);
 
@@ -402,7 +404,7 @@ public void deleteTopicTest() {
     Assert.assertEquals(1, actualRequests.size());
     DeleteTopicRequest actualRequest = (DeleteTopicRequest) actualRequests.get(0);
 
-    Assert.assertEquals(topic, ProjectTopicName.parse(actualRequest.getTopic()));
+    Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -416,7 +418,7 @@ public void deleteTopicExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+      TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
 
       client.deleteTopic(topic);
       Assert.fail("No exception raised");
@@ -433,17 +435,19 @@ public void setIamPolicyTest() {
     Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
     Policy policy = Policy.newBuilder().build();
+    SetIamPolicyRequest request =
+        SetIamPolicyRequest.newBuilder().setResource(resource.toString()).setPolicy(policy).build();
 
-    Policy actualResponse = client.setIamPolicy(formattedResource, policy);
+    Policy actualResponse = client.setIamPolicy(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     SetIamPolicyRequest actualRequest = (SetIamPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertEquals(policy, actualRequest.getPolicy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -458,10 +462,15 @@ public void setIamPolicyExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
       Policy policy = Policy.newBuilder().build();
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(resource.toString())
+              .setPolicy(policy)
+              .build();
 
-      client.setIamPolicy(formattedResource, policy);
+      client.setIamPolicy(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -476,16 +485,18 @@ public void getIamPolicyTest() {
     Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
+    GetIamPolicyRequest request =
+        GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build();
 
-    Policy actualResponse = client.getIamPolicy(formattedResource);
+    Policy actualResponse = client.getIamPolicy(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -499,9 +510,11 @@ public void getIamPolicyExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build();
 
-      client.getIamPolicy(formattedResource);
+      client.getIamPolicy(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -514,18 +527,22 @@ public void testIamPermissionsTest() {
     TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build();
     mockIAMPolicy.addResponse(expectedResponse);
 
-    String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+    ResourceName resource = ProjectName.of("[PROJECT]");
     List permissions = new ArrayList<>();
+    TestIamPermissionsRequest request =
+        TestIamPermissionsRequest.newBuilder()
+            .setResource(resource.toString())
+            .addAllPermissions(permissions)
+            .build();
 
-    TestIamPermissionsResponse actualResponse =
-        client.testIamPermissions(formattedResource, permissions);
+    TestIamPermissionsResponse actualResponse = client.testIamPermissions(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockIAMPolicy.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedResource, actualRequest.getResource());
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
     Assert.assertEquals(permissions, actualRequest.getPermissionsList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -540,10 +557,15 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockIAMPolicy.addException(exception);
 
     try {
-      String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+      ResourceName resource = ProjectName.of("[PROJECT]");
       List permissions = new ArrayList<>();
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(resource.toString())
+              .addAllPermissions(permissions)
+              .build();
 
-      client.testIamPermissions(formattedResource, permissions);
+      client.testIamPermissions(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java
index 9549f7c65..abfffb2ee 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java
@@ -122,7 +122,7 @@ public String toString() {
   }
 
   /** Builder for ProjectTopicName. */
-  public static class Builder {
+  public static class Builder extends TopicName.Builder {
 
     private String project;
     private String topic;
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
index 44f66abf3..419f8a825 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
@@ -99,6 +99,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_pubsub_v1_Subscription_LabelsEntry_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_pubsub_v1_RetryPolicy_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -273,8 +277,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "oken\030\003 \001(\t\"H\n\032ListTopicSnapshotsResponse"
           + "\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_token\030\002"
           + " \001(\t\"H\n\022DeleteTopicRequest\0222\n\005topic\030\001 \001("
-          + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"\351"
-          + "\004\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005to"
+          + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"\256"
+          + "\005\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005to"
           + "pic\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com"
           + "/Topic\0221\n\013push_config\030\004 \001(\0132\034.google.pub"
           + "sub.v1.PushConfig\022\034\n\024ack_deadline_second"
@@ -284,200 +288,205 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "google.pubsub.v1.Subscription.LabelsEntr"
           + "y\022\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021ex"
           + "piration_policy\030\013 \001(\0132\".google.pubsub.v1"
-          + ".ExpirationPolicy\022>\n\022dead_letter_policy\030"
-          + "\r \001(\0132\".google.pubsub.v1.DeadLetterPolic"
-          + "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002"
-          + " \001(\t:\0028\001:X\352AU\n\"pubsub.googleapis.com/Sub"
-          + "scription\022/projects/{project}/subscripti"
-          + "ons/{subscription}\"L\n\020DeadLetterPolicy\022\031"
-          + "\n\021dead_letter_topic\030\001 \001(\t\022\035\n\025max_deliver"
-          + "y_attempts\030\002 \001(\005\":\n\020ExpirationPolicy\022&\n\003"
-          + "ttl\030\001 \001(\0132\031.google.protobuf.Duration\"\255\002\n"
-          + "\nPushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nat"
-          + "tributes\030\002 \003(\0132,.google.pubsub.v1.PushCo"
-          + "nfig.AttributesEntry\022<\n\noidc_token\030\003 \001(\013"
-          + "2&.google.pubsub.v1.PushConfig.OidcToken"
-          + "H\000\032<\n\tOidcToken\022\035\n\025service_account_email"
-          + "\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t\0321\n\017AttributesEn"
-          + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025a"
-          + "uthentication_method\"m\n\017ReceivedMessage\022"
-          + "\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 \001(\0132\037.googl"
-          + "e.pubsub.v1.PubsubMessage\022\030\n\020delivery_at"
-          + "tempt\030\003 \001(\005\"Z\n\026GetSubscriptionRequest\022@\n"
-          + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog"
-          + "leapis.com/Subscription\"\214\001\n\031UpdateSubscr"
-          + "iptionRequest\0229\n\014subscription\030\001 \001(\0132\036.go"
-          + "ogle.pubsub.v1.SubscriptionB\003\340A\002\0224\n\013upda"
-          + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas"
-          + "kB\003\340A\002\"\207\001\n\030ListSubscriptionsRequest\022D\n\007p"
-          + "roject\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanag"
-          + "er.googleapis.com/Project\022\021\n\tpage_size\030\002"
-          + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031ListSubscrip"
-          + "tionsResponse\0225\n\rsubscriptions\030\001 \003(\0132\036.g"
-          + "oogle.pubsub.v1.Subscription\022\027\n\017next_pag"
-          + "e_token\030\002 \001(\t\"]\n\031DeleteSubscriptionReque"
+          + ".ExpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dea"
+          + "d_letter_policy\030\r \001(\0132\".google.pubsub.v1"
+          + ".DeadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132"
+          + "\035.google.pubsub.v1.RetryPolicy\032-\n\013Labels"
+          + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352"
+          + "AU\n\"pubsub.googleapis.com/Subscription\022/"
+          + "projects/{project}/subscriptions/{subscr"
+          + "iption}\"u\n\013RetryPolicy\0222\n\017minimum_backof"
+          + "f\030\001 \001(\0132\031.google.protobuf.Duration\0222\n\017ma"
+          + "ximum_backoff\030\002 \001(\0132\031.google.protobuf.Du"
+          + "ration\"L\n\020DeadLetterPolicy\022\031\n\021dead_lette"
+          + "r_topic\030\001 \001(\t\022\035\n\025max_delivery_attempts\030\002"
+          + " \001(\005\":\n\020ExpirationPolicy\022&\n\003ttl\030\001 \001(\0132\031."
+          + "google.protobuf.Duration\"\255\002\n\nPushConfig\022"
+          + "\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003"
+          + "(\0132,.google.pubsub.v1.PushConfig.Attribu"
+          + "tesEntry\022<\n\noidc_token\030\003 \001(\0132&.google.pu"
+          + "bsub.v1.PushConfig.OidcTokenH\000\032<\n\tOidcTo"
+          + "ken\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010au"
+          + "dience\030\002 \001(\t\0321\n\017AttributesEntry\022\013\n\003key\030\001"
+          + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025authenticatio"
+          + "n_method\"m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 "
+          + "\001(\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1."
+          + "PubsubMessage\022\030\n\020delivery_attempt\030\003 \001(\005\""
+          + "Z\n\026GetSubscriptionRequest\022@\n\014subscriptio"
+          + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S"
+          + "ubscription\"\214\001\n\031UpdateSubscriptionReques"
+          + "t\0229\n\014subscription\030\001 \001(\0132\036.google.pubsub."
+          + "v1.SubscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001("
+          + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\207\001\n\030L"
+          + "istSubscriptionsRequest\022D\n\007project\030\001 \001(\t"
+          + "B3\340A\002\372A-\n+cloudresourcemanager.googleapi"
+          + "s.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage"
+          + "_token\030\003 \001(\t\"k\n\031ListSubscriptionsRespons"
+          + "e\0225\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub"
+          + ".v1.Subscription\022\027\n\017next_page_token\030\002 \001("
+          + "\t\"]\n\031DeleteSubscriptionRequest\022@\n\014subscr"
+          + "iption\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis."
+          + "com/Subscription\"\223\001\n\027ModifyPushConfigReq"
+          + "uest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubs"
+          + "ub.googleapis.com/Subscription\0226\n\013push_c"
+          + "onfig\030\002 \001(\0132\034.google.pubsub.v1.PushConfi"
+          + "gB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001"
+          + " \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subs"
+          + "cription\022!\n\022return_immediately\030\002 \001(\010B\005\030\001"
+          + "\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"L\n\014PullRe"
+          + "sponse\022<\n\021received_messages\030\001 \003(\0132!.goog"
+          + "le.pubsub.v1.ReceivedMessage\"\225\001\n\030ModifyA"
+          + "ckDeadlineRequest\022@\n\014subscription\030\001 \001(\tB"
+          + "*\340A\002\372A$\n\"pubsub.googleapis.com/Subscript"
+          + "ion\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadlin"
+          + "e_seconds\030\003 \001(\005B\003\340A\002\"l\n\022AcknowledgeReque"
           + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub"
-          + ".googleapis.com/Subscription\"\223\001\n\027ModifyP"
-          + "ushConfigRequest\022@\n\014subscription\030\001 \001(\tB*"
-          + "\340A\002\372A$\n\"pubsub.googleapis.com/Subscripti"
-          + "on\0226\n\013push_config\030\002 \001(\0132\034.google.pubsub."
-          + "v1.PushConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014su"
-          + "bscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googlea"
-          + "pis.com/Subscription\022!\n\022return_immediate"
-          + "ly\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340"
-          + "A\002\"L\n\014PullResponse\022<\n\021received_messages\030"
-          + "\001 \003(\0132!.google.pubsub.v1.ReceivedMessage"
-          + "\"\225\001\n\030ModifyAckDeadlineRequest\022@\n\014subscri"
-          + "ption\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.c"
-          + "om/Subscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n"
-          + "\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022Ackn"
-          + "owledgeRequest\022@\n\014subscription\030\001 \001(\tB*\340A"
-          + "\002\372A$\n\"pubsub.googleapis.com/Subscription"
-          + "\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\350\001\n\024StreamingPull"
-          + "Request\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"p"
-          + "ubsub.googleapis.com/Subscription\022\017\n\007ack"
-          + "_ids\030\002 \003(\t\022\037\n\027modify_deadline_seconds\030\003 "
-          + "\003(\005\022\037\n\027modify_deadline_ack_ids\030\004 \003(\t\022(\n\033"
-          + "stream_ack_deadline_seconds\030\005 \001(\005B\003\340A\002\022\021"
-          + "\n\tclient_id\030\006 \001(\t\"U\n\025StreamingPullRespon"
-          + "se\022<\n\021received_messages\030\001 \003(\0132!.google.p"
-          + "ubsub.v1.ReceivedMessage\"\203\002\n\025CreateSnaps"
-          + "hotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub"
-          + ".googleapis.com/Snapshot\022@\n\014subscription"
-          + "\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su"
-          + "bscription\022C\n\006labels\030\003 \003(\01323.google.pubs"
-          + "ub.v1.CreateSnapshotRequest.LabelsEntry\032"
-          + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
-          + "(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest\0221\n\010snap"
-          + "shot\030\001 \001(\0132\032.google.pubsub.v1.SnapshotB\003"
-          + "\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protob"
-          + "uf.FieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001"
-          + " \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.googlea"
-          + "pis.com/Topic\022/\n\013expire_time\030\003 \001(\0132\032.goo"
-          + "gle.protobuf.Timestamp\0226\n\006labels\030\004 \003(\0132&"
-          + ".google.pubsub.v1.Snapshot.LabelsEntry\032-"
-          + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001("
-          + "\t:\0028\001:L\352AI\n\036pubsub.googleapis.com/Snapsh"
-          + "ot\022\'projects/{project}/snapshots/{snapsh"
-          + "ot}\"N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 "
-          + "\001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snaps"
-          + "hot\"\203\001\n\024ListSnapshotsRequest\022D\n\007project\030"
-          + "\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goog"
-          + "leapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n"
-          + "\npage_token\030\003 \001(\t\"_\n\025ListSnapshotsRespon"
-          + "se\022-\n\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1"
-          + ".Snapshot\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\025De"
-          + "leteSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340"
-          + "A\002\372A \n\036pubsub.googleapis.com/Snapshot\"\276\001"
-          + "\n\013SeekRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002"
-          + "\372A$\n\"pubsub.googleapis.com/Subscription\022"
-          + "*\n\004time\030\002 \001(\0132\032.google.protobuf.Timestam"
-          + "pH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036pubsub.googl"
-          + "eapis.com/SnapshotH\000B\010\n\006target\"\016\n\014SeekRe"
-          + "sponse2\363\t\n\tPublisher\022q\n\013CreateTopic\022\027.go"
-          + "ogle.pubsub.v1.Topic\032\027.google.pubsub.v1."
-          + "Topic\"0\202\323\344\223\002#\032\036/v1/{name=projects/*/topi"
-          + "cs/*}:\001*\332A\004name\022}\n\013UpdateTopic\022$.google."
-          + "pubsub.v1.UpdateTopicRequest\032\027.google.pu"
-          + "bsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topic.name=p"
-          + "rojects/*/topics/*}:\001*\022\223\001\n\007Publish\022 .goo"
-          + "gle.pubsub.v1.PublishRequest\032!.google.pu"
-          + "bsub.v1.PublishResponse\"C\202\323\344\223\002,\"\'/v1/{to"
-          + "pic=projects/*/topics/*}:publish:\001*\332A\016to"
-          + "pic,messages\022w\n\010GetTopic\022!.google.pubsub"
-          + ".v1.GetTopicRequest\032\027.google.pubsub.v1.T"
-          + "opic\"/\202\323\344\223\002!\022\037/v1/{topic=projects/*/topi"
-          + "cs/*}\332A\005topic\022\212\001\n\nListTopics\022#.google.pu"
-          + "bsub.v1.ListTopicsRequest\032$.google.pubsu"
-          + "b.v1.ListTopicsResponse\"1\202\323\344\223\002!\022\037/v1/{pr"
-          + "oject=projects/*}/topics\332A\007project\022\272\001\n\026L"
-          + "istTopicSubscriptions\022/.google.pubsub.v1"
-          + ".ListTopicSubscriptionsRequest\0320.google."
-          + "pubsub.v1.ListTopicSubscriptionsResponse"
-          + "\"=\202\323\344\223\002/\022-/v1/{topic=projects/*/topics/*"
-          + "}/subscriptions\332A\005topic\022\252\001\n\022ListTopicSna"
-          + "pshots\022+.google.pubsub.v1.ListTopicSnaps"
-          + "hotsRequest\032,.google.pubsub.v1.ListTopic"
-          + "SnapshotsResponse\"9\202\323\344\223\002+\022)/v1/{topic=pr"
-          + "ojects/*/topics/*}/snapshots\332A\005topic\022|\n\013"
-          + "DeleteTopic\022$.google.pubsub.v1.DeleteTop"
-          + "icRequest\032\026.google.protobuf.Empty\"/\202\323\344\223\002"
-          + "!*\037/v1/{topic=projects/*/topics/*}\332A\005top"
-          + "ic\032p\312A\025pubsub.googleapis.com\322AUhttps://w"
-          + "ww.googleapis.com/auth/cloud-platform,ht"
-          + "tps://www.googleapis.com/auth/pubsub2\203\025\n"
-          + "\nSubscriber\022\264\001\n\022CreateSubscription\022\036.goo"
-          + "gle.pubsub.v1.Subscription\032\036.google.pubs"
-          + "ub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=pr"
-          + "ojects/*/subscriptions/*}:\001*\332A+name,topi"
-          + "c,push_config,ack_deadline_seconds\022\241\001\n\017G"
-          + "etSubscription\022(.google.pubsub.v1.GetSub"
-          + "scriptionRequest\032\036.google.pubsub.v1.Subs"
-          + "cription\"D\202\323\344\223\002/\022-/v1/{subscription=proj"
-          + "ects/*/subscriptions/*}\332A\014subscription\022\240"
-          + "\001\n\022UpdateSubscription\022+.google.pubsub.v1"
-          + ".UpdateSubscriptionRequest\032\036.google.pubs"
-          + "ub.v1.Subscription\"=\202\323\344\223\002722/v1/{subscri"
-          + "ption.name=projects/*/subscriptions/*}:\001"
-          + "*\022\246\001\n\021ListSubscriptions\022*.google.pubsub."
-          + "v1.ListSubscriptionsRequest\032+.google.pub"
-          + "sub.v1.ListSubscriptionsResponse\"8\202\323\344\223\002("
-          + "\022&/v1/{project=projects/*}/subscriptions"
-          + "\332A\007project\022\237\001\n\022DeleteSubscription\022+.goog"
-          + "le.pubsub.v1.DeleteSubscriptionRequest\032\026"
-          + ".google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{sub"
-          + "scription=projects/*/subscriptions/*}\332A\014"
-          + "subscription\022\317\001\n\021ModifyAckDeadline\022*.goo"
-          + "gle.pubsub.v1.ModifyAckDeadlineRequest\032\026"
-          + ".google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{sub"
-          + "scription=projects/*/subscriptions/*}:mo"
-          + "difyAckDeadline:\001*\332A)subscription,ack_id"
-          + "s,ack_deadline_seconds\022\250\001\n\013Acknowledge\022$"
-          + ".google.pubsub.v1.AcknowledgeRequest\032\026.g"
-          + "oogle.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{subsc"
-          + "ription=projects/*/subscriptions/*}:ackn"
-          + "owledge:\001*\332A\024subscription,ack_ids\022\263\001\n\004Pu"
-          + "ll\022\035.google.pubsub.v1.PullRequest\032\036.goog"
-          + "le.pubsub.v1.PullResponse\"l\202\323\344\223\0027\"2/v1/{"
-          + "subscription=projects/*/subscriptions/*}"
-          + ":pull:\001*\332A,subscription,return_immediate"
-          + "ly,max_messages\022f\n\rStreamingPull\022&.googl"
-          + "e.pubsub.v1.StreamingPullRequest\032\'.googl"
-          + "e.pubsub.v1.StreamingPullResponse\"\000(\0010\001\022"
-          + "\273\001\n\020ModifyPushConfig\022).google.pubsub.v1."
-          + "ModifyPushConfigRequest\032\026.google.protobu"
-          + "f.Empty\"d\202\323\344\223\002C\">/v1/{subscription=proje"
-          + "cts/*/subscriptions/*}:modifyPushConfig:"
-          + "\001*\332A\030subscription,push_config\022\211\001\n\013GetSna"
-          + "pshot\022$.google.pubsub.v1.GetSnapshotRequ"
-          + "est\032\032.google.pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022"
-          + "%/v1/{snapshot=projects/*/snapshots/*}\332A"
-          + "\010snapshot\022\226\001\n\rListSnapshots\022&.google.pub"
-          + "sub.v1.ListSnapshotsRequest\032\'.google.pub"
-          + "sub.v1.ListSnapshotsResponse\"4\202\323\344\223\002$\022\"/v"
-          + "1/{project=projects/*}/snapshots\332A\007proje"
-          + "ct\022\227\001\n\016CreateSnapshot\022\'.google.pubsub.v1"
-          + ".CreateSnapshotRequest\032\032.google.pubsub.v"
-          + "1.Snapshot\"@\202\323\344\223\002&\032!/v1/{name=projects/*"
-          + "/snapshots/*}:\001*\332A\021name,subscription\022\214\001\n"
-          + "\016UpdateSnapshot\022\'.google.pubsub.v1.Updat"
-          + "eSnapshotRequest\032\032.google.pubsub.v1.Snap"
-          + "shot\"5\202\323\344\223\002/2*/v1/{snapshot.name=project"
-          + "s/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'"
-          + ".google.pubsub.v1.DeleteSnapshotRequest\032"
-          + "\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%/v1/{sn"
-          + "apshot=projects/*/snapshots/*}\332A\010snapsho"
-          + "t\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekReques"
-          + "t\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344\223\002"
-          + "7\"2/v1/{subscription=projects/*/subscrip"
-          + "tions/*}:seek:\001*\032p\312A\025pubsub.googleapis.c"
-          + "om\322AUhttps://www.googleapis.com/auth/clo"
-          + "ud-platform,https://www.googleapis.com/a"
-          + "uth/pubsubB\256\001\n\024com.google.pubsub.v1B\013Pub"
-          + "subProtoP\001Z6google.golang.org/genproto/g"
-          + "oogleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google.C"
-          + "loud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352"
-          + "\002\031Google::Cloud::PubSub::V1b\006proto3"
+          + ".googleapis.com/Subscription\022\024\n\007ack_ids\030"
+          + "\002 \003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequest\022@\n\014s"
+          + "ubscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.google"
+          + "apis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037"
+          + "\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modif"
+          + "y_deadline_ack_ids\030\004 \003(\t\022(\n\033stream_ack_d"
+          + "eadline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030"
+          + "\006 \001(\t\"U\n\025StreamingPullResponse\022<\n\021receiv"
+          + "ed_messages\030\001 \003(\0132!.google.pubsub.v1.Rec"
+          + "eivedMessage\"\203\002\n\025CreateSnapshotRequest\0224"
+          + "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis."
+          + "com/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372"
+          + "A$\n\"pubsub.googleapis.com/Subscription\022C"
+          + "\n\006labels\030\003 \003(\01323.google.pubsub.v1.Create"
+          + "SnapshotRequest.LabelsEntry\032-\n\013LabelsEnt"
+          + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025U"
+          + "pdateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032"
+          + ".google.pubsub.v1.SnapshotB\003\340A\002\0224\n\013updat"
+          + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask"
+          + "B\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topi"
+          + "c\030\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topi"
+          + "c\022/\n\013expire_time\030\003 \001(\0132\032.google.protobuf"
+          + ".Timestamp\0226\n\006labels\030\004 \003(\0132&.google.pubs"
+          + "ub.v1.Snapshot.LabelsEntry\032-\n\013LabelsEntr"
+          + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036"
+          + "pubsub.googleapis.com/Snapshot\022\'projects"
+          + "/{project}/snapshots/{snapshot}\"N\n\022GetSn"
+          + "apshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n"
+          + "\036pubsub.googleapis.com/Snapshot\"\203\001\n\024List"
+          + "SnapshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A"
+          + "-\n+cloudresourcemanager.googleapis.com/P"
+          + "roject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030"
+          + "\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapsh"
+          + "ots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n"
+          + "\017next_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshot"
+          + "Request\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsu"
+          + "b.googleapis.com/Snapshot\"\276\001\n\013SeekReques"
+          + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub."
+          + "googleapis.com/Subscription\022*\n\004time\030\002 \001("
+          + "\0132\032.google.protobuf.TimestampH\000\0227\n\010snaps"
+          + "hot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Sn"
+          + "apshotH\000B\010\n\006target\"\016\n\014SeekResponse2\363\t\n\tP"
+          + "ublisher\022q\n\013CreateTopic\022\027.google.pubsub."
+          + "v1.Topic\032\027.google.pubsub.v1.Topic\"0\202\323\344\223\002"
+          + "#\032\036/v1/{name=projects/*/topics/*}:\001*\332A\004n"
+          + "ame\022}\n\013UpdateTopic\022$.google.pubsub.v1.Up"
+          + "dateTopicRequest\032\027.google.pubsub.v1.Topi"
+          + "c\"/\202\323\344\223\002)2$/v1/{topic.name=projects/*/to"
+          + "pics/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v"
+          + "1.PublishRequest\032!.google.pubsub.v1.Publ"
+          + "ishResponse\"C\202\323\344\223\002,\"\'/v1/{topic=projects"
+          + "/*/topics/*}:publish:\001*\332A\016topic,messages"
+          + "\022w\n\010GetTopic\022!.google.pubsub.v1.GetTopic"
+          + "Request\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002!"
+          + "\022\037/v1/{topic=projects/*/topics/*}\332A\005topi"
+          + "c\022\212\001\n\nListTopics\022#.google.pubsub.v1.List"
+          + "TopicsRequest\032$.google.pubsub.v1.ListTop"
+          + "icsResponse\"1\202\323\344\223\002!\022\037/v1/{project=projec"
+          + "ts/*}/topics\332A\007project\022\272\001\n\026ListTopicSubs"
+          + "criptions\022/.google.pubsub.v1.ListTopicSu"
+          + "bscriptionsRequest\0320.google.pubsub.v1.Li"
+          + "stTopicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v"
+          + "1/{topic=projects/*/topics/*}/subscripti"
+          + "ons\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.goo"
+          + "gle.pubsub.v1.ListTopicSnapshotsRequest\032"
+          + ",.google.pubsub.v1.ListTopicSnapshotsRes"
+          + "ponse\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/top"
+          + "ics/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022"
+          + "$.google.pubsub.v1.DeleteTopicRequest\032\026."
+          + "google.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topi"
+          + "c=projects/*/topics/*}\332A\005topic\032p\312A\025pubsu"
+          + "b.googleapis.com\322AUhttps://www.googleapi"
+          + "s.com/auth/cloud-platform,https://www.go"
+          + "ogleapis.com/auth/pubsub2\203\025\n\nSubscriber\022"
+          + "\264\001\n\022CreateSubscription\022\036.google.pubsub.v"
+          + "1.Subscription\032\036.google.pubsub.v1.Subscr"
+          + "iption\"^\202\323\344\223\002*\032%/v1/{name=projects/*/sub"
+          + "scriptions/*}:\001*\332A+name,topic,push_confi"
+          + "g,ack_deadline_seconds\022\241\001\n\017GetSubscripti"
+          + "on\022(.google.pubsub.v1.GetSubscriptionReq"
+          + "uest\032\036.google.pubsub.v1.Subscription\"D\202\323"
+          + "\344\223\002/\022-/v1/{subscription=projects/*/subsc"
+          + "riptions/*}\332A\014subscription\022\240\001\n\022UpdateSub"
+          + "scription\022+.google.pubsub.v1.UpdateSubsc"
+          + "riptionRequest\032\036.google.pubsub.v1.Subscr"
+          + "iption\"=\202\323\344\223\002722/v1/{subscription.name=p"
+          + "rojects/*/subscriptions/*}:\001*\022\246\001\n\021ListSu"
+          + "bscriptions\022*.google.pubsub.v1.ListSubsc"
+          + "riptionsRequest\032+.google.pubsub.v1.ListS"
+          + "ubscriptionsResponse\"8\202\323\344\223\002(\022&/v1/{proje"
+          + "ct=projects/*}/subscriptions\332A\007project\022\237"
+          + "\001\n\022DeleteSubscription\022+.google.pubsub.v1"
+          + ".DeleteSubscriptionRequest\032\026.google.prot"
+          + "obuf.Empty\"D\202\323\344\223\002/*-/v1/{subscription=pr"
+          + "ojects/*/subscriptions/*}\332A\014subscription"
+          + "\022\317\001\n\021ModifyAckDeadline\022*.google.pubsub.v"
+          + "1.ModifyAckDeadlineRequest\032\026.google.prot"
+          + "obuf.Empty\"v\202\323\344\223\002D\"?/v1/{subscription=pr"
+          + "ojects/*/subscriptions/*}:modifyAckDeadl"
+          + "ine:\001*\332A)subscription,ack_ids,ack_deadli"
+          + "ne_seconds\022\250\001\n\013Acknowledge\022$.google.pubs"
+          + "ub.v1.AcknowledgeRequest\032\026.google.protob"
+          + "uf.Empty\"[\202\323\344\223\002>\"9/v1/{subscription=proj"
+          + "ects/*/subscriptions/*}:acknowledge:\001*\332A"
+          + "\024subscription,ack_ids\022\263\001\n\004Pull\022\035.google."
+          + "pubsub.v1.PullRequest\032\036.google.pubsub.v1"
+          + ".PullResponse\"l\202\323\344\223\0027\"2/v1/{subscription"
+          + "=projects/*/subscriptions/*}:pull:\001*\332A,s"
+          + "ubscription,return_immediately,max_messa"
+          + "ges\022f\n\rStreamingPull\022&.google.pubsub.v1."
+          + "StreamingPullRequest\032\'.google.pubsub.v1."
+          + "StreamingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPu"
+          + "shConfig\022).google.pubsub.v1.ModifyPushCo"
+          + "nfigRequest\032\026.google.protobuf.Empty\"d\202\323\344"
+          + "\223\002C\">/v1/{subscription=projects/*/subscr"
+          + "iptions/*}:modifyPushConfig:\001*\332A\030subscri"
+          + "ption,push_config\022\211\001\n\013GetSnapshot\022$.goog"
+          + "le.pubsub.v1.GetSnapshotRequest\032\032.google"
+          + ".pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022%/v1/{snapsh"
+          + "ot=projects/*/snapshots/*}\332A\010snapshot\022\226\001"
+          + "\n\rListSnapshots\022&.google.pubsub.v1.ListS"
+          + "napshotsRequest\032\'.google.pubsub.v1.ListS"
+          + "napshotsResponse\"4\202\323\344\223\002$\022\"/v1/{project=p"
+          + "rojects/*}/snapshots\332A\007project\022\227\001\n\016Creat"
+          + "eSnapshot\022\'.google.pubsub.v1.CreateSnaps"
+          + "hotRequest\032\032.google.pubsub.v1.Snapshot\"@"
+          + "\202\323\344\223\002&\032!/v1/{name=projects/*/snapshots/*"
+          + "}:\001*\332A\021name,subscription\022\214\001\n\016UpdateSnaps"
+          + "hot\022\'.google.pubsub.v1.UpdateSnapshotReq"
+          + "uest\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223\002/"
+          + "2*/v1/{snapshot.name=projects/*/snapshot"
+          + "s/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubs"
+          + "ub.v1.DeleteSnapshotRequest\032\026.google.pro"
+          + "tobuf.Empty\"8\202\323\344\223\002\'*%/v1/{snapshot=proje"
+          + "cts/*/snapshots/*}\332A\010snapshot\022\204\001\n\004Seek\022\035"
+          + ".google.pubsub.v1.SeekRequest\032\036.google.p"
+          + "ubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subs"
+          + "cription=projects/*/subscriptions/*}:see"
+          + "k:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps:/"
+          + "/www.googleapis.com/auth/cloud-platform,"
+          + "https://www.googleapis.com/auth/pubsubB\256"
+          + "\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z6"
+          + "google.golang.org/genproto/googleapis/pu"
+          + "bsub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub."
+          + "V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cl"
+          + "oud::PubSub::V1b\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -634,7 +643,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Labels",
               "EnableMessageOrdering",
               "ExpirationPolicy",
+              "Filter",
               "DeadLetterPolicy",
+              "RetryPolicy",
             });
     internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor =
         internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0);
@@ -644,8 +655,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "Key", "Value",
             });
-    internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor =
+    internal_static_google_pubsub_v1_RetryPolicy_descriptor =
         getDescriptor().getMessageTypes().get(15);
+    internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_pubsub_v1_RetryPolicy_descriptor,
+            new java.lang.String[] {
+              "MinimumBackoff", "MaximumBackoff",
+            });
+    internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor =
+        getDescriptor().getMessageTypes().get(16);
     internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor,
@@ -653,7 +672,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "DeadLetterTopic", "MaxDeliveryAttempts",
             });
     internal_static_google_pubsub_v1_ExpirationPolicy_descriptor =
-        getDescriptor().getMessageTypes().get(16);
+        getDescriptor().getMessageTypes().get(17);
     internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ExpirationPolicy_descriptor,
@@ -661,7 +680,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Ttl",
             });
     internal_static_google_pubsub_v1_PushConfig_descriptor =
-        getDescriptor().getMessageTypes().get(17);
+        getDescriptor().getMessageTypes().get(18);
     internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_PushConfig_descriptor,
@@ -685,7 +704,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Key", "Value",
             });
     internal_static_google_pubsub_v1_ReceivedMessage_descriptor =
-        getDescriptor().getMessageTypes().get(18);
+        getDescriptor().getMessageTypes().get(19);
     internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ReceivedMessage_descriptor,
@@ -693,7 +712,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "AckId", "Message", "DeliveryAttempt",
             });
     internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(19);
+        getDescriptor().getMessageTypes().get(20);
     internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor,
@@ -701,7 +720,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription",
             });
     internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(20);
+        getDescriptor().getMessageTypes().get(21);
     internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor,
@@ -709,7 +728,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "UpdateMask",
             });
     internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor =
-        getDescriptor().getMessageTypes().get(21);
+        getDescriptor().getMessageTypes().get(22);
     internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor,
@@ -717,7 +736,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Project", "PageSize", "PageToken",
             });
     internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor =
-        getDescriptor().getMessageTypes().get(22);
+        getDescriptor().getMessageTypes().get(23);
     internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor,
@@ -725,7 +744,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscriptions", "NextPageToken",
             });
     internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(23);
+        getDescriptor().getMessageTypes().get(24);
     internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor,
@@ -733,7 +752,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription",
             });
     internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor =
-        getDescriptor().getMessageTypes().get(24);
+        getDescriptor().getMessageTypes().get(25);
     internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor,
@@ -741,7 +760,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "PushConfig",
             });
     internal_static_google_pubsub_v1_PullRequest_descriptor =
-        getDescriptor().getMessageTypes().get(25);
+        getDescriptor().getMessageTypes().get(26);
     internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_PullRequest_descriptor,
@@ -749,7 +768,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "ReturnImmediately", "MaxMessages",
             });
     internal_static_google_pubsub_v1_PullResponse_descriptor =
-        getDescriptor().getMessageTypes().get(26);
+        getDescriptor().getMessageTypes().get(27);
     internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_PullResponse_descriptor,
@@ -757,7 +776,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "ReceivedMessages",
             });
     internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor =
-        getDescriptor().getMessageTypes().get(27);
+        getDescriptor().getMessageTypes().get(28);
     internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor,
@@ -765,7 +784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "AckIds", "AckDeadlineSeconds",
             });
     internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor =
-        getDescriptor().getMessageTypes().get(28);
+        getDescriptor().getMessageTypes().get(29);
     internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor,
@@ -773,7 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "AckIds",
             });
     internal_static_google_pubsub_v1_StreamingPullRequest_descriptor =
-        getDescriptor().getMessageTypes().get(29);
+        getDescriptor().getMessageTypes().get(30);
     internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_StreamingPullRequest_descriptor,
@@ -786,7 +805,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "ClientId",
             });
     internal_static_google_pubsub_v1_StreamingPullResponse_descriptor =
-        getDescriptor().getMessageTypes().get(30);
+        getDescriptor().getMessageTypes().get(31);
     internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_StreamingPullResponse_descriptor,
@@ -794,7 +813,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "ReceivedMessages",
             });
     internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor =
-        getDescriptor().getMessageTypes().get(31);
+        getDescriptor().getMessageTypes().get(32);
     internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor,
@@ -810,7 +829,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Key", "Value",
             });
     internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor =
-        getDescriptor().getMessageTypes().get(32);
+        getDescriptor().getMessageTypes().get(33);
     internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor,
@@ -818,7 +837,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Snapshot", "UpdateMask",
             });
     internal_static_google_pubsub_v1_Snapshot_descriptor =
-        getDescriptor().getMessageTypes().get(33);
+        getDescriptor().getMessageTypes().get(34);
     internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_Snapshot_descriptor,
@@ -834,7 +853,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Key", "Value",
             });
     internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor =
-        getDescriptor().getMessageTypes().get(34);
+        getDescriptor().getMessageTypes().get(35);
     internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor,
@@ -842,7 +861,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Snapshot",
             });
     internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor =
-        getDescriptor().getMessageTypes().get(35);
+        getDescriptor().getMessageTypes().get(36);
     internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor,
@@ -850,7 +869,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Project", "PageSize", "PageToken",
             });
     internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor =
-        getDescriptor().getMessageTypes().get(36);
+        getDescriptor().getMessageTypes().get(37);
     internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor,
@@ -858,7 +877,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Snapshots", "NextPageToken",
             });
     internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor =
-        getDescriptor().getMessageTypes().get(37);
+        getDescriptor().getMessageTypes().get(38);
     internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor,
@@ -866,7 +885,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Snapshot",
             });
     internal_static_google_pubsub_v1_SeekRequest_descriptor =
-        getDescriptor().getMessageTypes().get(38);
+        getDescriptor().getMessageTypes().get(39);
     internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_SeekRequest_descriptor,
@@ -874,7 +893,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Subscription", "Time", "Snapshot", "Target",
             });
     internal_static_google_pubsub_v1_SeekResponse_descriptor =
-        getDescriptor().getMessageTypes().get(39);
+        getDescriptor().getMessageTypes().get(40);
     internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_pubsub_v1_SeekResponse_descriptor, new java.lang.String[] {});
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java
new file mode 100644
index 000000000..4d7f081ea
--- /dev/null
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java
@@ -0,0 +1,1033 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/pubsub/v1/pubsub.proto
+
+package com.google.pubsub.v1;
+
+/**
+ *
+ *
+ * 
+ * A policy that specifies how Cloud Pub/Sub retries message delivery.
+ * Retry delay will be exponential based on provided minimum and maximum
+ * backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
+ * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
+ * events for a given message.
+ * Retry Policy is implemented on a best effort basis. At times, the delay
+ * between consecutive deliveries may not match the configuration. That is,
+ * delay can be more or less than configured backoff.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.RetryPolicy} + */ +public final class RetryPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.RetryPolicy) + RetryPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetryPolicy.newBuilder() to construct. + private RetryPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetryPolicy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetryPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RetryPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (minimumBackoff_ != null) { + subBuilder = minimumBackoff_.toBuilder(); + } + minimumBackoff_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minimumBackoff_); + minimumBackoff_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maximumBackoff_ != null) { + subBuilder = maximumBackoff_.toBuilder(); + } + maximumBackoff_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maximumBackoff_); + maximumBackoff_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_RetryPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.RetryPolicy.class, com.google.pubsub.v1.RetryPolicy.Builder.class); + } + + public static final int MINIMUM_BACKOFF_FIELD_NUMBER = 1; + private com.google.protobuf.Duration minimumBackoff_; + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return Whether the minimumBackoff field is set. + */ + public boolean hasMinimumBackoff() { + return minimumBackoff_ != null; + } + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return The minimumBackoff. + */ + public com.google.protobuf.Duration getMinimumBackoff() { + return minimumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumBackoff_; + } + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { + return getMinimumBackoff(); + } + + public static final int MAXIMUM_BACKOFF_FIELD_NUMBER = 2; + private com.google.protobuf.Duration maximumBackoff_; + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return Whether the maximumBackoff field is set. + */ + public boolean hasMaximumBackoff() { + return maximumBackoff_ != null; + } + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return The maximumBackoff. + */ + public com.google.protobuf.Duration getMaximumBackoff() { + return maximumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumBackoff_; + } + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { + return getMaximumBackoff(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minimumBackoff_ != null) { + output.writeMessage(1, getMinimumBackoff()); + } + if (maximumBackoff_ != null) { + output.writeMessage(2, getMaximumBackoff()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minimumBackoff_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMinimumBackoff()); + } + if (maximumBackoff_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaximumBackoff()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.RetryPolicy)) { + return super.equals(obj); + } + com.google.pubsub.v1.RetryPolicy other = (com.google.pubsub.v1.RetryPolicy) obj; + + if (hasMinimumBackoff() != other.hasMinimumBackoff()) return false; + if (hasMinimumBackoff()) { + if (!getMinimumBackoff().equals(other.getMinimumBackoff())) return false; + } + if (hasMaximumBackoff() != other.hasMaximumBackoff()) return false; + if (hasMaximumBackoff()) { + if (!getMaximumBackoff().equals(other.getMaximumBackoff())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinimumBackoff()) { + hash = (37 * hash) + MINIMUM_BACKOFF_FIELD_NUMBER; + hash = (53 * hash) + getMinimumBackoff().hashCode(); + } + if (hasMaximumBackoff()) { + hash = (37 * hash) + MAXIMUM_BACKOFF_FIELD_NUMBER; + hash = (53 * hash) + getMaximumBackoff().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.RetryPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.RetryPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.RetryPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.RetryPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery.
+   * Retry delay will be exponential based on provided minimum and maximum
+   * backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
+   * events for a given message.
+   * Retry Policy is implemented on a best effort basis. At times, the delay
+   * between consecutive deliveries may not match the configuration. That is,
+   * delay can be more or less than configured backoff.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.RetryPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.RetryPolicy) + com.google.pubsub.v1.RetryPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_RetryPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.RetryPolicy.class, + com.google.pubsub.v1.RetryPolicy.Builder.class); + } + + // Construct using com.google.pubsub.v1.RetryPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (minimumBackoffBuilder_ == null) { + minimumBackoff_ = null; + } else { + minimumBackoff_ = null; + minimumBackoffBuilder_ = null; + } + if (maximumBackoffBuilder_ == null) { + maximumBackoff_ = null; + } else { + maximumBackoff_ = null; + maximumBackoffBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_RetryPolicy_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.RetryPolicy getDefaultInstanceForType() { + return com.google.pubsub.v1.RetryPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.RetryPolicy build() { + com.google.pubsub.v1.RetryPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.RetryPolicy buildPartial() { + com.google.pubsub.v1.RetryPolicy result = new com.google.pubsub.v1.RetryPolicy(this); + if (minimumBackoffBuilder_ == null) { + result.minimumBackoff_ = minimumBackoff_; + } else { + result.minimumBackoff_ = minimumBackoffBuilder_.build(); + } + if (maximumBackoffBuilder_ == null) { + result.maximumBackoff_ = maximumBackoff_; + } else { + result.maximumBackoff_ = maximumBackoffBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.RetryPolicy) { + return mergeFrom((com.google.pubsub.v1.RetryPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.RetryPolicy other) { + if (other == com.google.pubsub.v1.RetryPolicy.getDefaultInstance()) return this; + if (other.hasMinimumBackoff()) { + mergeMinimumBackoff(other.getMinimumBackoff()); + } + if (other.hasMaximumBackoff()) { + mergeMaximumBackoff(other.getMaximumBackoff()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.RetryPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.RetryPolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration minimumBackoff_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minimumBackoffBuilder_; + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return Whether the minimumBackoff field is set. + */ + public boolean hasMinimumBackoff() { + return minimumBackoffBuilder_ != null || minimumBackoff_ != null; + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return The minimumBackoff. + */ + public com.google.protobuf.Duration getMinimumBackoff() { + if (minimumBackoffBuilder_ == null) { + return minimumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumBackoff_; + } else { + return minimumBackoffBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public Builder setMinimumBackoff(com.google.protobuf.Duration value) { + if (minimumBackoffBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimumBackoff_ = value; + onChanged(); + } else { + minimumBackoffBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public Builder setMinimumBackoff(com.google.protobuf.Duration.Builder builderForValue) { + if (minimumBackoffBuilder_ == null) { + minimumBackoff_ = builderForValue.build(); + onChanged(); + } else { + minimumBackoffBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public Builder mergeMinimumBackoff(com.google.protobuf.Duration value) { + if (minimumBackoffBuilder_ == null) { + if (minimumBackoff_ != null) { + minimumBackoff_ = + com.google.protobuf.Duration.newBuilder(minimumBackoff_) + .mergeFrom(value) + .buildPartial(); + } else { + minimumBackoff_ = value; + } + onChanged(); + } else { + minimumBackoffBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public Builder clearMinimumBackoff() { + if (minimumBackoffBuilder_ == null) { + minimumBackoff_ = null; + onChanged(); + } else { + minimumBackoff_ = null; + minimumBackoffBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public com.google.protobuf.Duration.Builder getMinimumBackoffBuilder() { + + onChanged(); + return getMinimumBackoffFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { + if (minimumBackoffBuilder_ != null) { + return minimumBackoffBuilder_.getMessageOrBuilder(); + } else { + return minimumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumBackoff_; + } + } + /** + * + * + *
+     * The minimum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+     * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinimumBackoffFieldBuilder() { + if (minimumBackoffBuilder_ == null) { + minimumBackoffBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinimumBackoff(), getParentForChildren(), isClean()); + minimumBackoff_ = null; + } + return minimumBackoffBuilder_; + } + + private com.google.protobuf.Duration maximumBackoff_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maximumBackoffBuilder_; + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return Whether the maximumBackoff field is set. + */ + public boolean hasMaximumBackoff() { + return maximumBackoffBuilder_ != null || maximumBackoff_ != null; + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return The maximumBackoff. + */ + public com.google.protobuf.Duration getMaximumBackoff() { + if (maximumBackoffBuilder_ == null) { + return maximumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumBackoff_; + } else { + return maximumBackoffBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public Builder setMaximumBackoff(com.google.protobuf.Duration value) { + if (maximumBackoffBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumBackoff_ = value; + onChanged(); + } else { + maximumBackoffBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public Builder setMaximumBackoff(com.google.protobuf.Duration.Builder builderForValue) { + if (maximumBackoffBuilder_ == null) { + maximumBackoff_ = builderForValue.build(); + onChanged(); + } else { + maximumBackoffBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public Builder mergeMaximumBackoff(com.google.protobuf.Duration value) { + if (maximumBackoffBuilder_ == null) { + if (maximumBackoff_ != null) { + maximumBackoff_ = + com.google.protobuf.Duration.newBuilder(maximumBackoff_) + .mergeFrom(value) + .buildPartial(); + } else { + maximumBackoff_ = value; + } + onChanged(); + } else { + maximumBackoffBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public Builder clearMaximumBackoff() { + if (maximumBackoffBuilder_ == null) { + maximumBackoff_ = null; + onChanged(); + } else { + maximumBackoff_ = null; + maximumBackoffBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public com.google.protobuf.Duration.Builder getMaximumBackoffBuilder() { + + onChanged(); + return getMaximumBackoffFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { + if (maximumBackoffBuilder_ != null) { + return maximumBackoffBuilder_.getMessageOrBuilder(); + } else { + return maximumBackoff_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumBackoff_; + } + } + /** + * + * + *
+     * The maximum delay between consecutive deliveries of a given message.
+     * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+     * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaximumBackoffFieldBuilder() { + if (maximumBackoffBuilder_ == null) { + maximumBackoffBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaximumBackoff(), getParentForChildren(), isClean()); + maximumBackoff_ = null; + } + return maximumBackoffBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.RetryPolicy) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.RetryPolicy) + private static final com.google.pubsub.v1.RetryPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.RetryPolicy(); + } + + public static com.google.pubsub.v1.RetryPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetryPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RetryPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.RetryPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java new file mode 100644 index 000000000..e3ace44c0 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface RetryPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.RetryPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return Whether the minimumBackoff field is set. + */ + boolean hasMinimumBackoff(); + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + * + * @return The minimumBackoff. + */ + com.google.protobuf.Duration getMinimumBackoff(); + /** + * + * + *
+   * The minimum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
+   * 
+ * + * .google.protobuf.Duration minimum_backoff = 1; + */ + com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder(); + + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return Whether the maximumBackoff field is set. + */ + boolean hasMaximumBackoff(); + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + * + * @return The maximumBackoff. + */ + com.google.protobuf.Duration getMaximumBackoff(); + /** + * + * + *
+   * The maximum delay between consecutive deliveries of a given message.
+   * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
+   * 
+ * + * .google.protobuf.Duration maximum_backoff = 2; + */ + com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder(); +} 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 760cf6234..c91b6d10f 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 @@ -40,6 +40,7 @@ private Subscription(com.google.protobuf.GeneratedMessageV3.Builder builder) private Subscription() { name_ = ""; topic_ = ""; + filter_ = ""; } @java.lang.Override @@ -158,6 +159,13 @@ private Subscription( expirationPolicy_ = subBuilder.buildPartial(); } + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; break; } case 106: @@ -174,6 +182,21 @@ private Subscription( deadLetterPolicy_ = subBuilder.buildPartial(); } + break; + } + case 114: + { + com.google.pubsub.v1.RetryPolicy.Builder subBuilder = null; + if (retryPolicy_ != null) { + subBuilder = retryPolicy_.toBuilder(); + } + retryPolicy_ = + input.readMessage(com.google.pubsub.v1.RetryPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(retryPolicy_); + retryPolicy_ = subBuilder.buildPartial(); + } + break; } default: @@ -678,6 +701,65 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild return getExpirationPolicy(); } + public static final int FILTER_FIELD_NUMBER = 12; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+   * then only `PubsubMessage`s whose `attributes` field matches the filter are
+   * delivered on this subscription. If empty, then no messages are filtered
+   * out.
+   * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+   * API might be changed in backward-incompatible ways and is not recommended
+   * for production use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * string filter = 12; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+   * then only `PubsubMessage`s whose `attributes` field matches the filter are
+   * delivered on this subscription. If empty, then no messages are filtered
+   * out.
+   * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+   * API might be changed in backward-incompatible ways and is not recommended
+   * for production use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * string filter = 12; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int DEAD_LETTER_POLICY_FIELD_NUMBER = 13; private com.google.pubsub.v1.DeadLetterPolicy deadLetterPolicy_; /** @@ -750,6 +832,75 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild return getDeadLetterPolicy(); } + public static final int RETRY_POLICY_FIELD_NUMBER = 14; + private com.google.pubsub.v1.RetryPolicy retryPolicy_; + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return Whether the retryPolicy field is set. + */ + public boolean hasRetryPolicy() { + return retryPolicy_ != null; + } + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return The retryPolicy. + */ + public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { + return retryPolicy_ == null + ? com.google.pubsub.v1.RetryPolicy.getDefaultInstance() + : retryPolicy_; + } + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { + return getRetryPolicy(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -790,9 +941,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (expirationPolicy_ != null) { output.writeMessage(11, getExpirationPolicy()); } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, filter_); + } if (deadLetterPolicy_ != null) { output.writeMessage(13, getDeadLetterPolicy()); } + if (retryPolicy_ != null) { + output.writeMessage(14, getRetryPolicy()); + } unknownFields.writeTo(output); } @@ -838,9 +995,15 @@ public int getSerializedSize() { if (expirationPolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy()); } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, filter_); + } if (deadLetterPolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDeadLetterPolicy()); } + if (retryPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getRetryPolicy()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -874,10 +1037,15 @@ public boolean equals(final java.lang.Object obj) { if (hasExpirationPolicy()) { if (!getExpirationPolicy().equals(other.getExpirationPolicy())) return false; } + if (!getFilter().equals(other.getFilter())) return false; if (hasDeadLetterPolicy() != other.hasDeadLetterPolicy()) return false; if (hasDeadLetterPolicy()) { if (!getDeadLetterPolicy().equals(other.getDeadLetterPolicy())) return false; } + if (hasRetryPolicy() != other.hasRetryPolicy()) return false; + if (hasRetryPolicy()) { + if (!getRetryPolicy().equals(other.getRetryPolicy())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -915,10 +1083,16 @@ public int hashCode() { hash = (37 * hash) + EXPIRATION_POLICY_FIELD_NUMBER; hash = (53 * hash) + getExpirationPolicy().hashCode(); } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); if (hasDeadLetterPolicy()) { hash = (37 * hash) + DEAD_LETTER_POLICY_FIELD_NUMBER; hash = (53 * hash) + getDeadLetterPolicy().hashCode(); } + if (hasRetryPolicy()) { + hash = (37 * hash) + RETRY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getRetryPolicy().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1112,12 +1286,20 @@ public Builder clear() { expirationPolicy_ = null; expirationPolicyBuilder_ = null; } + filter_ = ""; + if (deadLetterPolicyBuilder_ == null) { deadLetterPolicy_ = null; } else { deadLetterPolicy_ = null; deadLetterPolicyBuilder_ = null; } + if (retryPolicyBuilder_ == null) { + retryPolicy_ = null; + } else { + retryPolicy_ = null; + retryPolicyBuilder_ = null; + } return this; } @@ -1167,11 +1349,17 @@ public com.google.pubsub.v1.Subscription buildPartial() { } else { result.expirationPolicy_ = expirationPolicyBuilder_.build(); } + result.filter_ = filter_; if (deadLetterPolicyBuilder_ == null) { result.deadLetterPolicy_ = deadLetterPolicy_; } else { result.deadLetterPolicy_ = deadLetterPolicyBuilder_.build(); } + if (retryPolicyBuilder_ == null) { + result.retryPolicy_ = retryPolicy_; + } else { + result.retryPolicy_ = retryPolicyBuilder_.build(); + } onBuilt(); return result; } @@ -1248,9 +1436,16 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasExpirationPolicy()) { mergeExpirationPolicy(other.getExpirationPolicy()); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } if (other.hasDeadLetterPolicy()) { mergeDeadLetterPolicy(other.getDeadLetterPolicy()); } + if (other.hasRetryPolicy()) { + mergeRetryPolicy(other.getRetryPolicy()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2600,6 +2795,142 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild return expirationPolicyBuilder_; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+     * then only `PubsubMessage`s whose `attributes` field matches the filter are
+     * delivered on this subscription. If empty, then no messages are filtered
+     * out.
+     * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+     * API might be changed in backward-incompatible ways and is not recommended
+     * for production use. It is not subject to any SLA or deprecation policy.
+     * 
+ * + * string filter = 12; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+     * then only `PubsubMessage`s whose `attributes` field matches the filter are
+     * delivered on this subscription. If empty, then no messages are filtered
+     * out.
+     * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+     * API might be changed in backward-incompatible ways and is not recommended
+     * for production use. It is not subject to any SLA or deprecation policy.
+     * 
+ * + * string filter = 12; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+     * then only `PubsubMessage`s whose `attributes` field matches the filter are
+     * delivered on this subscription. If empty, then no messages are filtered
+     * out.
+     * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+     * API might be changed in backward-incompatible ways and is not recommended
+     * for production use. It is not subject to any SLA or deprecation policy.
+     * 
+ * + * string filter = 12; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+     * then only `PubsubMessage`s whose `attributes` field matches the filter are
+     * delivered on this subscription. If empty, then no messages are filtered
+     * out.
+     * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+     * API might be changed in backward-incompatible ways and is not recommended
+     * for production use. It is not subject to any SLA or deprecation policy.
+     * 
+ * + * string filter = 12; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+     * then only `PubsubMessage`s whose `attributes` field matches the filter are
+     * delivered on this subscription. If empty, then no messages are filtered
+     * out.
+     * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+     * API might be changed in backward-incompatible ways and is not recommended
+     * for production use. It is not subject to any SLA or deprecation policy.
+     * 
+ * + * string filter = 12; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + private com.google.pubsub.v1.DeadLetterPolicy deadLetterPolicy_; private com.google.protobuf.SingleFieldBuilderV3< com.google.pubsub.v1.DeadLetterPolicy, @@ -2867,6 +3198,263 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild return deadLetterPolicyBuilder_; } + private com.google.pubsub.v1.RetryPolicy retryPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.RetryPolicy, + com.google.pubsub.v1.RetryPolicy.Builder, + com.google.pubsub.v1.RetryPolicyOrBuilder> + retryPolicyBuilder_; + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return Whether the retryPolicy field is set. + */ + public boolean hasRetryPolicy() { + return retryPolicyBuilder_ != null || retryPolicy_ != null; + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return The retryPolicy. + */ + public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { + if (retryPolicyBuilder_ == null) { + return retryPolicy_ == null + ? com.google.pubsub.v1.RetryPolicy.getDefaultInstance() + : retryPolicy_; + } else { + return retryPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { + if (retryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retryPolicy_ = value; + onChanged(); + } else { + retryPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy.Builder builderForValue) { + if (retryPolicyBuilder_ == null) { + retryPolicy_ = builderForValue.build(); + onChanged(); + } else { + retryPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { + if (retryPolicyBuilder_ == null) { + if (retryPolicy_ != null) { + retryPolicy_ = + com.google.pubsub.v1.RetryPolicy.newBuilder(retryPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + retryPolicy_ = value; + } + onChanged(); + } else { + retryPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public Builder clearRetryPolicy() { + if (retryPolicyBuilder_ == null) { + retryPolicy_ = null; + onChanged(); + } else { + retryPolicy_ = null; + retryPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public com.google.pubsub.v1.RetryPolicy.Builder getRetryPolicyBuilder() { + + onChanged(); + return getRetryPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { + if (retryPolicyBuilder_ != null) { + return retryPolicyBuilder_.getMessageOrBuilder(); + } else { + return retryPolicy_ == null + ? com.google.pubsub.v1.RetryPolicy.getDefaultInstance() + : retryPolicy_; + } + } + /** + * + * + *
+     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * subscription.
+     * If not set, the default retry policy is applied. This generally implies
+     * that messages will be retried as soon as possible for healthy subscribers.
+     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+     * exceeded events for a given message.
+     * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+     * ways and is not recommended for production use. It is not subject to any
+     * SLA or deprecation policy.
+     * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.RetryPolicy, + com.google.pubsub.v1.RetryPolicy.Builder, + com.google.pubsub.v1.RetryPolicyOrBuilder> + getRetryPolicyFieldBuilder() { + if (retryPolicyBuilder_ == null) { + retryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.RetryPolicy, + com.google.pubsub.v1.RetryPolicy.Builder, + com.google.pubsub.v1.RetryPolicyOrBuilder>( + getRetryPolicy(), getParentForChildren(), isClean()); + retryPolicy_ = null; + } + return retryPolicyBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index acc4e7572..0c1a6fe40 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -358,6 +358,43 @@ public interface SubscriptionOrBuilder */ com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuilder(); + /** + * + * + *
+   * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+   * then only `PubsubMessage`s whose `attributes` field matches the filter are
+   * delivered on this subscription. If empty, then no messages are filtered
+   * out.
+   * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+   * API might be changed in backward-incompatible ways and is not recommended
+   * for production use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * string filter = 12; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression written in the Cloud Pub/Sub filter language. If non-empty,
+   * then only `PubsubMessage`s whose `attributes` field matches the filter are
+   * delivered on this subscription. If empty, then no messages are filtered
+   * out.
+   * <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
+   * API might be changed in backward-incompatible ways and is not recommended
+   * for production use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * string filter = 12; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + /** * * @@ -419,4 +456,63 @@ public interface SubscriptionOrBuilder * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; */ com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuilder(); + + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return Whether the retryPolicy field is set. + */ + boolean hasRetryPolicy(); + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + * + * @return The retryPolicy. + */ + com.google.pubsub.v1.RetryPolicy getRetryPolicy(); + /** + * + * + *
+   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * subscription.
+   * If not set, the default retry policy is applied. This generally implies
+   * that messages will be retried as soon as possible for healthy subscribers.
+   * RetryPolicy will be triggered on NACKs or acknowledgement deadline
+   * exceeded events for a given message.
+   * <b>EXPERIMENTAL:</b> This API might be changed in backward-incompatible
+   * ways and is not recommended for production use. It is not subject to any
+   * SLA or deprecation policy.
+   * 
+ * + * .google.pubsub.v1.RetryPolicy retry_policy = 14; + */ + com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java index ea20fdd47..09996bf5e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java @@ -16,10 +16,226 @@ package com.google.pubsub.v1; +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") -public abstract class TopicName implements ResourceName { +public class TopicName implements ResourceName { + + @Deprecated protected TopicName() {} + + private static final PathTemplate PROJECT_TOPIC_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}"); + private static final String DELETED_TOPIC_FIXED_VALUE = "_deleted-topic_"; + private static final TopicName DELETED_TOPIC_INSTANCE = new TopicName("_deleted-topic_"); + + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + + private String project; + private String topic; + + public String getProject() { + return project; + } + + public String getTopic() { + return topic; + } + + private TopicName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + topic = Preconditions.checkNotNull(builder.getTopic()); + pathTemplate = PROJECT_TOPIC_PATH_TEMPLATE; + } + + private TopicName(String fixedValue) { + this.fixedValue = fixedValue; + fieldValuesMap = ImmutableMap.of("", fixedValue); + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectTopicBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TopicName of(String project, String topic) { + return newProjectTopicBuilder().setProject(project).setTopic(topic).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TopicName ofProjectTopicName(String project, String topic) { + return newProjectTopicBuilder().setProject(project).setTopic(topic).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static TopicName ofDeletedTopicName() { + return DELETED_TOPIC_INSTANCE; + } + + public static String format(String project, String topic) { + return newBuilder().setProject(project).setTopic(topic).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectTopicName(String project, String topic) { + return newBuilder().setProject(project).setTopic(topic).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatDeletedTopicName() { + return DELETED_TOPIC_FIXED_VALUE; + } + + public static TopicName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_TOPIC_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_TOPIC_PATH_TEMPLATE.match(formattedString); + return ofProjectTopicName(matchMap.get("project"), matchMap.get("topic")); + } else if (DELETED_TOPIC_FIXED_VALUE.equals(formattedString)) { + return DELETED_TOPIC_INSTANCE; + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); + } + + @BetaApi("The method will be renamed to parseList after subclasses of this class are removed.") + public static List parse(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + @BetaApi("The method will be renamed to toStringList after subclasses of this class are removed.") + public static List toStrings(List values) { + List list = new ArrayList<>(values.size()); + for (TopicName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_TOPIC_PATH_TEMPLATE.matches(formattedString) + || DELETED_TOPIC_FIXED_VALUE.equals(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (topic != null) { + fieldMapBuilder.put("topic", topic); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + /** Builder for projects/{project}/topics/{topic}. */ + public static class Builder { + + private String project; + private String topic; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getTopic() { + return topic; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTopic(String topic) { + this.topic = topic; + return this; + } + + private Builder(TopicName topicName) { + Preconditions.checkArgument( + topicName.pathTemplate == PROJECT_TOPIC_PATH_TEMPLATE, + "toBuilder is only supported when TopicName has the pattern of " + + "projects/{project}/topics/{topic}."); + project = topicName.project; + topic = topicName.topic; + } + + public TopicName build() { + return new TopicName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TopicName that = (TopicName) o; + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.topic, that.topic)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(topic); + return h; + } } diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 55cfa531f..b49b30ed4 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -672,6 +672,15 @@ message Subscription { // value for `expiration_policy.ttl` is 1 day. ExpirationPolicy expiration_policy = 11; + // An expression written in the Cloud Pub/Sub filter language. If non-empty, + // then only `PubsubMessage`s whose `attributes` field matches the filter are + // delivered on this subscription. If empty, then no messages are filtered + // out. + // EXPERIMENTAL: This feature is part of a closed alpha release. This + // API might be changed in backward-incompatible ways and is not recommended + // for production use. It is not subject to any SLA or deprecation policy. + string filter = 12; + // A policy that specifies the conditions for dead lettering messages in // this subscription. If dead_letter_policy is not set, dead lettering // is disabled. @@ -684,6 +693,39 @@ message Subscription { // API might be changed in backward-incompatible ways and is not recommended // for production use. It is not subject to any SLA or deprecation policy. DeadLetterPolicy dead_letter_policy = 13; + + // A policy that specifies how Cloud Pub/Sub retries message delivery for this + // subscription. + // + // If not set, the default retry policy is applied. This generally implies + // that messages will be retried as soon as possible for healthy subscribers. + // RetryPolicy will be triggered on NACKs or acknowledgement deadline + // exceeded events for a given message. + // EXPERIMENTAL: This API might be changed in backward-incompatible + // ways and is not recommended for production use. It is not subject to any + // SLA or deprecation policy. + RetryPolicy retry_policy = 14; +} + +// A policy that specifies how Cloud Pub/Sub retries message delivery. +// +// Retry delay will be exponential based on provided minimum and maximum +// backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. +// +// RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded +// events for a given message. +// +// Retry Policy is implemented on a best effort basis. At times, the delay +// between consecutive deliveries may not match the configuration. That is, +// delay can be more or less than configured backoff. +message RetryPolicy { + // The minimum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 10 seconds. + google.protobuf.Duration minimum_backoff = 1; + + // The maximum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 600 seconds. + google.protobuf.Duration maximum_backoff = 2; } // Dead lettering is done on a best effort basis. The same message might be diff --git a/renovate.json b/renovate.json index fc6412701..1b54f48af 100644 --- a/renovate.json +++ b/renovate.json @@ -56,7 +56,9 @@ }, { "packagePatterns": [ - "^com.google.cloud:libraries-bom" + "^com.google.cloud:google-cloud-pubsub", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" ], "semanticCommitType": "chore", "semanticCommitScope": "deps" @@ -75,4 +77,4 @@ } ], "semanticCommits": true -} +} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index a8cfb72d0..0dc6e39b4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,18 @@ { - "updateTime": "2020-03-09T22:03:30.134601Z", + "updateTime": "2020-03-30T19:22:36.952654Z", "sources": [ { "generator": { "name": "artman", - "version": "1.0.0", - "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" + "version": "1.1.1", + "dockerImage": "googleapis/artman@sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b" } }, { "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29a47c965aac79e3fe8e3314482ca0b5967680f0", - "internalRef": "299917154", - "log": "29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\nf0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n" - } - }, - { - "template": { - "name": "java_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8" } } ], diff --git a/synth.py b/synth.py index 24cfcbf56..a213152b4 100644 --- a/synth.py +++ b/synth.py @@ -22,6 +22,401 @@ service = 'pubsub' versions = ['v1'] +GET_IAM_POLICY_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   Policy response = topicAdminClient.getIamPolicy(formattedResource);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead. + */ + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } +""" +GET_IAM_POLICY_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *


+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   Policy response = topicAdminClient.getIamPolicy(formattedResource);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead. + */ + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } +""" + +GET_IAM_POLICY_PREVIOUS = r'(\s+public final Policy getIamPolicy\(GetIamPolicyRequest request\) {\n\s+return .*\n\s+})' + +SET_IAM_POLICY_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * + *

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead. + */ + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); + } +""" +SET_IAM_POLICY_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * + *

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * + *

Sample code: + * + *


+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead. + */ + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); + } +""" +SET_IAM_POLICY_PREVIOUS = r'(\s+public final Policy setIamPolicy\(SetIamPolicyRequest request\) {\n\s+return .*\n\s+})' + +TEST_IAM_PERMISSIONS_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. If the resource does not + * exist, this will return an empty set of permissions, not a NOT_FOUND error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead. + */ + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } +""" +TEST_IAM_PERMISSIONS_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. If the resource does not + * exist, this will return an empty set of permissions, not a NOT_FOUND error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (SubscriptionAdminClient topicAdminClient = SubscriptionAdminClient.create()) {
+   *   String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead. + */ + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } +""" +TEST_IAM_PERMISSIONS_PREVIOUS = r'(\s+public final TestIamPermissionsResponse testIamPermissions\(TestIamPermissionsRequest request\) {\n\s+return .*\n\s+})' + +CREATE_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates the given topic with the given name. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   Topic response = topicAdminClient.createTopic(name);
+   * }
+   * 
+ * + * @param name Required. The name of the topic. It must have the format + * `"projects/{project}/topics/{topic}"`. `{topic}` 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"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #createTopic(TopicName)} instead. + */ + public final Topic createTopic(ProjectTopicName name) { + Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build(); + return createTopic(request); + } +""" + +CREATE_TOPIC_PREVIOUS = r'(\s+public final Topic createTopic\(String name\) {\n\s+.*\n\s+return.*\n\s+})' + +DELETE_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a + * topic is deleted, a new topic may be created with the same name; this is an entirely new topic + * with none of the old configuration or subscriptions. Existing subscriptions to this topic are + * not deleted, but their `topic` field is set to `_deleted-topic_`. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   topicAdminClient.deleteTopic(topic);
+   * }
+   * 
+ * + * @param topic Required. Name of the topic to delete. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #deleteTopic(TopicName)} instead. + */ + public final void deleteTopic(ProjectTopicName topic) { + DeleteTopicRequest request = + DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); + deleteTopic(request); + } +""" + +GET_TOPIC_PREVIOUS = r'(\s+public final Topic getTopic\(String topic\) {\n\s+.*\n\s+return.*\n\s+})' + +GET_TOPIC = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the configuration of a topic. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   Topic response = topicAdminClient.getTopic(topic);
+   * }
+   * 
+ * + * @param topic Required. The name of the topic to get. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #getTopic(TopicName)} instead. + */ + public final Topic getTopic(ProjectTopicName topic) { + GetTopicRequest request = + GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build(); + return getTopic(request); + } +""" + +DELETE_TOPIC_PREVIOUS = r'(\s+public final void deleteTopic\(String topic\) {\n\s+.*\n\s+deleteTopic.*\n\s+})' + +LIST_TOPIC_SUBSCRIPTIONS = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the subscriptions on this topic. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param topic Required. The name of the topic that subscriptions are attached to. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link #listTopicSubscriptions(TopicName)} instead. + */ + public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) { + ListTopicSubscriptionsRequest request = + ListTopicSubscriptionsRequest.newBuilder() + .setTopic(topic == null ? null : topic.toString()) + .build(); + return listTopicSubscriptions(request); + } +""" + +LIST_TOPIC_SUBSCRIPTIONS_PREVIOUS = r'(\s+public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions\(String topic\) {\n\s+.*\n\s+.*\n\s+return.*\n\s+})' + +CREATE_SUBSCRIPTION_PREVIOUS = r'(\s+public final Subscription createSubscription\(Subscription request\) {\n\s+return.*\n\s+})' + +CREATE_SUBSCRIPTION = """ + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a subscription to a given topic. See the <a + * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name + * rules</a>. 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: + * + *


+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+   *   ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
+   *   PushConfig pushConfig = PushConfig.newBuilder().build();
+   *   int ackDeadlineSeconds = 0;
+   *   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(ProjectSubscriptionName, TopicName, PushConfig, int)} instead. + */ + public final Subscription createSubscription( + ProjectSubscriptionName name, + ProjectTopicName 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); + } +""" + +PACKAGE = 'package com.google.cloud.pubsub.v1;' + +IMPORT_PROJECT_TOPIC_NAME = 'import com.google.pubsub.v1.ProjectTopicName;' + for version in versions: java.bazel_library( service=service, @@ -40,6 +435,78 @@ java.GOOD_LICENSE, ) + s.replace( + '**/TopicAdminClient.java', + GET_IAM_POLICY_PREVIOUS, + "\g<1>\n\n" + GET_IAM_POLICY_TOPIC + ) + + s.replace( + '**/TopicAdminClient.java', + SET_IAM_POLICY_PREVIOUS, + "\g<1>\n\n" + SET_IAM_POLICY_TOPIC + ) + + s.replace( + '**/TopicAdminClient.java', + TEST_IAM_PERMISSIONS_PREVIOUS, + "\g<1>\n\n" + TEST_IAM_PERMISSIONS_TOPIC + ) + + s.replace( + '**/SubscriptionAdminClient.java', + GET_IAM_POLICY_PREVIOUS, + "\g<1>\n\n" + GET_IAM_POLICY_SUBSCRIPTION + ) + + s.replace( + '**/SubscriptionAdminClient.java', + SET_IAM_POLICY_PREVIOUS, + "\g<1>\n\n" + SET_IAM_POLICY_SUBSCRIPTION + ) + + s.replace( + '**/SubscriptionAdminClient.java', + TEST_IAM_PERMISSIONS_PREVIOUS, + "\g<1>\n\n" + TEST_IAM_PERMISSIONS_SUBSCRIPTION + ) + + s.replace( + '**/TopicAdminClient.java', + CREATE_TOPIC_PREVIOUS, + "\g<1>\n\n" + CREATE_TOPIC + ) + + s.replace( + '**/TopicAdminClient.java', + DELETE_TOPIC_PREVIOUS, + "\g<1>\n\n" + DELETE_TOPIC + ) + + s.replace( + '**/TopicAdminClient.java', + LIST_TOPIC_SUBSCRIPTIONS_PREVIOUS, + "\g<1>\n\n" + LIST_TOPIC_SUBSCRIPTIONS + ) + + s.replace( + '**/TopicAdminClient.java', + GET_TOPIC_PREVIOUS, + "\g<1>\n\n" + GET_TOPIC + ) + + s.replace( + '**/SubscriptionAdminClient.java', + CREATE_SUBSCRIPTION_PREVIOUS, + "\g<1>\n\n" + CREATE_SUBSCRIPTION + ) + + s.replace( + '**/*AdminClient.java', + PACKAGE, + PACKAGE + '\n\n' + IMPORT_PROJECT_TOPIC_NAME + '\n' + ) + java.format_code('google-cloud-pubsub/src') java.format_code(f'grpc-google-cloud-{service}-{version}/src') java.format_code(f'proto-google-cloud-{service}-{version}/src') From 3ea1202dbe13b60cfdc14c2855e878e190a52199 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 2 Apr 2020 19:01:17 +0200 Subject: [PATCH 15/16] deps: update core dependencies to v1.55.0 (#122) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 34dfa8702..9b99e2266 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 1.93.3 1.9.0 1.17.0 - 1.54.0 + 1.55.0 1.28.0 3.11.4 4.13 From b6aab34351391fd4ece6d97de5c2bbacfa6e9279 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2020 10:54:00 -0700 Subject: [PATCH 16/16] chore: release 1.104.0 (#120) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-cloud-pubsub-bom/pom.xml [ci skip] * updated grpc-google-cloud-pubsub-v1/pom.xml [ci skip] * updated proto-google-cloud-pubsub-v1/pom.xml [ci skip] * updated google-cloud-pubsub/pom.xml [ci skip] * updated pom.xml [ci skip] Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 6 +++--- 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 ++-- versions.txt | 6 +++--- 8 files changed, 42 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc6e347d6..9305c35f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.104.0](https://www.github.com/googleapis/java-pubsub/compare/v1.103.1...v1.104.0) (2020-04-02) + + +### Features + +* Add flow control support to publisher ([#119](https://www.github.com/googleapis/java-pubsub/issues/119)) ([fdd9434](https://www.github.com/googleapis/java-pubsub/commit/fdd943433cface4bc6634f74aa12afa6e471f3a3)) +* add TopicName ([#113](https://www.github.com/googleapis/java-pubsub/issues/113)) ([4558c34](https://www.github.com/googleapis/java-pubsub/commit/4558c3430901cdaec12a43e06ea4fafaa01c08e0)) + + +### Bug Fixes + +* Re-generated to pick up changes in the API or client library generator. ([#104](https://www.github.com/googleapis/java-pubsub/issues/104)) ([0e366c3](https://www.github.com/googleapis/java-pubsub/commit/0e366c35580116fcd6aa40caadedd95be07bdd87)) + + +### Dependencies + +* update core dependencies ([#105](https://www.github.com/googleapis/java-pubsub/issues/105)) ([5639f63](https://www.github.com/googleapis/java-pubsub/commit/5639f6321e1506fdf803f5de58f2c7fdf5afb448)) +* update core dependencies to v1.55.0 ([#122](https://www.github.com/googleapis/java-pubsub/issues/122)) ([3ea1202](https://www.github.com/googleapis/java-pubsub/commit/3ea1202dbe13b60cfdc14c2855e878e190a52199)) +* update dependency com.google.api:api-common to v1.9.0 ([#121](https://www.github.com/googleapis/java-pubsub/issues/121)) ([30a1dee](https://www.github.com/googleapis/java-pubsub/commit/30a1deecbecf63d1629ae93407658865518febce)) +* update dependency org.threeten:threetenbp to v1.4.2 ([#116](https://www.github.com/googleapis/java-pubsub/issues/116)) ([e7c007b](https://www.github.com/googleapis/java-pubsub/commit/e7c007b917618e75f9c8fecd2475f31c7eba0817)) +* update opencensus.version to v0.26.0 ([#115](https://www.github.com/googleapis/java-pubsub/issues/115)) ([26aec5d](https://www.github.com/googleapis/java-pubsub/commit/26aec5d7ee45bec5b39b6cbe67122a6e5944268e)) + ### [1.103.1](https://www.github.com/googleapis/java-pubsub/compare/v1.103.0...v1.103.1) (2020-03-03) diff --git a/README.md b/README.md index 59b719102..5d0cfabf8 100644 --- a/README.md +++ b/README.md @@ -37,16 +37,16 @@ If you are using Maven without a BOM, add this to your pom.xml file com.google.cloud google-cloud-pubsub - 1.103.1 + 1.104.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.103.1' +compile 'com.google.cloud:google-cloud-pubsub:1.104.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.103.1" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.104.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 34c71afea..9d19ced9d 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.103.2-SNAPSHOT + 1.104.0 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.85.2-SNAPSHOT + 1.86.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.85.2-SNAPSHOT + 1.86.0 com.google.cloud google-cloud-pubsub - 1.103.2-SNAPSHOT + 1.104.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index fc40ef539..5ea586b80 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.103.2-SNAPSHOT + 1.104.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.103.2-SNAPSHOT + 1.104.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index ea132fef3..c8bbb22be 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.85.2-SNAPSHOT + 1.86.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.103.2-SNAPSHOT + 1.104.0 diff --git a/pom.xml b/pom.xml index 9b99e2266..04dfdbc19 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.103.2-SNAPSHOT + 1.104.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -86,17 +86,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.85.2-SNAPSHOT + 1.86.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.85.2-SNAPSHOT + 1.86.0 com.google.cloud google-cloud-pubsub - 1.103.2-SNAPSHOT + 1.104.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index ec3696952..b5701db4e 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.85.2-SNAPSHOT + 1.86.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.103.2-SNAPSHOT + 1.104.0 diff --git a/versions.txt b/versions.txt index 0b31de2c3..41492b20a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-pubsub-v1:1.85.1:1.85.2-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.85.1:1.85.2-SNAPSHOT -google-cloud-pubsub:1.103.1:1.103.2-SNAPSHOT \ No newline at end of file +proto-google-cloud-pubsub-v1:1.86.0:1.86.0 +grpc-google-cloud-pubsub-v1:1.86.0:1.86.0 +google-cloud-pubsub:1.104.0:1.104.0 \ No newline at end of file