From 240e141a8b4f8e4d4e252672bb4ae4d091dde453 Mon Sep 17 00:00:00 2001 From: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com> Date: Sun, 24 May 2020 12:51:01 -0700 Subject: [PATCH 01/22] fix: update ignored diffs (#206) * Modifying Publish example in README to match other examples given, and fix issue #6784 * fix: Modifying Publish example in README to match other examples, and fix Issue #11 * feat: Adding support for DLQs Adding delivery attempt count to PubsubMessages as a message attribute, and creating helper function to allow users to get the count without knowing implementation details. * Fix formatting * fix: making changes requested in pull request * fix: creating fix to not populate delivery attempt attribute when dead lettering is not enabled * Adding unit test for case in which a received message has no delivery attempt * Making MessageWaiter class more generic to also be used for outstanding ack operations * Waiting for acks to complete before shutting down a streaming subscriber connection * Fixing formatting error * fix: making sure all publishes complete before shutting down the publisher * adding default max outstanding request bytes * fix: make push endpoint valid https * fix: update ignored diffs --- .../clirr-ignored-differences.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/proto-google-cloud-pubsub-v1/clirr-ignored-differences.xml b/proto-google-cloud-pubsub-v1/clirr-ignored-differences.xml index 7937e7b03..da90cd601 100644 --- a/proto-google-cloud-pubsub-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-pubsub-v1/clirr-ignored-differences.xml @@ -16,4 +16,14 @@ com/google/pubsub/v1/*OrBuilder boolean has*(*) - \ No newline at end of file + + 7002 + com/google/pubsub/v1/TopicName + java.util.List toStrings(*) + + + 7002 + com/google/pubsub/v1/TopicName + java.util.List parse(*) + + From 16624f88ad19ccaf2ea074a62242496be103659f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 24 May 2020 13:25:29 -0700 Subject: [PATCH 02/22] feat: regenerated to pick up changes in the API or client library generator (#185) * Integrate Python GAPIC Microgenerator in googleapis. This PR uses using documentai as an example. Depends on https://github.com/googleapis/gapic-generator-python/pull/402 PiperOrigin-RevId: 309824146 Source-Author: Google APIs Source-Date: Mon May 4 15:06:44 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb Source-Link: https://github.com/googleapis/googleapis/commit/e0f9d9e1f9de890db765be46f45ca8490723e3eb * Removing the experimental tag from dead letter policy related fields. PiperOrigin-RevId: 310595049 Source-Author: Google APIs Source-Date: Fri May 8 11:29:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 73d4b5d9a791f8b1ee63d439ffe909bb8ffa07f7 Source-Link: https://github.com/googleapis/googleapis/commit/73d4b5d9a791f8b1ee63d439ffe909bb8ffa07f7 * ci(java): switch to GitHub Actions (#533) * ci: switch to GitHub Actions * update based on comment Source-Author: Stephanie Wang Source-Date: Mon May 11 12:54:00 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 55cdc844877d97139f25004229842624a6a86a02 Source-Link: https://github.com/googleapis/synthtool/commit/55cdc844877d97139f25004229842624a6a86a02 * chore: move ci.yaml to workflows dir (#535) Source-Author: Stephanie Wang Source-Date: Mon May 11 16:24:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 98c50772ec23295c64cf0d2ddf199ea52961fd4c Source-Link: https://github.com/googleapis/synthtool/commit/98c50772ec23295c64cf0d2ddf199ea52961fd4c * docs: update CONTRIBUTING.md to include code formatting (#534) Co-authored-by: Jeff Ching Co-authored-by: Jeffrey Rennie Source-Author: Brian Chen Source-Date: Tue May 12 10:24:59 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5b48b0716a36ca069db3038da7e205c87a22ed19 Source-Link: https://github.com/googleapis/synthtool/commit/5b48b0716a36ca069db3038da7e205c87a22ed19 Co-authored-by: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com> --- CONTRIBUTING.md | 11 +- README.md | 6 +- .../pubsub/v1/SubscriptionAdminClient.java | 113 +++++++- .../pubsub/v1/SubscriptionAdminSettings.java | 12 + .../cloud/pubsub/v1/TopicAdminClient.java | 243 +++++++++++++++++- .../cloud/pubsub/v1/TopicAdminSettings.java | 17 ++ .../pubsub/v1/stub/GrpcPublisherStub.java | 51 ++++ .../pubsub/v1/stub/GrpcSubscriberStub.java | 29 +++ .../cloud/pubsub/v1/stub/PublisherStub.java | 13 + .../pubsub/v1/stub/PublisherStubSettings.java | 99 +++++++ .../cloud/pubsub/v1/stub/SubscriberStub.java | 5 + .../v1/stub/SubscriberStubSettings.java | 29 +++ .../cloud/pubsub/v1/MockPublisherImpl.java | 18 ++ .../cloud/pubsub/v1/MockSubscriberImpl.java | 18 +- .../v1/SubscriptionAdminClientTest.java | 42 +++ .../cloud/pubsub/v1/TopicAdminClientTest.java | 51 ++++ .../java/com/google/pubsub/v1/PushConfig.java | 14 +- .../google/pubsub/v1/PushConfigOrBuilder.java | 4 +- .../com/google/pubsub/v1/ReceivedMessage.java | 52 ++-- .../pubsub/v1/ReceivedMessageOrBuilder.java | 13 +- .../com/google/pubsub/v1/Subscription.java | 36 --- .../pubsub/v1/SubscriptionOrBuilder.java | 9 - .../java/com/google/pubsub/v1/TopicName.java | 24 -- .../google/pubsub/v1/UpdateTopicRequest.java | 72 +++--- .../v1/UpdateTopicRequestOrBuilder.java | 18 +- .../main/proto/google/pubsub/v1/pubsub.proto | 25 +- synth.metadata | 10 +- 27 files changed, 844 insertions(+), 190 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 085021dde..f2dbdee06 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -99,7 +99,16 @@ mvn -Penable-samples clean verify ``` 2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` ### Profile Activation diff --git a/README.md b/README.md index a803ef5d9..be3c05769 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 5.1.0 + 5.3.0 pom import @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.105.0 + 1.105.1 ``` @@ -259,7 +259,7 @@ Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [product-docs]: https://cloud.google.com/pubsub/docs/ -[javadocs]: https://googleapis.dev/java/google-cloud-pubsub/latest/index.html +[javadocs]: https://googleapis.dev/java/google-cloud-pubusb/latest/index.html [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.svg [kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.html [kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.svg 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 227271f32..2fbd6ff96 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 @@ -39,6 +39,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -861,6 +862,110 @@ public final UnaryCallable deleteSubscriptionC return stub.deleteSubscriptionCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the configuration details of a snapshot. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


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

Sample code: + * + *


+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   Snapshot response = subscriptionAdminClient.getSnapshot(snapshot.toString());
+   * }
+   * 
+ * + * @param snapshot Required. The name of the snapshot to get. Format is + * `projects/{project}/snapshots/{snap}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + /* package-private */ final Snapshot getSnapshot(String snapshot) { + GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setSnapshot(snapshot).build(); + return getSnapshot(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the configuration details of a snapshot. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
+   *     .setSnapshot(snapshot.toString())
+   *     .build();
+   *   Snapshot response = subscriptionAdminClient.getSnapshot(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + /* package-private */ final Snapshot getSnapshot(GetSnapshotRequest request) { + return getSnapshotCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the configuration details of a snapshot. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+   *   ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
+   *     .setSnapshot(snapshot.toString())
+   *     .build();
+   *   ApiFuture<Snapshot> future = subscriptionAdminClient.getSnapshotCallable().futureCall(request);
+   *   // Do something
+   *   Snapshot response = future.get();
+   * }
+   * 
+ */ + /* package-private */ final UnaryCallable getSnapshotCallable() { + return stub.getSnapshotCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Modifies the ack deadline for a specific message. This method is useful to indicate that more @@ -1989,7 +2094,7 @@ public final UnaryCallable seekCallable() { /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

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

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -2046,7 +2151,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

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

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -2142,7 +2247,7 @@ public final UnaryCallable getIamPolicyCallable() { // 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. + * 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 @@ -2209,7 +2314,7 @@ public final TestIamPermissionsResponse testIamPermissions( // 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. + * 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 diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java index 32e5a6c5c..06d12d8ff 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java @@ -41,6 +41,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -122,6 +123,11 @@ public UnaryCallSettings deleteSubscriptionSet return ((SubscriberStubSettings) getStubSettings()).deleteSubscriptionSettings(); } + /** Returns the object with the settings used for calls to getSnapshot. */ + /* package-private */ UnaryCallSettings getSnapshotSettings() { + return ((SubscriberStubSettings) getStubSettings()).getSnapshotSettings(); + } + /** Returns the object with the settings used for calls to modifyAckDeadline. */ /* package-private */ UnaryCallSettings modifyAckDeadlineSettings() { @@ -318,6 +324,12 @@ public UnaryCallSettings.Builder createSubscriptionS return getStubSettingsBuilder().deleteSubscriptionSettings(); } + /** Returns the builder for the settings used for calls to getSnapshot. */ + /* package-private */ UnaryCallSettings.Builder + getSnapshotSettings() { + return getStubSettingsBuilder().getSnapshotSettings(); + } + /** Returns the builder for the settings used for calls to modifyAckDeadline. */ /* package-private */ UnaryCallSettings.Builder modifyAckDeadlineSettings() { 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 11951c869..548523021 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 @@ -38,6 +38,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -883,6 +885,157 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( return stub.listTopicSubscriptionsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the snapshots on this topic. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   for (String element : topicAdminClient.listTopicSnapshots(topic).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param topic Required. The name of the topic that snapshots are attached to. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + /* package-private */ final ListTopicSnapshotsPagedResponse listTopicSnapshots(TopicName topic) { + ListTopicSnapshotsRequest request = + ListTopicSnapshotsRequest.newBuilder() + .setTopic(topic == null ? null : topic.toString()) + .build(); + return listTopicSnapshots(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the snapshots on this topic. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   for (String element : topicAdminClient.listTopicSnapshots(topic.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param topic Required. The name of the topic that snapshots are attached to. Format is + * `projects/{project}/topics/{topic}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + /* package-private */ final ListTopicSnapshotsPagedResponse listTopicSnapshots(String topic) { + ListTopicSnapshotsRequest request = + ListTopicSnapshotsRequest.newBuilder().setTopic(topic).build(); + return listTopicSnapshots(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the snapshots on this topic. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   ListTopicSnapshotsRequest request = ListTopicSnapshotsRequest.newBuilder()
+   *     .setTopic(topic.toString())
+   *     .build();
+   *   for (String element : topicAdminClient.listTopicSnapshots(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 + */ + /* package-private */ final ListTopicSnapshotsPagedResponse listTopicSnapshots( + ListTopicSnapshotsRequest request) { + return listTopicSnapshotsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the snapshots on this topic. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   ListTopicSnapshotsRequest request = ListTopicSnapshotsRequest.newBuilder()
+   *     .setTopic(topic.toString())
+   *     .build();
+   *   ApiFuture<ListTopicSnapshotsPagedResponse> future = topicAdminClient.listTopicSnapshotsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (String element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + /* package-private */ final UnaryCallable< + ListTopicSnapshotsRequest, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsPagedCallable() { + return stub.listTopicSnapshotsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the names of the snapshots on this topic. Snapshots are used in <a + * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which + * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment + * state of messages in an existing subscription to the state captured by a snapshot. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   ListTopicSnapshotsRequest request = ListTopicSnapshotsRequest.newBuilder()
+   *     .setTopic(topic.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTopicSnapshotsResponse response = topicAdminClient.listTopicSnapshotsCallable().call(request);
+   *     for (String element : response.getSnapshotsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + /* package-private */ final UnaryCallable + listTopicSnapshotsCallable() { + return stub.listTopicSnapshotsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a @@ -1016,7 +1169,7 @@ public final UnaryCallable deleteTopicCallable() { /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

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

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -1073,7 +1226,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

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

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -1169,7 +1322,7 @@ public final UnaryCallable getIamPolicyCallable() { // 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. + * 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 @@ -1236,7 +1389,7 @@ public final TestIamPermissionsResponse testIamPermissions( // 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. + * 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 @@ -1501,4 +1654,86 @@ public ProjectSubscriptionName apply(String arg0) { }); } } + + public static class ListTopicSnapshotsPagedResponse + extends AbstractPagedListResponse< + ListTopicSnapshotsRequest, + ListTopicSnapshotsResponse, + String, + ListTopicSnapshotsPage, + ListTopicSnapshotsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTopicSnapshotsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTopicSnapshotsPagedResponse apply(ListTopicSnapshotsPage input) { + return new ListTopicSnapshotsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTopicSnapshotsPagedResponse(ListTopicSnapshotsPage page) { + super(page, ListTopicSnapshotsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTopicSnapshotsPage + extends AbstractPage< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, String, ListTopicSnapshotsPage> { + + private ListTopicSnapshotsPage( + PageContext context, + ListTopicSnapshotsResponse response) { + super(context, response); + } + + private static ListTopicSnapshotsPage createEmptyPage() { + return new ListTopicSnapshotsPage(null, null); + } + + @Override + protected ListTopicSnapshotsPage createPage( + PageContext context, + ListTopicSnapshotsResponse response) { + return new ListTopicSnapshotsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTopicSnapshotsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTopicSnapshotsRequest, + ListTopicSnapshotsResponse, + String, + ListTopicSnapshotsPage, + ListTopicSnapshotsFixedSizeCollection> { + + private ListTopicSnapshotsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTopicSnapshotsFixedSizeCollection createEmptyCollection() { + return new ListTopicSnapshotsFixedSizeCollection(null, 0); + } + + @Override + protected ListTopicSnapshotsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTopicSnapshotsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java index 9b125b8cc..59119e19b 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java @@ -15,6 +15,7 @@ */ package com.google.cloud.pubsub.v1; +import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSnapshotsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSubscriptionsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicsPagedResponse; @@ -39,6 +40,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -119,6 +122,13 @@ public UnaryCallSettings getTopicSettings() { return ((PublisherStubSettings) getStubSettings()).listTopicSubscriptionsSettings(); } + /** Returns the object with the settings used for calls to listTopicSnapshots. */ + /* package-private */ PagedCallSettings< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings() { + return ((PublisherStubSettings) getStubSettings()).listTopicSnapshotsSettings(); + } + /** Returns the object with the settings used for calls to deleteTopic. */ public UnaryCallSettings deleteTopicSettings() { return ((PublisherStubSettings) getStubSettings()).deleteTopicSettings(); @@ -272,6 +282,13 @@ public UnaryCallSettings.Builder getTopicSettings() { return getStubSettingsBuilder().listTopicSubscriptionsSettings(); } + /** Returns the builder for the settings used for calls to listTopicSnapshots. */ + /* package-private */ PagedCallSettings.Builder< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings() { + return getStubSettingsBuilder().listTopicSnapshotsSettings(); + } + /** Returns the builder for the settings used for calls to deleteTopic. */ public UnaryCallSettings.Builder deleteTopicSettings() { return getStubSettingsBuilder().deleteTopicSettings(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java index f42bb6bce..02baa7378 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java @@ -15,6 +15,7 @@ */ package com.google.cloud.pubsub.v1.stub; +import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSnapshotsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSubscriptionsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicsPagedResponse; @@ -35,6 +36,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -108,6 +111,16 @@ public class GrpcPublisherStub extends PublisherStub { .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSubscriptionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listTopicSnapshotsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.pubsub.v1.Publisher/ListTopicSnapshots") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTopicSnapshotsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTopicSnapshotsResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor deleteTopicMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -152,6 +165,10 @@ public class GrpcPublisherStub extends PublisherStub { listTopicSubscriptionsCallable; private final UnaryCallable listTopicSubscriptionsPagedCallable; + private final UnaryCallable + listTopicSnapshotsCallable; + private final UnaryCallable + listTopicSnapshotsPagedCallable; private final UnaryCallable deleteTopicCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable getIamPolicyCallable; @@ -276,6 +293,20 @@ public Map extract(ListTopicSubscriptionsRequest request) { } }) .build(); + GrpcCallSettings + listTopicSnapshotsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTopicSnapshotsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTopicSnapshotsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("topic", String.valueOf(request.getTopic())); + return params.build(); + } + }) + .build(); GrpcCallSettings deleteTopicTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTopicMethodDescriptor) @@ -358,6 +389,16 @@ public Map extract(TestIamPermissionsRequest request) { listTopicSubscriptionsTransportSettings, settings.listTopicSubscriptionsSettings(), clientContext); + this.listTopicSnapshotsCallable = + callableFactory.createUnaryCallable( + listTopicSnapshotsTransportSettings, + settings.listTopicSnapshotsSettings(), + clientContext); + this.listTopicSnapshotsPagedCallable = + callableFactory.createPagedCallable( + listTopicSnapshotsTransportSettings, + settings.listTopicSnapshotsSettings(), + clientContext); this.deleteTopicCallable = callableFactory.createUnaryCallable( deleteTopicTransportSettings, settings.deleteTopicSettings(), clientContext); @@ -410,6 +451,16 @@ public UnaryCallable listTopicsCallable() return listTopicSubscriptionsCallable; } + public UnaryCallable + listTopicSnapshotsPagedCallable() { + return listTopicSnapshotsPagedCallable; + } + + public UnaryCallable + listTopicSnapshotsCallable() { + return listTopicSnapshotsCallable; + } + public UnaryCallable deleteTopicCallable() { return deleteTopicCallable; } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java index 5b2310807..6d5ecda6e 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java @@ -38,6 +38,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -117,6 +118,13 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(DeleteSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor getSnapshotMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.pubsub.v1.Subscriber/GetSnapshot") + .setRequestMarshaller(ProtoUtils.marshaller(GetSnapshotRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .build(); private static final MethodDescriptor modifyAckDeadlineMethodDescriptor = MethodDescriptor.newBuilder() @@ -238,6 +246,7 @@ public class GrpcSubscriberStub extends SubscriberStub { private final UnaryCallable listSubscriptionsPagedCallable; private final UnaryCallable deleteSubscriptionCallable; + private final UnaryCallable getSnapshotCallable; private final UnaryCallable modifyAckDeadlineCallable; private final UnaryCallable acknowledgeCallable; private final UnaryCallable pullCallable; @@ -362,6 +371,19 @@ public Map extract(DeleteSubscriptionRequest request) { } }) .build(); + GrpcCallSettings getSnapshotTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSnapshotMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSnapshotRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("snapshot", String.valueOf(request.getSnapshot())); + return params.build(); + } + }) + .build(); GrpcCallSettings modifyAckDeadlineTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(modifyAckDeadlineMethodDescriptor) @@ -552,6 +574,9 @@ public Map extract(TestIamPermissionsRequest request) { deleteSubscriptionTransportSettings, settings.deleteSubscriptionSettings(), clientContext); + this.getSnapshotCallable = + callableFactory.createUnaryCallable( + getSnapshotTransportSettings, settings.getSnapshotSettings(), clientContext); this.modifyAckDeadlineCallable = callableFactory.createUnaryCallable( modifyAckDeadlineTransportSettings, @@ -628,6 +653,10 @@ public UnaryCallable deleteSubscriptionCallabl return deleteSubscriptionCallable; } + public UnaryCallable getSnapshotCallable() { + return getSnapshotCallable; + } + public UnaryCallable modifyAckDeadlineCallable() { return modifyAckDeadlineCallable; } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java index 65956640f..6ff2d02f8 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java @@ -15,6 +15,7 @@ */ package com.google.cloud.pubsub.v1.stub; +import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSnapshotsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSubscriptionsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicsPagedResponse; @@ -29,6 +30,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -84,6 +87,16 @@ public UnaryCallable listTopicsCallable() throw new UnsupportedOperationException("Not implemented: listTopicSubscriptionsCallable()"); } + public UnaryCallable + listTopicSnapshotsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTopicSnapshotsPagedCallable()"); + } + + public UnaryCallable + listTopicSnapshotsCallable() { + throw new UnsupportedOperationException("Not implemented: listTopicSnapshotsCallable()"); + } + public UnaryCallable deleteTopicCallable() { throw new UnsupportedOperationException("Not implemented: deleteTopicCallable()"); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index d47225785..ee84a4ab3 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -15,6 +15,7 @@ */ package com.google.cloud.pubsub.v1.stub; +import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSnapshotsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSubscriptionsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicsPagedResponse; @@ -60,6 +61,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -126,6 +129,9 @@ public class PublisherStubSettings extends StubSettings { ListTopicSubscriptionsResponse, ListTopicSubscriptionsPagedResponse> listTopicSubscriptionsSettings; + private final PagedCallSettings< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings; private final UnaryCallSettings deleteTopicSettings; private final UnaryCallSettings setIamPolicySettings; private final UnaryCallSettings getIamPolicySettings; @@ -167,6 +173,13 @@ public UnaryCallSettings getTopicSettings() { return listTopicSubscriptionsSettings; } + /** Returns the object with the settings used for calls to listTopicSnapshots. */ + public PagedCallSettings< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings() { + return listTopicSnapshotsSettings; + } + /** Returns the object with the settings used for calls to deleteTopic. */ public UnaryCallSettings deleteTopicSettings() { return deleteTopicSettings; @@ -262,6 +275,7 @@ protected PublisherStubSettings(Builder settingsBuilder) throws IOException { getTopicSettings = settingsBuilder.getTopicSettings().build(); listTopicsSettings = settingsBuilder.listTopicsSettings().build(); listTopicSubscriptionsSettings = settingsBuilder.listTopicSubscriptionsSettings().build(); + listTopicSnapshotsSettings = settingsBuilder.listTopicSnapshotsSettings().build(); deleteTopicSettings = settingsBuilder.deleteTopicSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); @@ -346,6 +360,45 @@ public Iterable extractResources(ListTopicSubscriptionsResponse payload) } }; + private static final PagedListDescriptor< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, String> + LIST_TOPIC_SNAPSHOTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTopicSnapshotsRequest injectToken( + ListTopicSnapshotsRequest payload, String token) { + return ListTopicSnapshotsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTopicSnapshotsRequest injectPageSize( + ListTopicSnapshotsRequest payload, int pageSize) { + return ListTopicSnapshotsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTopicSnapshotsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTopicSnapshotsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTopicSnapshotsResponse payload) { + return payload.getSnapshotsList() != null + ? payload.getSnapshotsList() + : ImmutableList.of(); + } + }; + private static final PagedListResponseFactory< ListTopicsRequest, ListTopicsResponse, ListTopicsPagedResponse> LIST_TOPICS_PAGE_STR_FACT = @@ -387,6 +440,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + LIST_TOPIC_SNAPSHOTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTopicSnapshotsRequest, + ListTopicSnapshotsResponse, + ListTopicSnapshotsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTopicSnapshotsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TOPIC_SNAPSHOTS_PAGE_STR_DESC, request, context); + return ListTopicSnapshotsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final BatchingDescriptor PUBLISH_BATCHING_DESC = new BatchingDescriptor() { @Override @@ -469,6 +543,9 @@ public static class Builder extends StubSettings.Builder listTopicSubscriptionsSettings; + private final PagedCallSettings.Builder< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings; private final UnaryCallSettings.Builder deleteTopicSettings; private final UnaryCallSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder getIamPolicySettings; @@ -489,6 +566,11 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "idempotent2", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); definitions.put("none", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "publish", @@ -556,6 +638,8 @@ protected Builder(ClientContext clientContext) { listTopicSubscriptionsSettings = PagedCallSettings.newBuilder(LIST_TOPIC_SUBSCRIPTIONS_PAGE_STR_FACT); + listTopicSnapshotsSettings = PagedCallSettings.newBuilder(LIST_TOPIC_SNAPSHOTS_PAGE_STR_FACT); + deleteTopicSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -572,6 +656,7 @@ protected Builder(ClientContext clientContext) { getTopicSettings, listTopicsSettings, listTopicSubscriptionsSettings, + listTopicSnapshotsSettings, deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, @@ -633,6 +718,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .listTopicSnapshotsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .deleteTopicSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -665,6 +755,7 @@ protected Builder(PublisherStubSettings settings) { getTopicSettings = settings.getTopicSettings.toBuilder(); listTopicsSettings = settings.listTopicsSettings.toBuilder(); listTopicSubscriptionsSettings = settings.listTopicSubscriptionsSettings.toBuilder(); + listTopicSnapshotsSettings = settings.listTopicSnapshotsSettings.toBuilder(); deleteTopicSettings = settings.deleteTopicSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); @@ -678,6 +769,7 @@ protected Builder(PublisherStubSettings settings) { getTopicSettings, listTopicsSettings, listTopicSubscriptionsSettings, + listTopicSnapshotsSettings, deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, @@ -735,6 +827,13 @@ public UnaryCallSettings.Builder getTopicSettings() { return listTopicSubscriptionsSettings; } + /** Returns the builder for the settings used for calls to listTopicSnapshots. */ + public PagedCallSettings.Builder< + ListTopicSnapshotsRequest, ListTopicSnapshotsResponse, ListTopicSnapshotsPagedResponse> + listTopicSnapshotsSettings() { + return listTopicSnapshotsSettings; + } + /** Returns the builder for the settings used for calls to deleteTopic. */ public UnaryCallSettings.Builder deleteTopicSettings() { return deleteTopicSettings; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java index 66f365ee0..da19f2a6f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java @@ -32,6 +32,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -87,6 +88,10 @@ public UnaryCallable deleteSubscriptionCallabl throw new UnsupportedOperationException("Not implemented: deleteSubscriptionCallable()"); } + public UnaryCallable getSnapshotCallable() { + throw new UnsupportedOperationException("Not implemented: getSnapshotCallable()"); + } + public UnaryCallable modifyAckDeadlineCallable() { throw new UnsupportedOperationException("Not implemented: modifyAckDeadlineCallable()"); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java index 2b2276135..a6d1a9826 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java @@ -55,6 +55,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -125,6 +126,7 @@ public class SubscriberStubSettings extends StubSettings ListSubscriptionsRequest, ListSubscriptionsResponse, ListSubscriptionsPagedResponse> listSubscriptionsSettings; private final UnaryCallSettings deleteSubscriptionSettings; + private final UnaryCallSettings getSnapshotSettings; private final UnaryCallSettings modifyAckDeadlineSettings; private final UnaryCallSettings acknowledgeSettings; private final UnaryCallSettings pullSettings; @@ -170,6 +172,11 @@ public UnaryCallSettings deleteSubscriptionSet return deleteSubscriptionSettings; } + /** Returns the object with the settings used for calls to getSnapshot. */ + public UnaryCallSettings getSnapshotSettings() { + return getSnapshotSettings; + } + /** Returns the object with the settings used for calls to modifyAckDeadline. */ public UnaryCallSettings modifyAckDeadlineSettings() { return modifyAckDeadlineSettings; @@ -311,6 +318,7 @@ protected SubscriberStubSettings(Builder settingsBuilder) throws IOException { updateSubscriptionSettings = settingsBuilder.updateSubscriptionSettings().build(); listSubscriptionsSettings = settingsBuilder.listSubscriptionsSettings().build(); deleteSubscriptionSettings = settingsBuilder.deleteSubscriptionSettings().build(); + getSnapshotSettings = settingsBuilder.getSnapshotSettings().build(); modifyAckDeadlineSettings = settingsBuilder.modifyAckDeadlineSettings().build(); acknowledgeSettings = settingsBuilder.acknowledgeSettings().build(); pullSettings = settingsBuilder.pullSettings().build(); @@ -454,6 +462,7 @@ public static class Builder extends StubSettings.Builder deleteSubscriptionSettings; + private final UnaryCallSettings.Builder getSnapshotSettings; private final UnaryCallSettings.Builder modifyAckDeadlineSettings; private final UnaryCallSettings.Builder acknowledgeSettings; @@ -488,6 +497,11 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "idempotent2", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); definitions.put( "streaming_pull", ImmutableSet.copyOf( @@ -558,6 +572,8 @@ protected Builder(ClientContext clientContext) { deleteSubscriptionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + modifyAckDeadlineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); acknowledgeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -591,6 +607,7 @@ protected Builder(ClientContext clientContext) { updateSubscriptionSettings, listSubscriptionsSettings, deleteSubscriptionSettings, + getSnapshotSettings, modifyAckDeadlineSettings, acknowledgeSettings, pullSettings, @@ -643,6 +660,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .getSnapshotSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .modifyAckDeadlineSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -714,6 +736,7 @@ protected Builder(SubscriberStubSettings settings) { updateSubscriptionSettings = settings.updateSubscriptionSettings.toBuilder(); listSubscriptionsSettings = settings.listSubscriptionsSettings.toBuilder(); deleteSubscriptionSettings = settings.deleteSubscriptionSettings.toBuilder(); + getSnapshotSettings = settings.getSnapshotSettings.toBuilder(); modifyAckDeadlineSettings = settings.modifyAckDeadlineSettings.toBuilder(); acknowledgeSettings = settings.acknowledgeSettings.toBuilder(); pullSettings = settings.pullSettings.toBuilder(); @@ -735,6 +758,7 @@ protected Builder(SubscriberStubSettings settings) { updateSubscriptionSettings, listSubscriptionsSettings, deleteSubscriptionSettings, + getSnapshotSettings, modifyAckDeadlineSettings, acknowledgeSettings, pullSettings, @@ -795,6 +819,11 @@ public UnaryCallSettings.Builder createSubscriptionS return deleteSubscriptionSettings; } + /** Returns the builder for the settings used for calls to getSnapshot. */ + public UnaryCallSettings.Builder getSnapshotSettings() { + return getSnapshotSettings; + } + /** Returns the builder for the settings used for calls to modifyAckDeadline. */ public UnaryCallSettings.Builder modifyAckDeadlineSettings() { return modifyAckDeadlineSettings; diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java index a8c18fb04..0d49c4288 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java @@ -20,6 +20,8 @@ import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -154,6 +156,22 @@ public void listTopicSubscriptions( } } + @Override + public void listTopicSnapshots( + ListTopicSnapshotsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTopicSnapshotsResponse) { + requests.add(request); + responseObserver.onNext((ListTopicSnapshotsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + @Override public void deleteTopic(DeleteTopicRequest request, StreamObserver responseObserver) { Object response = responses.remove(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java index 2e9e647e6..3d3c2013d 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java @@ -22,6 +22,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -200,11 +201,12 @@ public void pull(PullRequest request, StreamObserver responseObser @Override public StreamObserver streamingPull( final StreamObserver responseObserver) { - final Object response = responses.remove(); StreamObserver requestObserver = new StreamObserver() { @Override public void onNext(StreamingPullRequest value) { + requests.add(value); + final Object response = responses.remove(); if (response instanceof StreamingPullResponse) { responseObserver.onNext((StreamingPullResponse) response); } else if (response instanceof Exception) { @@ -242,6 +244,20 @@ public void modifyPushConfig( } } + @Override + public void getSnapshot(GetSnapshotRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Snapshot) { + requests.add(request); + responseObserver.onNext((Snapshot) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + @Override public void listSnapshots( ListSnapshotsRequest request, StreamObserver responseObserver) { 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 bfe959b50..2d40f14bf 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 @@ -45,6 +45,7 @@ import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeleteSnapshotRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; +import com.google.pubsub.v1.GetSnapshotRequest; import com.google.pubsub.v1.GetSubscriptionRequest; import com.google.pubsub.v1.ListSnapshotsRequest; import com.google.pubsub.v1.ListSnapshotsResponse; @@ -404,6 +405,47 @@ public void deleteSubscriptionExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void getSnapshotTest() { + ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); + TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + Snapshot expectedResponse = + Snapshot.newBuilder().setName(name.toString()).setTopic(topic.toString()).build(); + mockSubscriber.addResponse(expectedResponse); + + ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); + + Snapshot actualResponse = client.getSnapshot(snapshot); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSubscriber.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSnapshotRequest actualRequest = (GetSnapshotRequest) actualRequests.get(0); + + Assert.assertEquals(snapshot, ProjectSnapshotName.parse(actualRequest.getSnapshot())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getSnapshotExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockSubscriber.addException(exception); + + try { + ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); + + client.getSnapshot(snapshot); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void modifyAckDeadlineTest() { 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 7d524361b..43510c154 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 @@ -15,6 +15,7 @@ */ package com.google.cloud.pubsub.v1; +import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSnapshotsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicSubscriptionsPagedResponse; import static com.google.cloud.pubsub.v1.TopicAdminClient.ListTopicsPagedResponse; @@ -38,6 +39,8 @@ import com.google.protobuf.FieldMask; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; +import com.google.pubsub.v1.ListTopicSnapshotsRequest; +import com.google.pubsub.v1.ListTopicSnapshotsResponse; import com.google.pubsub.v1.ListTopicSubscriptionsRequest; import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsRequest; @@ -390,6 +393,54 @@ public void listTopicSubscriptionsExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void listTopicSnapshotsTest() { + String nextPageToken = ""; + String snapshotsElement = "snapshotsElement1339034092"; + List snapshots = Arrays.asList(snapshotsElement); + ListTopicSnapshotsResponse expectedResponse = + ListTopicSnapshotsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllSnapshots(snapshots) + .build(); + mockPublisher.addResponse(expectedResponse); + + TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + + ListTopicSnapshotsPagedResponse pagedListResponse = client.listTopicSnapshots(topic); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSnapshotsList().get(0), resources.get(0)); + + List actualRequests = mockPublisher.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTopicSnapshotsRequest actualRequest = (ListTopicSnapshotsRequest) actualRequests.get(0); + + Assert.assertEquals(topic, TopicName.parse(actualRequest.getTopic())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTopicSnapshotsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockPublisher.addException(exception); + + try { + TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + + client.listTopicSnapshots(topic); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void deleteTopicTest() { diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java index e461881d5..5557855c8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java @@ -1140,7 +1140,7 @@ public AuthenticationMethodCase getAuthenticationMethodCase() { * *

    * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
+   * For example, a Webhook endpoint might use `https://example.com/push`.
    * 
* * string push_endpoint = 1; @@ -1163,7 +1163,7 @@ public java.lang.String getPushEndpoint() { * *
    * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
+   * For example, a Webhook endpoint might use `https://example.com/push`.
    * 
* * string push_endpoint = 1; @@ -1808,7 +1808,7 @@ public Builder clearAuthenticationMethod() { * *
      * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
+     * For example, a Webhook endpoint might use `https://example.com/push`.
      * 
* * string push_endpoint = 1; @@ -1831,7 +1831,7 @@ public java.lang.String getPushEndpoint() { * *
      * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
+     * For example, a Webhook endpoint might use `https://example.com/push`.
      * 
* * string push_endpoint = 1; @@ -1854,7 +1854,7 @@ public com.google.protobuf.ByteString getPushEndpointBytes() { * *
      * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
+     * For example, a Webhook endpoint might use `https://example.com/push`.
      * 
* * string push_endpoint = 1; @@ -1876,7 +1876,7 @@ public Builder setPushEndpoint(java.lang.String value) { * *
      * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
+     * For example, a Webhook endpoint might use `https://example.com/push`.
      * 
* * string push_endpoint = 1; @@ -1894,7 +1894,7 @@ public Builder clearPushEndpoint() { * *
      * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
+     * For example, a Webhook endpoint might use `https://example.com/push`.
      * 
* * string push_endpoint = 1; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java index 873e0074a..091a066f9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface PushConfigOrBuilder * *
    * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
+   * For example, a Webhook endpoint might use `https://example.com/push`.
    * 
* * string push_endpoint = 1; @@ -41,7 +41,7 @@ public interface PushConfigOrBuilder * *
    * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
+   * For example, a Webhook endpoint might use `https://example.com/push`.
    * 
* * string push_endpoint = 1; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java index b366d91da..298013f30 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java @@ -227,19 +227,18 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { * * *
-   * Delivery attempt counter is 1 + (the sum of number of NACKs and number of
-   * ack_deadline exceeds) for this message.
+   * The approximate number of times that Cloud Pub/Sub has attempted to deliver
+   * the associated message to a subscriber.
+   * More precisely, this is 1 + (number of NACKs) +
+   * (number of ack_deadline exceeds) for this message.
    * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
    * exceeds event is whenever a message is not acknowledged within
    * ack_deadline. Note that ack_deadline is initially
    * Subscription.ackDeadlineSeconds, but may get extended automatically by
    * the client library.
-   * The first delivery of a given message will have this value as 1. The value
-   * is calculated at best effort and is approximate.
+   * Upon the first delivery of a given message, `delivery_attempt` will have a
+   * value of 1. The value is calculated at best effort and is approximate.
    * If a DeadLetterPolicy is not set on the subscription, this will be 0.
-   * <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.
    * 
* * int32 delivery_attempt = 3; @@ -902,19 +901,18 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { * * *
-     * Delivery attempt counter is 1 + (the sum of number of NACKs and number of
-     * ack_deadline exceeds) for this message.
+     * The approximate number of times that Cloud Pub/Sub has attempted to deliver
+     * the associated message to a subscriber.
+     * More precisely, this is 1 + (number of NACKs) +
+     * (number of ack_deadline exceeds) for this message.
      * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
      * exceeds event is whenever a message is not acknowledged within
      * ack_deadline. Note that ack_deadline is initially
      * Subscription.ackDeadlineSeconds, but may get extended automatically by
      * the client library.
-     * The first delivery of a given message will have this value as 1. The value
-     * is calculated at best effort and is approximate.
+     * Upon the first delivery of a given message, `delivery_attempt` will have a
+     * value of 1. The value is calculated at best effort and is approximate.
      * If a DeadLetterPolicy is not set on the subscription, this will be 0.
-     * <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.
      * 
* * int32 delivery_attempt = 3; @@ -928,19 +926,18 @@ public int getDeliveryAttempt() { * * *
-     * Delivery attempt counter is 1 + (the sum of number of NACKs and number of
-     * ack_deadline exceeds) for this message.
+     * The approximate number of times that Cloud Pub/Sub has attempted to deliver
+     * the associated message to a subscriber.
+     * More precisely, this is 1 + (number of NACKs) +
+     * (number of ack_deadline exceeds) for this message.
      * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
      * exceeds event is whenever a message is not acknowledged within
      * ack_deadline. Note that ack_deadline is initially
      * Subscription.ackDeadlineSeconds, but may get extended automatically by
      * the client library.
-     * The first delivery of a given message will have this value as 1. The value
-     * is calculated at best effort and is approximate.
+     * Upon the first delivery of a given message, `delivery_attempt` will have a
+     * value of 1. The value is calculated at best effort and is approximate.
      * If a DeadLetterPolicy is not set on the subscription, this will be 0.
-     * <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.
      * 
* * int32 delivery_attempt = 3; @@ -958,19 +955,18 @@ public Builder setDeliveryAttempt(int value) { * * *
-     * Delivery attempt counter is 1 + (the sum of number of NACKs and number of
-     * ack_deadline exceeds) for this message.
+     * The approximate number of times that Cloud Pub/Sub has attempted to deliver
+     * the associated message to a subscriber.
+     * More precisely, this is 1 + (number of NACKs) +
+     * (number of ack_deadline exceeds) for this message.
      * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
      * exceeds event is whenever a message is not acknowledged within
      * ack_deadline. Note that ack_deadline is initially
      * Subscription.ackDeadlineSeconds, but may get extended automatically by
      * the client library.
-     * The first delivery of a given message will have this value as 1. The value
-     * is calculated at best effort and is approximate.
+     * Upon the first delivery of a given message, `delivery_attempt` will have a
+     * value of 1. The value is calculated at best effort and is approximate.
      * If a DeadLetterPolicy is not set on the subscription, this will be 0.
-     * <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.
      * 
* * int32 delivery_attempt = 3; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java index eb54e43f1..805690b39 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java @@ -87,19 +87,18 @@ public interface ReceivedMessageOrBuilder * * *
-   * Delivery attempt counter is 1 + (the sum of number of NACKs and number of
-   * ack_deadline exceeds) for this message.
+   * The approximate number of times that Cloud Pub/Sub has attempted to deliver
+   * the associated message to a subscriber.
+   * More precisely, this is 1 + (number of NACKs) +
+   * (number of ack_deadline exceeds) for this message.
    * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
    * exceeds event is whenever a message is not acknowledged within
    * ack_deadline. Note that ack_deadline is initially
    * Subscription.ackDeadlineSeconds, but may get extended automatically by
    * the client library.
-   * The first delivery of a given message will have this value as 1. The value
-   * is calculated at best effort and is approximate.
+   * Upon the first delivery of a given message, `delivery_attempt` will have a
+   * value of 1. The value is calculated at best effort and is approximate.
    * If a DeadLetterPolicy is not set on the subscription, this will be 0.
-   * <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.
    * 
* * int32 delivery_attempt = 3; 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 c91b6d10f..64391376b 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 @@ -773,9 +773,6 @@ public com.google.protobuf.ByteString getFilterBytes() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -796,9 +793,6 @@ public boolean hasDeadLetterPolicy() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -821,9 +815,6 @@ public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -2948,9 +2939,6 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -2971,9 +2959,6 @@ public boolean hasDeadLetterPolicy() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3000,9 +2985,6 @@ public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3031,9 +3013,6 @@ public Builder setDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value) * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3060,9 +3039,6 @@ public Builder setDeadLetterPolicy( * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3095,9 +3071,6 @@ public Builder mergeDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3124,9 +3097,6 @@ public Builder clearDeadLetterPolicy() { * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3147,9 +3117,6 @@ public com.google.pubsub.v1.DeadLetterPolicy.Builder getDeadLetterPolicyBuilder( * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -3174,9 +3141,6 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; 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 0c1a6fe40..dd48671fb 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 @@ -406,9 +406,6 @@ public interface SubscriptionOrBuilder * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -427,9 +424,6 @@ public interface SubscriptionOrBuilder * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; @@ -448,9 +442,6 @@ public interface SubscriptionOrBuilder * parent project (i.e., * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have * permission to Acknowledge() messages on this subscription. - * <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. * * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; 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 09996bf5e..14d871ac5 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 @@ -22,8 +22,6 @@ 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; @@ -119,28 +117,6 @@ public static TopicName parse(String formattedString) { 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); 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 5309c9bd7..44b586ae1 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 @@ -182,9 +182,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -201,9 +201,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -220,9 +220,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -776,9 +776,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -795,9 +795,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -820,9 +820,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -847,9 +847,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -871,9 +871,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -900,9 +900,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -925,9 +925,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -944,9 +944,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -967,9 +967,9 @@ 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
-     * "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.
+     * "message_storage_policy" but the `message_storage_policy` is not set in
+     * the `topic` provided above, then the updated value is determined by the
+     * policy configured at the project or organization level.
      * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; 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 257f0fdb8..c65735f57 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 @@ -64,9 +64,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -81,9 +81,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -98,9 +98,9 @@ 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
-   * "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.
+   * "message_storage_policy" but the `message_storage_policy` is not set in
+   * the `topic` provided above, then the updated value is determined by the
+   * policy configured at the project or organization level.
    * 
* * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; 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 b49b30ed4..a42d03220 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 @@ -222,9 +222,9 @@ message UpdateTopicRequest { // 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. + // "message_storage_policy" but the `message_storage_policy` is not set in + // the `topic` provided above, then the updated value is determined by the + // policy configured at the project or organization level. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -689,9 +689,6 @@ message Subscription { // parent project (i.e., // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have // permission to Acknowledge() messages on this subscription. - // 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. DeadLetterPolicy dead_letter_policy = 13; // A policy that specifies how Cloud Pub/Sub retries message delivery for this @@ -796,7 +793,7 @@ message PushConfig { } // A URL locating the endpoint to which messages should be pushed. - // For example, a Webhook endpoint might use "https://example.com/push". + // For example, a Webhook endpoint might use `https://example.com/push`. string push_endpoint = 1; // Endpoint configuration attributes that can be used to control different @@ -842,8 +839,11 @@ message ReceivedMessage { // The message. PubsubMessage message = 2; - // Delivery attempt counter is 1 + (the sum of number of NACKs and number of - // ack_deadline exceeds) for this message. + // The approximate number of times that Cloud Pub/Sub has attempted to deliver + // the associated message to a subscriber. + // + // More precisely, this is 1 + (number of NACKs) + + // (number of ack_deadline exceeds) for this message. // // A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline // exceeds event is whenever a message is not acknowledged within @@ -851,13 +851,10 @@ message ReceivedMessage { // Subscription.ackDeadlineSeconds, but may get extended automatically by // the client library. // - // The first delivery of a given message will have this value as 1. The value - // is calculated at best effort and is approximate. + // Upon the first delivery of a given message, `delivery_attempt` will have a + // value of 1. The value is calculated at best effort and is approximate. // // If a DeadLetterPolicy is not set on the subscription, this will be 0. - // 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. int32 delivery_attempt = 3; } diff --git a/synth.metadata b/synth.metadata index a508982a7..4effe7abd 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/java-pubsub.git", - "sha": "b4e0b77255ebb04eead8bf3e5c7be0fe76ac4c89" + "remote": "https://github.com/googleapis/java-pubsub.git", + "sha": "e1d285147accf85dc47417646388b8298f8c484e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b5e9b0b09cc15c263f07da92fa64db31b2e4dd07", - "internalRef": "307068250" + "sha": "edd3b80fb770548d6ad780105f1782de6ff73ea0", + "internalRef": "311053644" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f8a9933e5e98202b04ef427f28d1d79221190fa4" + "sha": "5b48b0716a36ca069db3038da7e205c87a22ed19" } } ], From 270bd941008121b30be26560d0722c7d15abeb55 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 24 May 2020 15:44:09 -0700 Subject: [PATCH 03/22] chore(java): allow overriding minimum supported Java version in templates (#577) (#208) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore(java): allow overriding minimum supported Java version in templates (#577) Source-Author: Jeff Ching Source-Date: Thu May 21 17:51:49 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 65f8c647c0bc0c6b38211b969a2a003e271a5ef1 Source-Link: https://github.com/googleapis/synthtool/commit/65f8c647c0bc0c6b38211b969a2a003e271a5ef1 --- README.md | 24 ++++++++++++++++++------ synth.metadata | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index be3c05769..7c91db712 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 5.3.0 + 5.4.0 pom import @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.106.0' +compile 'com.google.cloud:google-cloud-pubsub:1.105.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.106.0" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.105.1" ``` [//]: # ({x-version-update-end}) @@ -218,6 +218,19 @@ In [CreateTopicAndPublishMessages.java](https://github.com/googleapis/google-clo +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Create Subscription With Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | +| Receive Messages With Delivery Attempts Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java) | +| Remove Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java) | +| Update Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | + + ## Troubleshooting @@ -252,14 +265,13 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] -Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1]Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [product-docs]: https://cloud.google.com/pubsub/docs/ -[javadocs]: https://googleapis.dev/java/google-cloud-pubusb/latest/index.html +[javadocs]: https://googleapis.dev/java/google-cloud-pubsub/latest/index.html [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.svg [kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.html [kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.svg diff --git a/synth.metadata b/synth.metadata index 4effe7abd..8b91264df 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "e1d285147accf85dc47417646388b8298f8c484e" + "sha": "16624f88ad19ccaf2ea074a62242496be103659f" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5b48b0716a36ca069db3038da7e205c87a22ed19" + "sha": "65f8c647c0bc0c6b38211b969a2a003e271a5ef1" } } ], From 15f71ed143dd990e0bf1089571d1a3d14ceaf491 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 May 2020 19:06:29 +0200 Subject: [PATCH 04/22] chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.106.0 (#210) --- samples/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 2fdd67dd8..51d291456 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-pubsub - 1.105.1 + 1.106.0 From 63a0e7a423ca0e9de9e446f0686aec6e6368f67c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 25 May 2020 12:08:31 -0700 Subject: [PATCH 05/22] chore: release 1.106.1-SNAPSHOT (#209) * updated versions.txt [ci skip] * updated samples/install-without-bom/pom.xml [ci skip] * updated samples/pom.xml [ci skip] * updated samples/snippets/pom.xml [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] * updated samples/snapshot/pom.xml 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 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index e95c8dcb3..8ba10396b 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.106.0 + 1.106.1-SNAPSHOT pom com.google.cloud @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.88.0 + 1.88.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.88.0 + 1.88.1-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.106.0 + 1.106.1-SNAPSHOT diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 2858a653c..5b3e98761 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.106.0 + 1.106.1-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.106.0 + 1.106.1-SNAPSHOT google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index b5f99563b..cf0c8d698 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.88.0 + 1.88.1-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.106.0 + 1.106.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index c03a20744..af518b3ce 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.106.0 + 1.106.1-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -82,17 +82,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.88.0 + 1.88.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.88.0 + 1.88.1-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.106.0 + 1.106.1-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index bad1c0920..f30bb9ea9 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.88.0 + 1.88.1-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.106.0 + 1.106.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a394ade69..ddbb83147 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.106.0 + 1.106.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 436efd860..57cecb2f3 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-pubsub-v1:1.88.0:1.88.0 -grpc-google-cloud-pubsub-v1:1.88.0:1.88.0 -google-cloud-pubsub:1.106.0:1.106.0 \ No newline at end of file +proto-google-cloud-pubsub-v1:1.88.0:1.88.1-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.88.0:1.88.1-SNAPSHOT +google-cloud-pubsub:1.106.0:1.106.1-SNAPSHOT \ No newline at end of file From 48fb4002706d495bcca018a211ba1387171b1416 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 May 2020 07:10:11 -0700 Subject: [PATCH 06/22] chore(java): fix inadvertent whitespace changes (#578) (#214) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore(java): fix inadvertent whitespace changes (#578) Source-Author: Jeff Ching Source-Date: Tue May 26 08:37:51 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 388f7aafee3d7a067c23db6c13b7e83fb361c64a Source-Link: https://github.com/googleapis/synthtool/commit/388f7aafee3d7a067c23db6c13b7e83fb361c64a --- README.md | 9 +++++---- synth.metadata | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7c91db712..cf44cb0f7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.105.1 + 1.106.0 ``` @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.105.1' +compile 'com.google.cloud:google-cloud-pubsub:1.106.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.105.1" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.106.0" ``` [//]: # ({x-version-update-end}) @@ -265,7 +265,8 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1]Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] diff --git a/synth.metadata b/synth.metadata index 8b91264df..67e6c7384 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "16624f88ad19ccaf2ea074a62242496be103659f" + "sha": "63a0e7a423ca0e9de9e446f0686aec6e6368f67c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "65f8c647c0bc0c6b38211b969a2a003e271a5ef1" + "sha": "388f7aafee3d7a067c23db6c13b7e83fb361c64a" } } ], From 49ecc69fb6a63abf6a83f82f2820ff386cdaf5fb Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Wed, 27 May 2020 14:00:11 -0400 Subject: [PATCH 07/22] deps: bump shared-deps version and add back certain test deps (#218) --- pom.xml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af518b3ce..9aff1afe3 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.4.0 + 0.5.0 pom import @@ -105,12 +105,32 @@ error_prone_annotations ${errorprone.version} + + + + junit + junit + 4.13 + test + + + com.google.api.grpc + grpc-google-iam-v1 + 0.13.0 + test + org.easymock easymock ${easymock.version} test + + com.google.truth + truth + 1.0.1 + test + From c6fc69d47dea6f3833a9a2945d27ed3f9e310c52 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 28 May 2020 18:42:04 +0200 Subject: [PATCH 08/22] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.6.0 (#219) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9aff1afe3..158ae28a8 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.5.0 + 0.6.0 pom import From 28ab5211c344d60743c3cb11f568c8f2a4e2c040 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Thu, 28 May 2020 19:27:23 -0400 Subject: [PATCH 09/22] deps: remove grpc test dep since it's now in shared-deps (#220) --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index 158ae28a8..e2222c990 100644 --- a/pom.xml +++ b/pom.xml @@ -113,12 +113,6 @@ 4.13 test - - com.google.api.grpc - grpc-google-iam-v1 - 0.13.0 - test - org.easymock easymock From 85eff94c3b8b437f91d5d70218089edee2c5752c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 May 2020 20:42:13 +0200 Subject: [PATCH 10/22] chore(deps): update dependency com.google.cloud:libraries-bom to v5.5.0 (#224) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.4.0` -> `5.5.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). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index d8a58f407..b8373ed8a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 5.4.0 + 5.5.0 pom import From 89eae9a6c3dc585926f85fc0de2b80f7dbfedb42 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Jun 2020 19:22:55 +0200 Subject: [PATCH 11/22] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.7.0 (#221) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e2222c990..0ffd24d3d 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.6.0 + 0.7.0 pom import From f375ecbbd66e518a25c1d0459ba0634121ddced1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Jun 2020 19:24:15 +0200 Subject: [PATCH 12/22] deps: update dependency com.google.errorprone:error_prone_annotations to v2.4.0 (#225) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ffd24d3d..8b4b9a0a2 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ google-cloud-pubsub-parent 4.2 1.3.2 - 2.3.4 + 2.4.0 1.7.2 From ed222384f58d1b3b61d9844bfefe55d71961fbc4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 11:46:15 -0700 Subject: [PATCH 13/22] chore: regenerate README versions (#213) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/92fae1bc-c876-439b-aed4-253c36a9f7b1/targets From 19aba2e657ec55f8ba20f142c51c9f95c87acdc3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Jun 2020 22:33:28 +0200 Subject: [PATCH 14/22] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.1.0 (#226) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-project-info-reports-plugin | minor | `3.0.0` -> `3.1.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 8b4b9a0a2..d70aea590 100644 --- a/pom.xml +++ b/pom.xml @@ -164,7 +164,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.0 From 3d1052a15a0f3ab57cb8199ad890c16a0c1ef035 Mon Sep 17 00:00:00 2001 From: Tianzi Cai Date: Fri, 5 Jun 2020 11:24:53 -0700 Subject: [PATCH 15/22] samples: migrate publisher samples and add tests (#227) * add publisher examples * remove enable-samples and format plugin --- pom.xml | 10 -- ...bscriptionWithDeadLetterPolicyExample.java | 8 +- .../PublishWithBatchSettingsExample.java | 93 ++++++++++++++++++ .../PublishWithConcurrencyControlExample.java | 85 ++++++++++++++++ .../PublishWithCustomAttributesExample.java | 71 ++++++++++++++ .../PublishWithErrorHandlerExample.java | 96 +++++++++++++++++++ .../PublishWithRetrySettingsExample.java | 88 +++++++++++++++++ ...veMessagesWithDeliveryAttemptsExample.java | 4 +- .../pubsub/RemoveDeadLetterPolicyExample.java | 6 +- .../pubsub/UpdateDeadLetterPolicyExample.java | 8 +- .../src/test/java/pubsub/PublisherIT.java | 88 +++++++++++++++++ 11 files changed, 534 insertions(+), 23 deletions(-) create mode 100644 samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java create mode 100644 samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java create mode 100644 samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java create mode 100644 samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java create mode 100644 samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java create mode 100644 samples/snippets/src/test/java/pubsub/PublisherIT.java diff --git a/pom.xml b/pom.xml index d70aea590..6813a9d5a 100644 --- a/pom.xml +++ b/pom.xml @@ -149,16 +149,6 @@ google-cloud-pubsub-bom - - - - enable-samples - - samples - - - - diff --git a/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java b/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java index c9a07fb4a..90a492f74 100644 --- a/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java @@ -28,15 +28,15 @@ public class CreateSubscriptionWithDeadLetterPolicyExample { public static void main(String... args) throws Exception { // TODO(developer): Replace these variables before running the sample. - String projectId = "Your Project ID"; + String projectId = "your-project-id"; // This is the subscription you want to create with a dead letter policy. - String subscriptionId = "Your Subscription ID"; + String subscriptionId = "your-subscription-id"; // This is an existing topic that you want to attach the subscription with dead letter policy // to. - String topicId = "Your Topic ID"; + String topicId = "your-topic-id"; // This is an existing topic that the subscription with dead letter policy forwards dead letter // messages to. - String deadLetterTopicId = "Your Dead Letter Topic ID"; + String deadLetterTopicId = "your-dead-letter-topic-id"; CreateSubscriptionWithDeadLetterPolicyExample.createSubscriptionWithDeadLetterPolicyExample( projectId, subscriptionId, topicId, deadLetterTopicId); diff --git a/samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java b/samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java new file mode 100644 index 000000000..e970607bf --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java @@ -0,0 +1,93 @@ +/* + * 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. + */ + +package pubsub; + +// [START pubsub_publisher_batch_settings] + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.batching.BatchingSettings; +import com.google.cloud.pubsub.v1.Publisher; +import com.google.protobuf.ByteString; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import org.threeten.bp.Duration; + +public class PublishWithBatchSettingsExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + publishWithBatchSettingsExample(projectId, topicId); + } + + public static void publishWithBatchSettingsExample(String projectId, String topicId) + throws IOException, ExecutionException, InterruptedException { + TopicName topicName = TopicName.of(projectId, topicId); + Publisher publisher = null; + List> messageIdFutures = new ArrayList<>(); + + try { + // Batch settings control how the publisher batches messages + long requestBytesThreshold = 5000L; // default : 1 byte + long messageCountBatchSize = 100L; // default : 1 message + + Duration publishDelayThreshold = Duration.ofMillis(100); // default : 1 ms + + // Publish request get triggered based on request size, messages count & time since last + // publish + BatchingSettings batchingSettings = + BatchingSettings.newBuilder() + .setElementCountThreshold(messageCountBatchSize) + .setRequestByteThreshold(requestBytesThreshold) + .setDelayThreshold(publishDelayThreshold) + .build(); + + // Create a publisher instance with default settings bound to the topic + publisher = Publisher.newBuilder(topicName).setBatchingSettings(batchingSettings).build(); + + // schedule publishing one message at a time : messages get automatically batched + for (int i = 0; i < 100; i++) { + String message = "message " + i; + ByteString data = ByteString.copyFromUtf8(message); + PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); + + // Once published, returns a server-assigned message id (unique within the topic) + ApiFuture messageIdFuture = publisher.publish(pubsubMessage); + messageIdFutures.add(messageIdFuture); + } + } finally { + // Wait on any pending publish requests. + List messageIds = ApiFutures.allAsList(messageIdFutures).get(); + + System.out.println("Published " + messageIds.size() + " messages with batch settings."); + + if (publisher != null) { + // When finished with the publisher, shutdown to free up resources. + publisher.shutdown(); + publisher.awaitTermination(1, TimeUnit.MINUTES); + } + } + } +} +// [END pubsub_publisher_batch_settings] diff --git a/samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java b/samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java new file mode 100644 index 000000000..35b72415a --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java @@ -0,0 +1,85 @@ +/* + * 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. + */ + +package pubsub; + +// [START pubsub_publisher_concurrency_control] + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.ExecutorProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.cloud.pubsub.v1.Publisher; +import com.google.protobuf.ByteString; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; + +public class PublishWithConcurrencyControlExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + publishWithConcurrencyControlExample(projectId, topicId); + } + + public static void publishWithConcurrencyControlExample(String projectId, String topicId) + throws IOException, ExecutionException, InterruptedException { + TopicName topicName = TopicName.of(projectId, topicId); + Publisher publisher = null; + List> messageIdFutures = new ArrayList<>(); + + try { + // Provides an executor service for processing messages. The default + // `executorProvider` used by the publisher has a default thread count of + // 5 * the number of processors available to the Java virtual machine. + ExecutorProvider executorProvider = + InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(4).build(); + + // `setExecutorProvider` configures an executor for the publisher. + publisher = Publisher.newBuilder(topicName).setExecutorProvider(executorProvider).build(); + + // schedule publishing one message at a time : messages get automatically batched + for (int i = 0; i < 100; i++) { + String message = "message " + i; + ByteString data = ByteString.copyFromUtf8(message); + PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); + + // Once published, returns a server-assigned message id (unique within the topic) + ApiFuture messageIdFuture = publisher.publish(pubsubMessage); + messageIdFutures.add(messageIdFuture); + } + } finally { + // Wait on any pending publish requests. + List messageIds = ApiFutures.allAsList(messageIdFutures).get(); + + System.out.println("Published " + messageIds.size() + " messages with concurrency control."); + + if (publisher != null) { + // When finished with the publisher, shutdown to free up resources. + publisher.shutdown(); + publisher.awaitTermination(1, TimeUnit.MINUTES); + } + } + } +} + +// [END pubsub_publisher_concurrency_control] diff --git a/samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java b/samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java new file mode 100644 index 000000000..990b9a03d --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java @@ -0,0 +1,71 @@ +/* + * 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. + */ + +package pubsub; + +// [START pubsub_publish_custom_attributes] + +import com.google.api.core.ApiFuture; +import com.google.cloud.pubsub.v1.Publisher; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.ByteString; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; + +public class PublishWithCustomAttributesExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + publishWithCustomAttributesExample(projectId, topicId); + } + + public static void publishWithCustomAttributesExample(String projectId, String topicId) + throws IOException, ExecutionException, InterruptedException { + TopicName topicName = TopicName.of(projectId, topicId); + Publisher publisher = null; + + try { + // Create a publisher instance with default settings bound to the topic + publisher = Publisher.newBuilder(topicName).build(); + + String message = "first message"; + ByteString data = ByteString.copyFromUtf8(message); + PubsubMessage pubsubMessage = + PubsubMessage.newBuilder() + .setData(data) + .putAllAttributes(ImmutableMap.of("year", "2020", "author", "unknown")) + .build(); + + // Once published, returns a server-assigned message id (unique within the topic) + ApiFuture messageIdFuture = publisher.publish(pubsubMessage); + String messageId = messageIdFuture.get(); + System.out.println("Published a message with custom attributes: " + messageId); + + } finally { + if (publisher != null) { + // When finished with the publisher, shutdown to free up resources. + publisher.shutdown(); + publisher.awaitTermination(1, TimeUnit.MINUTES); + } + } + } +} +// [END pubsub_publish_custom_attributes] diff --git a/samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java b/samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java new file mode 100644 index 000000000..88e42d61e --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java @@ -0,0 +1,96 @@ +/* + * 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. + */ + +package pubsub; + +// [START pubsub_publish_with_error_handler] + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutureCallback; +import com.google.api.core.ApiFutures; +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.pubsub.v1.Publisher; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.ByteString; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; + +public class PublishWithErrorHandlerExample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + publishWithErrorHandlerExample(projectId, topicId); + } + + public static void publishWithErrorHandlerExample(String projectId, String topicId) + throws IOException, InterruptedException { + TopicName topicName = TopicName.of(projectId, topicId); + Publisher publisher = null; + + try { + // Create a publisher instance with default settings bound to the topic + publisher = Publisher.newBuilder(topicName).build(); + + List messages = Arrays.asList("first message", "second message"); + + for (final String message : messages) { + ByteString data = ByteString.copyFromUtf8(message); + PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); + + // Once published, returns a server-assigned message id (unique within the topic) + ApiFuture future = publisher.publish(pubsubMessage); + + // Add an asynchronous callback to handle success / failure + ApiFutures.addCallback( + future, + new ApiFutureCallback() { + + @Override + public void onFailure(Throwable throwable) { + if (throwable instanceof ApiException) { + ApiException apiException = ((ApiException) throwable); + // details on the API exception + System.out.println(apiException.getStatusCode().getCode()); + System.out.println(apiException.isRetryable()); + } + System.out.println("Error publishing message : " + message); + } + + @Override + public void onSuccess(String messageId) { + // Once published, returns server-assigned message ids (unique within the topic) + System.out.println("Published message ID: " + messageId); + } + }, + MoreExecutors.directExecutor()); + } + } finally { + if (publisher != null) { + // When finished with the publisher, shutdown to free up resources. + publisher.shutdown(); + publisher.awaitTermination(1, TimeUnit.MINUTES); + } + } + } +} +// [END pubsub_publish_with_error_handler] diff --git a/samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java b/samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java new file mode 100644 index 000000000..909702dec --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java @@ -0,0 +1,88 @@ +/* + * 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. + */ + +package pubsub; + +// [START pubsub_publisher_retry_settings] + +import com.google.api.core.ApiFuture; +import com.google.api.gax.retrying.RetrySettings; +import com.google.cloud.pubsub.v1.Publisher; +import com.google.protobuf.ByteString; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import org.threeten.bp.Duration; + +public class PublishWithRetrySettingsExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + publishWithRetrySettingsExample(projectId, topicId); + } + + public static void publishWithRetrySettingsExample(String projectId, String topicId) + throws IOException, ExecutionException, InterruptedException { + TopicName topicName = TopicName.of(projectId, topicId); + Publisher publisher = null; + + try { + // Retry settings control how the publisher handles retry-able failures + Duration initialRetryDelay = Duration.ofMillis(100); // default: 100 ms + double retryDelayMultiplier = 2.0; // back off for repeated failures, default: 1.3 + Duration maxRetryDelay = Duration.ofSeconds(60); // default : 60 seconds + Duration initialRpcTimeout = Duration.ofSeconds(1); // default: 5 seconds + double rpcTimeoutMultiplier = 1.0; // default: 1.0 + Duration maxRpcTimeout = Duration.ofSeconds(600); // default: 600 seconds + Duration totalTimeout = Duration.ofSeconds(600); // default: 600 seconds + + RetrySettings retrySettings = + RetrySettings.newBuilder() + .setInitialRetryDelay(initialRetryDelay) + .setRetryDelayMultiplier(retryDelayMultiplier) + .setMaxRetryDelay(maxRetryDelay) + .setInitialRpcTimeout(initialRpcTimeout) + .setRpcTimeoutMultiplier(rpcTimeoutMultiplier) + .setMaxRpcTimeout(maxRpcTimeout) + .setTotalTimeout(totalTimeout) + .build(); + + // Create a publisher instance with default settings bound to the topic + publisher = Publisher.newBuilder(topicName).setRetrySettings(retrySettings).build(); + + String message = "first message"; + ByteString data = ByteString.copyFromUtf8(message); + PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); + + // Once published, returns a server-assigned message id (unique within the topic) + ApiFuture messageIdFuture = publisher.publish(pubsubMessage); + String messageId = messageIdFuture.get(); + System.out.println("Published a message with retry settings: " + messageId); + + } finally { + if (publisher != null) { + // When finished with the publisher, shutdown to free up resources. + publisher.shutdown(); + publisher.awaitTermination(1, TimeUnit.MINUTES); + } + } + } +} +// [END pubsub_publisher_retry_settings] diff --git a/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java b/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java index 8612e45dc..b63ca1dd7 100644 --- a/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java +++ b/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java @@ -30,9 +30,9 @@ public class ReceiveMessagesWithDeliveryAttemptsExample { public static void main(String... args) throws Exception { // TODO(developer): Replace these variables before running the sample. - String projectId = "Your Project ID"; + String projectId = "your-project-id"; // This is an existing subscription with a dead letter policy. - String subscriptionId = "Your Subscription ID"; + String subscriptionId = "your-subscription-id"; ReceiveMessagesWithDeliveryAttemptsExample.receiveMessagesWithDeliveryAttemptsExample( projectId, subscriptionId); diff --git a/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java b/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java index 51d23594a..842657b08 100644 --- a/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java @@ -29,11 +29,11 @@ public class RemoveDeadLetterPolicyExample { public static void main(String... args) throws Exception { // TODO(developer): Replace these variables before running the sample. - String projectId = "Your Project ID"; + String projectId = "your-project-id"; // This is an existing subscription with dead letter policy. - String subscriptionId = "Your Subscription ID"; + String subscriptionId = "your-subscription-id"; // This is an existing topic that the subscription with dead letter policy is attached to. - String topicId = "Your Topic ID"; + String topicId = "your-topic-id"; RemoveDeadLetterPolicyExample.removeDeadLetterPolicyExample(projectId, subscriptionId, topicId); } diff --git a/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java b/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java index ff4270ea6..c8d7babee 100644 --- a/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java @@ -30,14 +30,14 @@ public class UpdateDeadLetterPolicyExample { public static void main(String... args) throws Exception { // TODO(developer): Replace these variables before running the sample. - String projectId = "Your Project ID"; + String projectId = "your-project-id"; // This is an existing subscription with a dead letter policy. - String subscriptionId = "Your Subscription ID"; + String subscriptionId = "your-subscription-id"; // This is an existing topic that the subscription with dead letter policy is attached to. - String topicId = "Your Topic ID"; + String topicId = "your-topic-id"; // This is an existing dead letter topic that the subscription with dead letter policy forwards // dead letter messages to. - String deadLetterTopicId = "Your Dead Letter Topic ID"; + String deadLetterTopicId = "your-dead-letter-topic-id"; UpdateDeadLetterPolicyExample.updateDeadLetterPolicyExample( projectId, subscriptionId, topicId, deadLetterTopicId); diff --git a/samples/snippets/src/test/java/pubsub/PublisherIT.java b/samples/snippets/src/test/java/pubsub/PublisherIT.java new file mode 100644 index 000000000..79fd34c90 --- /dev/null +++ b/samples/snippets/src/test/java/pubsub/PublisherIT.java @@ -0,0 +1,88 @@ +package pubsub; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.Timeout; + +public class PublisherIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + private static final String projectId = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String _suffix = UUID.randomUUID().toString(); + private static final String topicId = "publisher-test-topic-" + _suffix; + private static final TopicName topicName = TopicName.of(projectId, topicId); + + private static void requireEnvVar(String varName) { + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + } + + @Rule public Timeout globalTimeout = Timeout.seconds(300); // 5 minute timeout + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() throws Exception { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + Topic topic = Topic.newBuilder().setName(topicName.toString()).build(); + topicAdminClient.createTopic(topic); + } + } + + @After + public void tearDown() throws Exception { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + topicAdminClient.deleteTopic(topicName.toString()); + } + + System.setOut(null); + } + + @Test + public void testPublisher() throws Exception { + // Test publish with error handling + PublishWithErrorHandlerExample.publishWithErrorHandlerExample(projectId, topicId); + assertThat(bout.toString()).contains("Published message ID: "); + + bout.reset(); + // Test publish with custom attributes. + PublishWithCustomAttributesExample.publishWithCustomAttributesExample(projectId, topicId); + assertThat(bout.toString()).contains("Published a message with custom attributes: "); + + bout.reset(); + // Test publish with batch settings. + PublishWithBatchSettingsExample.publishWithBatchSettingsExample(projectId, topicId); + assertThat(bout.toString()).contains("Published 100 messages with batch settings."); + + bout.reset(); + // Test publish with concurrency control. + PublishWithConcurrencyControlExample.publishWithConcurrencyControlExample(projectId, topicId); + assertThat(bout.toString()).contains("Published 100 messages with concurrency control."); + + bout.reset(); + // Test publish with Retry settings. + PublishWithRetrySettingsExample.publishWithRetrySettingsExample(projectId, topicId); + assertThat(bout.toString()).contains("Published a message with retry settings: "); + } +} From 507673b54549e0cde8edb12d44a09a57663536eb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 5 Jun 2020 12:20:12 -0700 Subject: [PATCH 16/22] chore(java_templates): add default CODEOWNERS files for samples reviews (#229) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/129bf4ce-2255-4b88-83a1-1b40d560e3d3/targets Source-Link: https://github.com/googleapis/synthtool/commit/8b65daa222d193b689279162781baf0aa1f0ffd2 --- .github/CODEOWNERS | 8 ++++++++ README.md | 2 +- synth.metadata | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..6137bef2a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,8 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/README.md b/README.md index cf44cb0f7..53e551aa3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 5.4.0 + 5.5.0 pom import diff --git a/synth.metadata b/synth.metadata index 67e6c7384..3707cd7d4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "63a0e7a423ca0e9de9e446f0686aec6e6368f67c" + "sha": "ed222384f58d1b3b61d9844bfefe55d71961fbc4" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "388f7aafee3d7a067c23db6c13b7e83fb361c64a" + "sha": "8b65daa222d193b689279162781baf0aa1f0ffd2" } } ], From 8414ee7fc30d581f22becd00d3cca0dc156cc2ac Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 5 Jun 2020 12:34:02 -0700 Subject: [PATCH 17/22] changes without context (#228) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. Co-authored-by: Tianzi Cai From 09866b0d36e2dd1c994b4c91807d71552b65c8e1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 5 Jun 2020 13:18:17 -0700 Subject: [PATCH 18/22] feat: add detach subscription rpc (#216) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * Add DetachSubscription RPC PiperOrigin-RevId: 313276022 Source-Author: Google APIs Source-Date: Tue May 26 15:11:32 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: f5f268f5293e60143ac742a4eeb7dd6306ebf505 Source-Link: https://github.com/googleapis/googleapis/commit/f5f268f5293e60143ac742a4eeb7dd6306ebf505 --- .../cloud/pubsub/v1/TopicAdminClient.java | 62 +- .../cloud/pubsub/v1/TopicAdminSettings.java | 14 + .../pubsub/v1/stub/GrpcPublisherStub.java | 38 + .../cloud/pubsub/v1/stub/PublisherStub.java | 7 + .../pubsub/v1/stub/PublisherStubSettings.java | 35 +- .../cloud/pubsub/v1/MockPublisherImpl.java | 18 + .../cloud/pubsub/v1/TopicAdminClientTest.java | 44 ++ .../com/google/pubsub/v1/PublisherGrpc.java | 138 +++- .../pubsub/v1/DetachSubscriptionRequest.java | 653 ++++++++++++++++++ .../DetachSubscriptionRequestOrBuilder.java | 56 ++ .../pubsub/v1/DetachSubscriptionResponse.java | 457 ++++++++++++ .../DetachSubscriptionResponseOrBuilder.java | 24 + .../v1/ListTopicSubscriptionsResponse.java | 26 +- ...stTopicSubscriptionsResponseOrBuilder.java | 8 +- .../com/google/pubsub/v1/PubsubProto.java | 499 ++++++------- .../main/proto/google/pubsub/v1/pubsub.proto | 29 +- synth.metadata | 6 +- 17 files changed, 1846 insertions(+), 268 deletions(-) create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java 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 548523021..04c4bc231 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 @@ -37,6 +37,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -724,7 +726,7 @@ public final UnaryCallable listTopicsCall // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

Sample code: * @@ -751,7 +753,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicNam // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

Sample code: * @@ -804,7 +806,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectT // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

Sample code: * @@ -830,7 +832,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

Sample code: * @@ -855,7 +857,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

Sample code: * @@ -1416,6 +1418,56 @@ public final TestIamPermissionsResponse testIamPermissions( return stub.testIamPermissionsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detaches a subscription from this topic. All messages retained in the subscription are dropped. + * Subsequent `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the + * subscription is a push subscription, pushes to the endpoint will stop. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   DetachSubscriptionRequest request = DetachSubscriptionRequest.newBuilder()
+   *     .setSubscription(subscription.toString())
+   *     .build();
+   *   DetachSubscriptionResponse response = topicAdminClient.detachSubscription(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionRequest request) { + return detachSubscriptionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detaches a subscription from this topic. All messages retained in the subscription are dropped. + * Subsequent `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the + * subscription is a push subscription, pushes to the endpoint will stop. + * + *

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   DetachSubscriptionRequest request = DetachSubscriptionRequest.newBuilder()
+   *     .setSubscription(subscription.toString())
+   *     .build();
+   *   ApiFuture<DetachSubscriptionResponse> future = topicAdminClient.detachSubscriptionCallable().futureCall(request);
+   *   // Do something
+   *   DetachSubscriptionResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + detachSubscriptionCallable() { + return stub.detachSubscriptionCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java index 59119e19b..7c79aabc7 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java @@ -39,6 +39,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -150,6 +152,12 @@ public UnaryCallSettings getIamPolicySettings() { return ((PublisherStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** Returns the object with the settings used for calls to detachSubscription. */ + public UnaryCallSettings + detachSubscriptionSettings() { + return ((PublisherStubSettings) getStubSettings()).detachSubscriptionSettings(); + } + public static final TopicAdminSettings create(PublisherStubSettings stub) throws IOException { return new TopicAdminSettings.Builder(stub.toBuilder()).build(); } @@ -310,6 +318,12 @@ public UnaryCallSettings.Builder getIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** Returns the builder for the settings used for calls to detachSubscription. */ + public UnaryCallSettings.Builder + detachSubscriptionSettings() { + return getStubSettingsBuilder().detachSubscriptionSettings(); + } + @Override public TopicAdminSettings build() throws IOException { return new TopicAdminSettings(this); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java index 02baa7378..52cdf25dc 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java @@ -35,6 +35,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -152,6 +154,16 @@ public class GrpcPublisherStub extends PublisherStub { .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + detachSubscriptionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.pubsub.v1.Publisher/DetachSubscription") + .setRequestMarshaller( + ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance())) + .build(); private final BackgroundResource backgroundResources; @@ -174,6 +186,8 @@ public class GrpcPublisherStub extends PublisherStub { private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable + detachSubscriptionCallable; private final GrpcStubCallableFactory callableFactory; @@ -360,6 +374,20 @@ public Map extract(TestIamPermissionsRequest request) { } }) .build(); + GrpcCallSettings + detachSubscriptionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(detachSubscriptionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DetachSubscriptionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("subscription", String.valueOf(request.getSubscription())); + return params.build(); + } + }) + .build(); this.createTopicCallable = callableFactory.createUnaryCallable( @@ -413,6 +441,11 @@ public Map extract(TestIamPermissionsRequest request) { testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.detachSubscriptionCallable = + callableFactory.createUnaryCallable( + detachSubscriptionTransportSettings, + settings.detachSubscriptionSettings(), + clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -478,6 +511,11 @@ public UnaryCallable getIamPolicyCallable() { return testIamPermissionsCallable; } + public UnaryCallable + detachSubscriptionCallable() { + return detachSubscriptionCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java index 6ff2d02f8..93cdf2f03 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java @@ -29,6 +29,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -114,6 +116,11 @@ public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public UnaryCallable + detachSubscriptionCallable() { + throw new UnsupportedOperationException("Not implemented: detachSubscriptionCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index ee84a4ab3..457731c61 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -60,6 +60,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -137,6 +139,8 @@ public class PublisherStubSettings extends StubSettings { private final UnaryCallSettings getIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings + detachSubscriptionSettings; /** Returns the object with the settings used for calls to createTopic. */ public UnaryCallSettings createTopicSettings() { @@ -201,6 +205,12 @@ public UnaryCallSettings getIamPolicySettings() { return testIamPermissionsSettings; } + /** Returns the object with the settings used for calls to detachSubscription. */ + public UnaryCallSettings + detachSubscriptionSettings() { + return detachSubscriptionSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public PublisherStub createStub() throws IOException { if (getTransportChannelProvider() @@ -280,6 +290,7 @@ protected PublisherStubSettings(Builder settingsBuilder) throws IOException { setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + detachSubscriptionSettings = settingsBuilder.detachSubscriptionSettings().build(); } private static final PagedListDescriptor @@ -551,6 +562,8 @@ public static class Builder extends StubSettings.Builder getIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder + detachSubscriptionSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -563,6 +576,8 @@ public static class Builder extends StubSettings.BuildernewArrayList( StatusCode.Code.ABORTED, StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); + definitions.put( + "non_idempotent2", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "non_idempotent", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); @@ -648,6 +663,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + detachSubscriptionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( createTopicSettings, @@ -660,7 +677,8 @@ protected Builder(ClientContext clientContext) { deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + detachSubscriptionSettings); initDefaults(this); } @@ -743,6 +761,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .detachSubscriptionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent2")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + return builder; } @@ -760,6 +783,7 @@ protected Builder(PublisherStubSettings settings) { setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + detachSubscriptionSettings = settings.detachSubscriptionSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -773,7 +797,8 @@ protected Builder(PublisherStubSettings settings) { deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + detachSubscriptionSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -855,6 +880,12 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the builder for the settings used for calls to detachSubscription. */ + public UnaryCallSettings.Builder + detachSubscriptionSettings() { + return detachSubscriptionSettings; + } + @Override public PublisherStubSettings build() throws IOException { return new PublisherStubSettings(this); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java index 0d49c4288..420a757ad 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java @@ -19,6 +19,8 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -185,4 +187,20 @@ public void deleteTopic(DeleteTopicRequest request, StreamObserver respon responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void detachSubscription( + DetachSubscriptionRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DetachSubscriptionResponse) { + requests.add(request); + responseObserver.onNext((DetachSubscriptionResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } 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 43510c154..3bc0c77a3 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 @@ -38,6 +38,8 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -622,4 +624,46 @@ public void testIamPermissionsExceptionTest() throws Exception { // Expected exception } } + + @Test + @SuppressWarnings("all") + public void detachSubscriptionTest() { + DetachSubscriptionResponse expectedResponse = DetachSubscriptionResponse.newBuilder().build(); + mockPublisher.addResponse(expectedResponse); + + TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + DetachSubscriptionRequest request = + DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build(); + + DetachSubscriptionResponse actualResponse = client.detachSubscription(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPublisher.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DetachSubscriptionRequest actualRequest = (DetachSubscriptionRequest) actualRequests.get(0); + + Assert.assertEquals(subscription, TopicName.parse(actualRequest.getSubscription())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void detachSubscriptionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockPublisher.addException(exception); + + try { + TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + DetachSubscriptionRequest request = + DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build(); + + client.detachSubscription(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java index a4df9a4bf..8ddccd07f 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java @@ -369,6 +369,51 @@ private PublisherGrpc() {} return getDeleteTopicMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DetachSubscription", + requestType = com.google.pubsub.v1.DetachSubscriptionRequest.class, + responseType = com.google.pubsub.v1.DetachSubscriptionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod() { + io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod; + if ((getDetachSubscriptionMethod = PublisherGrpc.getDetachSubscriptionMethod) == null) { + synchronized (PublisherGrpc.class) { + if ((getDetachSubscriptionMethod = PublisherGrpc.getDetachSubscriptionMethod) == null) { + PublisherGrpc.getDetachSubscriptionMethod = + getDetachSubscriptionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DetachSubscription")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new PublisherMethodDescriptorSupplier("DetachSubscription")) + .build(); + } + } + } + return getDetachSubscriptionMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static PublisherStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -492,7 +537,7 @@ public void listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions( @@ -538,6 +583,23 @@ public void deleteTopic( asyncUnimplementedUnaryCall(getDeleteTopicMethod(), responseObserver); } + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public void detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getDetachSubscriptionMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -590,6 +652,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.pubsub.v1.DeleteTopicRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_TOPIC))) + .addMethod( + getDetachSubscriptionMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse>( + this, METHODID_DETACH_SUBSCRIPTION))) .build(); } } @@ -694,7 +763,7 @@ public void listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions( @@ -748,6 +817,26 @@ public void deleteTopic( request, responseObserver); } + + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public void detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -835,7 +924,7 @@ public com.google.pubsub.v1.ListTopicsResponse listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions( @@ -876,6 +965,22 @@ public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots( public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request) { return blockingUnaryCall(getChannel(), getDeleteTopicMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request) { + return blockingUnaryCall( + getChannel(), getDetachSubscriptionMethod(), getCallOptions(), request); + } } /** @@ -969,7 +1074,7 @@ public com.google.common.util.concurrent.ListenableFuture - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * */ public com.google.common.util.concurrent.ListenableFuture< @@ -1014,6 +1119,23 @@ public com.google.common.util.concurrent.ListenableFuture + * Detaches a subscription from this topic. All messages retained in the + * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests + * will return FAILED_PRECONDITION. If the subscription is a push + * subscription, pushes to the endpoint will stop. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.pubsub.v1.DetachSubscriptionResponse> + detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request) { + return futureUnaryCall( + getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_TOPIC = 0; @@ -1024,6 +1146,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1085,6 +1208,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.pubsub.v1.DeleteTopicRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DETACH_SUBSCRIPTION: + serviceImpl.detachSubscription( + (com.google.pubsub.v1.DetachSubscriptionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1157,6 +1286,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListTopicSubscriptionsMethod()) .addMethod(getListTopicSnapshotsMethod()) .addMethod(getDeleteTopicMethod()) + .addMethod(getDetachSubscriptionMethod()) .build(); } } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java new file mode 100644 index 000000000..7e069d6cc --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java @@ -0,0 +1,653 @@ +/* + * 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; + +/** + * + * + *
+ * Request for the DetachSubscription method.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} + */ +public final class DetachSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionRequest) + DetachSubscriptionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetachSubscriptionRequest.newBuilder() to construct. + private DetachSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetachSubscriptionRequest() { + subscription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetachSubscriptionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetachSubscriptionRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + subscription_ = s; + 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_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionRequest.class, + com.google.pubsub.v1.DetachSubscriptionRequest.Builder.class); + } + + public static final int SUBSCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object subscription_; + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + 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(); + subscription_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + public com.google.protobuf.ByteString getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getSubscriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSubscriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + } + 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.DetachSubscriptionRequest)) { + return super.equals(obj); + } + com.google.pubsub.v1.DetachSubscriptionRequest other = + (com.google.pubsub.v1.DetachSubscriptionRequest) obj; + + if (!getSubscription().equals(other.getSubscription())) 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(); + hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getSubscription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest 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.DetachSubscriptionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest 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.DetachSubscriptionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest 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.DetachSubscriptionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest 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.DetachSubscriptionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest 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.DetachSubscriptionRequest 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; + } + /** + * + * + *
+   * Request for the DetachSubscription method.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionRequest) + com.google.pubsub.v1.DetachSubscriptionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionRequest.class, + com.google.pubsub.v1.DetachSubscriptionRequest.Builder.class); + } + + // Construct using com.google.pubsub.v1.DetachSubscriptionRequest.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(); + subscription_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest getDefaultInstanceForType() { + return com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest build() { + com.google.pubsub.v1.DetachSubscriptionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest buildPartial() { + com.google.pubsub.v1.DetachSubscriptionRequest result = + new com.google.pubsub.v1.DetachSubscriptionRequest(this); + result.subscription_ = subscription_; + 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.DetachSubscriptionRequest) { + return mergeFrom((com.google.pubsub.v1.DetachSubscriptionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.DetachSubscriptionRequest other) { + if (other == com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance()) return this; + if (!other.getSubscription().isEmpty()) { + subscription_ = other.subscription_; + onChanged(); + } + 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.DetachSubscriptionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.DetachSubscriptionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object subscription_ = ""; + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + public com.google.protobuf.ByteString getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subscription_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSubscription() { + + subscription_ = getDefaultInstance().getSubscription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subscription_ = value; + onChanged(); + return this; + } + + @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.DetachSubscriptionRequest) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.DetachSubscriptionRequest) + private static final com.google.pubsub.v1.DetachSubscriptionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.DetachSubscriptionRequest(); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetachSubscriptionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetachSubscriptionRequest(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.DetachSubscriptionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java new file mode 100644 index 000000000..27cd842bc --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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 DetachSubscriptionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + java.lang.String getSubscription(); + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + com.google.protobuf.ByteString getSubscriptionBytes(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java new file mode 100644 index 000000000..a473832a2 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java @@ -0,0 +1,457 @@ +/* + * 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; + +/** + * + * + *
+ * Response for the DetachSubscription method.
+ * Reserved for future use.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} + */ +public final class DetachSubscriptionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionResponse) + DetachSubscriptionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetachSubscriptionResponse.newBuilder() to construct. + private DetachSubscriptionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetachSubscriptionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetachSubscriptionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetachSubscriptionResponse( + 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; + 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_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionResponse.class, + com.google.pubsub.v1.DetachSubscriptionResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.DetachSubscriptionResponse)) { + return super.equals(obj); + } + com.google.pubsub.v1.DetachSubscriptionResponse other = + (com.google.pubsub.v1.DetachSubscriptionResponse) obj; + + 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(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse 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.DetachSubscriptionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse 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.DetachSubscriptionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse 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.DetachSubscriptionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse 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.DetachSubscriptionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse 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.DetachSubscriptionResponse 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; + } + /** + * + * + *
+   * Response for the DetachSubscription method.
+   * Reserved for future use.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionResponse) + com.google.pubsub.v1.DetachSubscriptionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionResponse.class, + com.google.pubsub.v1.DetachSubscriptionResponse.Builder.class); + } + + // Construct using com.google.pubsub.v1.DetachSubscriptionResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse getDefaultInstanceForType() { + return com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse build() { + com.google.pubsub.v1.DetachSubscriptionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse buildPartial() { + com.google.pubsub.v1.DetachSubscriptionResponse result = + new com.google.pubsub.v1.DetachSubscriptionResponse(this); + 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.DetachSubscriptionResponse) { + return mergeFrom((com.google.pubsub.v1.DetachSubscriptionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.DetachSubscriptionResponse other) { + if (other == com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance()) + return this; + 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.DetachSubscriptionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.DetachSubscriptionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @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.DetachSubscriptionResponse) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.DetachSubscriptionResponse) + private static final com.google.pubsub.v1.DetachSubscriptionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.DetachSubscriptionResponse(); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetachSubscriptionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetachSubscriptionResponse(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.DetachSubscriptionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java new file mode 100644 index 000000000..ce75ecb80 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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 DetachSubscriptionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java index 96601b5fd..fbf2b4f23 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java @@ -133,7 +133,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -147,7 +147,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -161,7 +161,7 @@ public int getSubscriptionsCount() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -176,7 +176,7 @@ public java.lang.String getSubscriptions(int index) { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -606,7 +606,7 @@ private void ensureSubscriptionsIsMutable() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -620,7 +620,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -634,7 +634,7 @@ public int getSubscriptionsCount() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -649,7 +649,7 @@ public java.lang.String getSubscriptions(int index) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -664,7 +664,7 @@ public com.google.protobuf.ByteString getSubscriptionsBytes(int index) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -686,7 +686,7 @@ public Builder setSubscriptions(int index, java.lang.String value) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -707,7 +707,7 @@ public Builder addSubscriptions(java.lang.String value) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -725,7 +725,7 @@ public Builder addAllSubscriptions(java.lang.Iterable values) * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -742,7 +742,7 @@ public Builder clearSubscriptions() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java index 265a9dd3a..dffc961db 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java @@ -27,7 +27,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -39,7 +39,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -51,7 +51,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -64,7 +64,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } 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 419f8a825..3ac4f6571 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 @@ -91,6 +91,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Subscription_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -277,216 +285,223 @@ 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\"\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" - + "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\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" + + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"V" + + "\n\031DetachSubscriptionRequest\0229\n\014subscript" + + "ion\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com" + + "/Topic\"\034\n\032DetachSubscriptionResponse\"\256\005\n" + + "\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005topi" + + "c\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/T" + + "opic\0221\n\013push_config\030\004 \001(\0132\034.google.pubsu" + + "b.v1.PushConfig\022\034\n\024ack_deadline_seconds\030" + + "\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022=\n\032" + + "message_retention_duration\030\010 \001(\0132\031.googl" + + "e.protobuf.Duration\022:\n\006labels\030\t \003(\0132*.go" + + "ogle.pubsub.v1.Subscription.LabelsEntry\022" + + "\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021expi" + + "ration_policy\030\013 \001(\0132\".google.pubsub.v1.E" + + "xpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dead_" + + "letter_policy\030\r \001(\0132\".google.pubsub.v1.D" + + "eadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132\035." + + "google.pubsub.v1.RetryPolicy\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU" + + "\n\"pubsub.googleapis.com/Subscription\022/pr" + + "ojects/{project}/subscriptions/{subscrip" + + "tion}\"u\n\013RetryPolicy\0222\n\017minimum_backoff\030" + + "\001 \001(\0132\031.google.protobuf.Duration\0222\n\017maxi" + + "mum_backoff\030\002 \001(\0132\031.google.protobuf.Dura" + + "tion\"L\n\020DeadLetterPolicy\022\031\n\021dead_letter_" + + "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.go" + + "ogle.protobuf.Duration\"\255\002\n\nPushConfig\022\025\n" + + "\rpush_endpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003(\013" + + "2,.google.pubsub.v1.PushConfig.Attribute" + + "sEntry\022<\n\noidc_token\030\003 \001(\0132&.google.pubs" + + "ub.v1.PushConfig.OidcTokenH\000\032<\n\tOidcToke" + + "n\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010audi" + + "ence\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\025authentication_" + + "method\"m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(" + + "\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1.Pu" + + "bsubMessage\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n" + + "\026GetSubscriptionRequest\022@\n\014subscription\030" + + "\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Sub" + + "scription\"\214\001\n\031UpdateSubscriptionRequest\022" + + "9\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\030Lis" + + "tSubscriptionsRequest\022D\n\007project\030\001 \001(\tB3" + + "\340A\002\372A-\n+cloudresourcemanager.googleapis." + + "com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" + + "oken\030\003 \001(\t\"k\n\031ListSubscriptionsResponse\022" + + "5\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub.v" + + "1.Subscription\022\027\n\017next_page_token\030\002 \001(\t\"" + + "]\n\031DeleteSubscriptionRequest\022@\n\014subscrip" + + "tion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" + + "m/Subscription\"\223\001\n\027ModifyPushConfigReque" + "st\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\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:/" + + ".googleapis.com/Subscription\0226\n\013push_con" + + "fig\030\002 \001(\0132\034.google.pubsub.v1.PushConfigB" + + "\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001 \001" + + "(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscr" + + "iption\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\014PullResp" + + "onse\022<\n\021received_messages\030\001 \003(\0132!.google" + + ".pubsub.v1.ReceivedMessage\"\225\001\n\030ModifyAck" + + "DeadlineRequest\022@\n\014subscription\030\001 \001(\tB*\340" + + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" + + "n\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\022AcknowledgeRequest" + + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" + + "oogleapis.com/Subscription\022\024\n\007ack_ids\030\002 " + + "\003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequest\022@\n\014sub" + + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" + + "is.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027" + + "modify_deadline_seconds\030\003 \003(\005\022\037\n\027modify_" + + "deadline_ack_ids\030\004 \003(\t\022(\n\033stream_ack_dea" + + "dline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 " + + "\001(\t\"U\n\025StreamingPullResponse\022<\n\021received" + + "_messages\030\001 \003(\0132!.google.pubsub.v1.Recei" + + "vedMessage\"\203\002\n\025CreateSnapshotRequest\0224\n\004" + + "name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.co" + + "m/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$" + + "\n\"pubsub.googleapis.com/Subscription\022C\n\006" + + "labels\030\003 \003(\01323.google.pubsub.v1.CreateSn" + + "apshotRequest.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\025Upd" + + "ateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.g" + + "oogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.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.googleapis.com/Topic\022" + + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\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\036pu" + + "bsub.googleapis.com/Snapshot\022\'projects/{" + + "project}/snapshots/{snapshot}\"N\n\022GetSnap" + + "shotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036p" + + "ubsub.googleapis.com/Snapshot\"\203\001\n\024ListSn" + + "apshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n" + + "+cloudresourcemanager.googleapis.com/Pro" + + "ject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapshot" + + "s\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshotRe" + + "quest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub." + + "googleapis.com/Snapshot\"\276\001\n\013SeekRequest\022" + + "@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.go" + + "ogleapis.com/Subscription\022*\n\004time\030\002 \001(\0132" + + "\032.google.protobuf.TimestampH\000\0227\n\010snapsho" + + "t\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Snap" + + "shotH\000B\010\n\006target\"\016\n\014SeekResponse2\243\013\n\tPub" + + "lisher\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\004nam" + + "e\022}\n\013UpdateTopic\022$.google.pubsub.v1.Upda" + + "teTopicRequest\032\027.google.pubsub.v1.Topic\"" + + "/\202\323\344\223\002)2$/v1/{topic.name=projects/*/topi" + + "cs/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v1." + + "PublishRequest\032!.google.pubsub.v1.Publis" + + "hResponse\"C\202\323\344\223\002,\"\'/v1/{topic=projects/*" + + "/topics/*}:publish:\001*\332A\016topic,messages\022w" + + "\n\010GetTopic\022!.google.pubsub.v1.GetTopicRe" + + "quest\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.ListTo" + + "picsRequest\032$.google.pubsub.v1.ListTopic" + + "sResponse\"1\202\323\344\223\002!\022\037/v1/{project=projects" + + "/*}/topics\332A\007project\022\272\001\n\026ListTopicSubscr" + + "iptions\022/.google.pubsub.v1.ListTopicSubs" + + "criptionsRequest\0320.google.pubsub.v1.List" + + "TopicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v1/" + + "{topic=projects/*/topics/*}/subscription" + + "s\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.googl" + + "e.pubsub.v1.ListTopicSnapshotsRequest\032,." + + "google.pubsub.v1.ListTopicSnapshotsRespo" + + "nse\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/topic" + + "s/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022$." + + "google.pubsub.v1.DeleteTopicRequest\032\026.go" + + "ogle.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topic=" + + "projects/*/topics/*}\332A\005topic\022\255\001\n\022DetachS" + + "ubscription\022+.google.pubsub.v1.DetachSub" + + "scriptionRequest\032,.google.pubsub.v1.Deta" + + "chSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/{sub" + + "scription=projects/*/subscriptions/*}:de" + + "tach\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" + + "https://www.googleapis.com/auth/pubsub2\203" + + "\025\n\nSubscriber\022\264\001\n\022CreateSubscription\022\036.g" + + "oogle.pubsub.v1.Subscription\032\036.google.pu" + + "bsub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=" + + "projects/*/subscriptions/*}:\001*\332A+name,to" + + "pic,push_config,ack_deadline_seconds\022\241\001\n" + + "\017GetSubscription\022(.google.pubsub.v1.GetS" + + "ubscriptionRequest\032\036.google.pubsub.v1.Su" + + "bscription\"D\202\323\344\223\002/\022-/v1/{subscription=pr" + + "ojects/*/subscriptions/*}\332A\014subscription" + + "\022\240\001\n\022UpdateSubscription\022+.google.pubsub." + + "v1.UpdateSubscriptionRequest\032\036.google.pu" + + "bsub.v1.Subscription\"=\202\323\344\223\002722/v1/{subsc" + + "ription.name=projects/*/subscriptions/*}" + + ":\001*\022\246\001\n\021ListSubscriptions\022*.google.pubsu" + + "b.v1.ListSubscriptionsRequest\032+.google.p" + + "ubsub.v1.ListSubscriptionsResponse\"8\202\323\344\223" + + "\002(\022&/v1/{project=projects/*}/subscriptio" + + "ns\332A\007project\022\237\001\n\022DeleteSubscription\022+.go" + + "ogle.pubsub.v1.DeleteSubscriptionRequest" + + "\032\026.google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{s" + + "ubscription=projects/*/subscriptions/*}\332" + + "A\014subscription\022\317\001\n\021ModifyAckDeadline\022*.g" + + "oogle.pubsub.v1.ModifyAckDeadlineRequest" + + "\032\026.google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{s" + + "ubscription=projects/*/subscriptions/*}:" + + "modifyAckDeadline:\001*\332A)subscription,ack_" + + "ids,ack_deadline_seconds\022\250\001\n\013Acknowledge" + + "\022$.google.pubsub.v1.AcknowledgeRequest\032\026" + + ".google.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{sub" + + "scription=projects/*/subscriptions/*}:ac" + + "knowledge:\001*\332A\024subscription,ack_ids\022\263\001\n\004" + + "Pull\022\035.google.pubsub.v1.PullRequest\032\036.go" + + "ogle.pubsub.v1.PullResponse\"l\202\323\344\223\0027\"2/v1" + + "/{subscription=projects/*/subscriptions/" + + "*}:pull:\001*\332A,subscription,return_immedia" + + "tely,max_messages\022f\n\rStreamingPull\022&.goo" + + "gle.pubsub.v1.StreamingPullRequest\032\'.goo" + + "gle.pubsub.v1.StreamingPullResponse\"\000(\0010" + + "\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub.v" + + "1.ModifyPushConfigRequest\032\026.google.proto" + + "buf.Empty\"d\202\323\344\223\002C\">/v1/{subscription=pro" + + "jects/*/subscriptions/*}:modifyPushConfi" + + "g:\001*\332A\030subscription,push_config\022\211\001\n\013GetS" + + "napshot\022$.google.pubsub.v1.GetSnapshotRe" + + "quest\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.p" + + "ubsub.v1.ListSnapshotsRequest\032\'.google.p" + + "ubsub.v1.ListSnapshotsResponse\"4\202\323\344\223\002$\022\"" + + "/v1/{project=projects/*}/snapshots\332A\007pro" + + "ject\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.Upd" + + "ateSnapshotRequest\032\032.google.pubsub.v1.Sn" + + "apshot\"5\202\323\344\223\002/2*/v1/{snapshot.name=proje" + + "cts/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapshot" + + "\022\'.google.pubsub.v1.DeleteSnapshotReques" + + "t\032\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%/v1/{" + + "snapshot=projects/*/snapshots/*}\332A\010snaps" + + "hot\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRequ" + + "est\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344" + + "\223\0027\"2/v1/{subscription=projects/*/subscr" + + "iptions/*}:seek:\001*\032p\312A\025pubsub.googleapis" + + ".com\322AUhttps://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/pubsubB\256\001\n\024com.google.pubsub.v1B\013P" + + "ubsubProtoP\001Z6google.golang.org/genproto" + + "/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google" + + ".Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V" + + "1\352\002\031Google::Cloud::PubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -628,8 +643,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Topic", }); - internal_static_google_pubsub_v1_Subscription_descriptor = + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor, + new java.lang.String[] { + "Subscription", + }); + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_pubsub_v1_Subscription_descriptor = + getDescriptor().getMessageTypes().get(16); internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_descriptor, @@ -656,7 +685,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_RetryPolicy_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_RetryPolicy_descriptor, @@ -664,7 +693,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MinimumBackoff", "MaximumBackoff", }); internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor, @@ -672,7 +701,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeadLetterTopic", "MaxDeliveryAttempts", }); internal_static_google_pubsub_v1_ExpirationPolicy_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ExpirationPolicy_descriptor, @@ -680,7 +709,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Ttl", }); internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_descriptor, @@ -704,7 +733,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, @@ -712,7 +741,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AckId", "Message", "DeliveryAttempt", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, @@ -720,7 +749,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, @@ -728,7 +757,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, @@ -736,7 +765,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, @@ -744,7 +773,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, @@ -752,7 +781,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, @@ -760,7 +789,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "PushConfig", }); internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, @@ -768,7 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "ReturnImmediately", "MaxMessages", }); internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, @@ -776,7 +805,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, @@ -784,7 +813,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, @@ -792,7 +821,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(32); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, @@ -805,7 +834,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientId", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(33); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, @@ -813,7 +842,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(34); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, @@ -829,7 +858,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(35); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, @@ -837,7 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", "UpdateMask", }); internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(36); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, @@ -853,7 +882,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(37); internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, @@ -861,7 +890,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(38); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, @@ -869,7 +898,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(39); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, @@ -877,7 +906,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(40); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, @@ -885,7 +914,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(41); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, @@ -893,7 +922,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "Time", "Snapshot", "Target", }); internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(42); 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/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index a42d03220..0311cc5b3 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 @@ -88,7 +88,7 @@ service Publisher { option (google.api.method_signature) = "project"; } - // Lists the names of the subscriptions on this topic. + // Lists the names of the attached subscriptions on this topic. rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { option (google.api.http) = { @@ -122,6 +122,17 @@ service Publisher { }; option (google.api.method_signature) = "topic"; } + + // Detaches a subscription from this topic. All messages retained in the + // subscription are dropped. Subsequent `Pull` and `StreamingPull` requests + // will return FAILED_PRECONDITION. If the subscription is a push + // subscription, pushes to the endpoint will stop. + rpc DetachSubscription(DetachSubscriptionRequest) + returns (DetachSubscriptionResponse) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:detach" + }; + } } message MessageStoragePolicy { @@ -300,7 +311,7 @@ message ListTopicSubscriptionsRequest { // Response for the `ListTopicSubscriptions` method. message ListTopicSubscriptionsResponse { - // The names of the subscriptions that match the request. + // The names of subscriptions attached to the topic specified in the request. repeated string subscriptions = 1 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Subscription" }]; @@ -350,6 +361,20 @@ message DeleteTopicRequest { ]; } +// Request for the DetachSubscription method. +message DetachSubscriptionRequest { + // Required. The subscription to detach. + // Format is `projects/{project}/subscriptions/{subscription}`. + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; +} + +// Response for the DetachSubscription method. +// Reserved for future use. +message DetachSubscriptionResponse {} + // The service that an application uses to manipulate subscriptions and to // consume messages from a subscription via the `Pull` method or by // establishing a bi-directional stream using the `StreamingPull` method. diff --git a/synth.metadata b/synth.metadata index 3707cd7d4..13da91841 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "ed222384f58d1b3b61d9844bfefe55d71961fbc4" + "sha": "63a0e7a423ca0e9de9e446f0686aec6e6368f67c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "edd3b80fb770548d6ad780105f1782de6ff73ea0", - "internalRef": "311053644" + "sha": "f5f268f5293e60143ac742a4eeb7dd6306ebf505", + "internalRef": "313276022" } }, { From 6ca2e1e51d539e68bb7667cb9de445967f4c3a72 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Jun 2020 10:30:08 -0700 Subject: [PATCH 19/22] chore: update common templates (#232) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d76bfbb4-fde1-4909-a913-608cdb170a49/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/987270824bd26f6a8c716d5e2022057b8ae7b26e Source-Link: https://github.com/googleapis/synthtool/commit/cac9eef310652bf138dd76b716e4986e757d62ac --- .kokoro/build.sh | 4 +--- README.md | 5 +++++ renovate.json | 3 ++- synth.metadata | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index bbca9bc9d..2d5347b09 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -51,9 +51,7 @@ test) RETURN_CODE=$? ;; lint) - mvn \ - -Penable-samples \ - com.coveo:fmt-maven-plugin:check + mvn com.coveo:fmt-maven-plugin:check RETURN_CODE=$? ;; javadoc) diff --git a/README.md b/README.md index 53e551aa3..388948793 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,11 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Create Subscription With Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithDeadLetterPolicyExample.java) | +| Publish With Batch Settings Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java) | +| Publish With Concurrency Control Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithConcurrencyControlExample.java) | +| Publish With Custom Attributes Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithCustomAttributesExample.java) | +| Publish With Error Handler Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithErrorHandlerExample.java) | +| Publish With Retry Settings Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithRetrySettingsExample.java) | | Receive Messages With Delivery Attempts Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/ReceiveMessagesWithDeliveryAttemptsExample.java) | | Remove Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java) | | Update Dead Letter Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/UpdateDeadLetterPolicyExample.java) | diff --git a/renovate.json b/renovate.json index 1b54f48af..a6e2d9ca1 100644 --- a/renovate.json +++ b/renovate.json @@ -76,5 +76,6 @@ "groupName": "jackson dependencies" } ], - "semanticCommits": true + "semanticCommits": true, + "masterIssue": true } \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 13da91841..887afc20e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "63a0e7a423ca0e9de9e446f0686aec6e6368f67c" + "sha": "09866b0d36e2dd1c994b4c91807d71552b65c8e1" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8b65daa222d193b689279162781baf0aa1f0ffd2" + "sha": "987270824bd26f6a8c716d5e2022057b8ae7b26e" } } ], From 97c08246e00f20314b2d2e3dc4542007edecefa3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Jun 2020 11:06:18 -0700 Subject: [PATCH 20/22] chore: Re-generated to pick up changes from googleapis (#231) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * bazel: update protobuf, rules_go, gazelle, and gapic-generator-go versions - protobuf v3.12.1 - rules_go v0.23.0 - gazelle v0.21.0 - gapic-generator-go v0.14.1 PiperOrigin-RevId: 313460921 Source-Author: Google APIs Source-Date: Wed May 27 14:10:16 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c4e37010d74071851ff24121f522e802231ac86e Source-Link: https://github.com/googleapis/googleapis/commit/c4e37010d74071851ff24121f522e802231ac86e * Use correct resource type for DetachSubscriptionRequest PiperOrigin-RevId: 313488995 Source-Author: Google APIs Source-Date: Wed May 27 16:45:32 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: eafa840ceec23b44a5c21670288107c661252711 Source-Link: https://github.com/googleapis/googleapis/commit/eafa840ceec23b44a5c21670288107c661252711 * docs: Add comment for MessageStoragePolicy message PiperOrigin-RevId: 313795529 Source-Author: Google APIs Source-Date: Fri May 29 09:33:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: f4bd71cc173d848ec24d28eede271cca9abc411f Source-Link: https://github.com/googleapis/googleapis/commit/f4bd71cc173d848ec24d28eede271cca9abc411f * Drop the experimental tag on the Subscription filter and retry policy fields Clarify some retry policy comments PiperOrigin-RevId: 313812131 Source-Author: Google APIs Source-Date: Fri May 29 10:59:34 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: fb21971becb6c0441efc855dabc371825732872c Source-Link: https://github.com/googleapis/googleapis/commit/fb21971becb6c0441efc855dabc371825732872c * Add "detached" bool to Subscription PiperOrigin-RevId: 314795690 Source-Author: Google APIs Source-Date: Thu Jun 4 13:43:59 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 86285bbd54fbf9708838219e3422aa47fb8fc0b0 Source-Link: https://github.com/googleapis/googleapis/commit/86285bbd54fbf9708838219e3422aa47fb8fc0b0 --- .../cloud/pubsub/v1/TopicAdminClient.java | 4 +- .../v1/SubscriptionAdminClientTest.java | 6 + .../cloud/pubsub/v1/TopicAdminClientTest.java | 9 +- .../google/pubsub/v1/AcknowledgeRequest.java | 2 + .../pubsub/v1/CreateSnapshotRequest.java | 14 + .../google/pubsub/v1/DeadLetterPolicy.java | 4 + .../pubsub/v1/DeleteSnapshotRequest.java | 2 + .../pubsub/v1/DeleteSubscriptionRequest.java | 2 + .../google/pubsub/v1/DeleteTopicRequest.java | 2 + .../pubsub/v1/DetachSubscriptionRequest.java | 2 + .../google/pubsub/v1/ExpirationPolicy.java | 3 + .../google/pubsub/v1/GetSnapshotRequest.java | 2 + .../pubsub/v1/GetSubscriptionRequest.java | 2 + .../com/google/pubsub/v1/GetTopicRequest.java | 2 + .../pubsub/v1/ListSnapshotsRequest.java | 6 + .../pubsub/v1/ListSnapshotsResponse.java | 7 + .../pubsub/v1/ListSubscriptionsRequest.java | 6 + .../pubsub/v1/ListSubscriptionsResponse.java | 7 + .../pubsub/v1/ListTopicSnapshotsRequest.java | 6 + .../pubsub/v1/ListTopicSnapshotsResponse.java | 2 + .../v1/ListTopicSubscriptionsRequest.java | 6 + .../v1/ListTopicSubscriptionsResponse.java | 2 + .../google/pubsub/v1/ListTopicsRequest.java | 6 + .../google/pubsub/v1/ListTopicsResponse.java | 7 + .../pubsub/v1/MessageStoragePolicy.java | 20 +- .../pubsub/v1/ModifyAckDeadlineRequest.java | 4 + .../pubsub/v1/ModifyPushConfigRequest.java | 5 + .../com/google/pubsub/v1/PublishRequest.java | 7 + .../com/google/pubsub/v1/PubsubMessage.java | 19 + .../com/google/pubsub/v1/PubsubProto.java | 434 +++++++++--------- .../com/google/pubsub/v1/PullRequest.java | 6 + .../com/google/pubsub/v1/PullResponse.java | 5 + .../java/com/google/pubsub/v1/PushConfig.java | 22 + .../com/google/pubsub/v1/ReceivedMessage.java | 7 + .../com/google/pubsub/v1/RetryPolicy.java | 6 + .../com/google/pubsub/v1/SeekRequest.java | 10 + .../java/com/google/pubsub/v1/Snapshot.java | 17 + .../pubsub/v1/StreamingPullRequest.java | 7 + .../pubsub/v1/StreamingPullResponse.java | 5 + .../com/google/pubsub/v1/Subscription.java | 224 ++++++--- .../pubsub/v1/SubscriptionOrBuilder.java | 38 +- .../main/java/com/google/pubsub/v1/Topic.java | 17 + .../pubsub/v1/UpdateSnapshotRequest.java | 6 + .../pubsub/v1/UpdateSubscriptionRequest.java | 6 + .../google/pubsub/v1/UpdateTopicRequest.java | 6 + .../main/proto/google/pubsub/v1/pubsub.proto | 20 +- synth.metadata | 4 +- 47 files changed, 686 insertions(+), 320 deletions(-) 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 04c4bc231..1d1096550 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 @@ -1428,7 +1428,7 @@ public final TestIamPermissionsResponse testIamPermissions( * *

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   DetachSubscriptionRequest request = DetachSubscriptionRequest.newBuilder()
    *     .setSubscription(subscription.toString())
    *     .build();
@@ -1453,7 +1453,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq
    *
    * 

    * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
-   *   TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   DetachSubscriptionRequest request = DetachSubscriptionRequest.newBuilder()
    *     .setSubscription(subscription.toString())
    *     .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 2d40f14bf..ac0be311c 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
@@ -136,6 +136,7 @@ public void createSubscriptionTest() {
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
     String filter = "filter-1274492040";
+    boolean detached = true;
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name2.toString())
@@ -144,6 +145,7 @@ public void createSubscriptionTest() {
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
             .setFilter(filter)
+            .setDetached(detached)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
@@ -198,6 +200,7 @@ public void getSubscriptionTest() {
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
     String filter = "filter-1274492040";
+    boolean detached = true;
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name.toString())
@@ -206,6 +209,7 @@ public void getSubscriptionTest() {
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
             .setFilter(filter)
+            .setDetached(detached)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
@@ -253,6 +257,7 @@ public void updateSubscriptionTest() {
     boolean retainAckedMessages = false;
     boolean enableMessageOrdering = true;
     String filter = "filter-1274492040";
+    boolean detached = true;
     Subscription expectedResponse =
         Subscription.newBuilder()
             .setName(name.toString())
@@ -261,6 +266,7 @@ public void updateSubscriptionTest() {
             .setRetainAckedMessages(retainAckedMessages)
             .setEnableMessageOrdering(enableMessageOrdering)
             .setFilter(filter)
+            .setDetached(detached)
             .build();
     mockSubscriber.addResponse(expectedResponse);
 
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 3bc0c77a3..1f8e26ac8 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
@@ -631,7 +631,8 @@ public void detachSubscriptionTest() {
     DetachSubscriptionResponse expectedResponse = DetachSubscriptionResponse.newBuilder().build();
     mockPublisher.addResponse(expectedResponse);
 
-    TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+    ProjectSubscriptionName subscription =
+        ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
     DetachSubscriptionRequest request =
         DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build();
 
@@ -642,7 +643,8 @@ public void detachSubscriptionTest() {
     Assert.assertEquals(1, actualRequests.size());
     DetachSubscriptionRequest actualRequest = (DetachSubscriptionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(subscription, TopicName.parse(actualRequest.getSubscription()));
+    Assert.assertEquals(
+        subscription, ProjectSubscriptionName.parse(actualRequest.getSubscription()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -656,7 +658,8 @@ public void detachSubscriptionExceptionTest() throws Exception {
     mockPublisher.addException(exception);
 
     try {
-      TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+      ProjectSubscriptionName subscription =
+          ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
       DetachSubscriptionRequest request =
           DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build();
 
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 e29a1fcca..009081161 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
@@ -142,6 +142,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The subscription.
    */
+  @java.lang.Override
   public java.lang.String getSubscription() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -167,6 +168,7 @@ public java.lang.String getSubscription() {
    *
    * @return The bytes for subscription.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSubscriptionBytes() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
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 9c6e4bd87..00ea43fcd 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
@@ -164,6 +164,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) {
    *
    * @return The name.
    */
+  @java.lang.Override
   public java.lang.String getName() {
     java.lang.Object ref = name_;
     if (ref instanceof java.lang.String) {
@@ -193,6 +194,7 @@ public java.lang.String getName() {
    *
    * @return The bytes for name.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNameBytes() {
     java.lang.Object ref = name_;
     if (ref instanceof java.lang.String) {
@@ -228,6 +230,7 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    * @return The subscription.
    */
+  @java.lang.Override
   public java.lang.String getSubscription() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -260,6 +263,7 @@ public java.lang.String getSubscription() {
    *
    * @return The bytes for subscription.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSubscriptionBytes() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -307,6 +311,7 @@ public int getLabelsCount() {
    *
    * map<string, string> labels = 3;
    */
+  @java.lang.Override
   public boolean containsLabels(java.lang.String key) {
     if (key == null) {
       throw new java.lang.NullPointerException();
@@ -314,6 +319,7 @@ public boolean containsLabels(java.lang.String key) {
     return internalGetLabels().getMap().containsKey(key);
   }
   /** Use {@link #getLabelsMap()} instead. */
+  @java.lang.Override
   @java.lang.Deprecated
   public java.util.Map getLabels() {
     return getLabelsMap();
@@ -328,6 +334,7 @@ public java.util.Map getLabels() {
    *
    * map<string, string> labels = 3;
    */
+  @java.lang.Override
   public java.util.Map getLabelsMap() {
     return internalGetLabels().getMap();
   }
@@ -341,6 +348,7 @@ public java.util.Map getLabelsMap() {
    *
    * map<string, string> labels = 3;
    */
+  @java.lang.Override
   public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
     if (key == null) {
       throw new java.lang.NullPointerException();
@@ -358,6 +366,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin
    *
    * map<string, string> labels = 3;
    */
+  @java.lang.Override
   public java.lang.String getLabelsOrThrow(java.lang.String key) {
     if (key == null) {
       throw new java.lang.NullPointerException();
@@ -1077,6 +1086,7 @@ public int getLabelsCount() {
      *
      * map<string, string> labels = 3;
      */
+    @java.lang.Override
     public boolean containsLabels(java.lang.String key) {
       if (key == null) {
         throw new java.lang.NullPointerException();
@@ -1084,6 +1094,7 @@ public boolean containsLabels(java.lang.String key) {
       return internalGetLabels().getMap().containsKey(key);
     }
     /** Use {@link #getLabelsMap()} instead. */
+    @java.lang.Override
     @java.lang.Deprecated
     public java.util.Map getLabels() {
       return getLabelsMap();
@@ -1098,6 +1109,7 @@ public java.util.Map getLabels() {
      *
      * map<string, string> labels = 3;
      */
+    @java.lang.Override
     public java.util.Map getLabelsMap() {
       return internalGetLabels().getMap();
     }
@@ -1111,6 +1123,7 @@ public java.util.Map getLabelsMap() {
      *
      * map<string, string> labels = 3;
      */
+    @java.lang.Override
     public java.lang.String getLabelsOrDefault(
         java.lang.String key, java.lang.String defaultValue) {
       if (key == null) {
@@ -1129,6 +1142,7 @@ public java.lang.String getLabelsOrDefault(
      *
      * map<string, string> labels = 3;
      */
+    @java.lang.Override
     public java.lang.String getLabelsOrThrow(java.lang.String key) {
       if (key == null) {
         throw new java.lang.NullPointerException();
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
index bb6cec0b3..773359cfa 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java
@@ -139,6 +139,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The deadLetterTopic.
    */
+  @java.lang.Override
   public java.lang.String getDeadLetterTopic() {
     java.lang.Object ref = deadLetterTopic_;
     if (ref instanceof java.lang.String) {
@@ -168,6 +169,7 @@ public java.lang.String getDeadLetterTopic() {
    *
    * @return The bytes for deadLetterTopic.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getDeadLetterTopicBytes() {
     java.lang.Object ref = deadLetterTopic_;
     if (ref instanceof java.lang.String) {
@@ -201,6 +203,7 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() {
    *
    * @return The maxDeliveryAttempts.
    */
+  @java.lang.Override
   public int getMaxDeliveryAttempts() {
     return maxDeliveryAttempts_;
   }
@@ -698,6 +701,7 @@ public Builder setDeadLetterTopicBytes(com.google.protobuf.ByteString value) {
      *
      * @return The maxDeliveryAttempts.
      */
+    @java.lang.Override
     public int getMaxDeliveryAttempts() {
       return maxDeliveryAttempts_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
index 185507b53..d43936019 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The snapshot.
    */
+  @java.lang.Override
   public java.lang.String getSnapshot() {
     java.lang.Object ref = snapshot_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getSnapshot() {
    *
    * @return The bytes for snapshot.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSnapshotBytes() {
     java.lang.Object ref = snapshot_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
index b488aca0a..82bd05b37 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The subscription.
    */
+  @java.lang.Override
   public java.lang.String getSubscription() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getSubscription() {
    *
    * @return The bytes for subscription.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSubscriptionBytes() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
index 36056653a..68db7a957 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The topic.
    */
+  @java.lang.Override
   public java.lang.String getTopic() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getTopic() {
    *
    * @return The bytes for topic.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getTopicBytes() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
index 7e069d6cc..6b738acfa 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The subscription.
    */
+  @java.lang.Override
   public java.lang.String getSubscription() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getSubscription() {
    *
    * @return The bytes for subscription.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSubscriptionBytes() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java
index b77609e2e..5c88243ee 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java
@@ -135,6 +135,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return Whether the ttl field is set.
    */
+  @java.lang.Override
   public boolean hasTtl() {
     return ttl_ != null;
   }
@@ -154,6 +155,7 @@ public boolean hasTtl() {
    *
    * @return The ttl.
    */
+  @java.lang.Override
   public com.google.protobuf.Duration getTtl() {
     return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
   }
@@ -171,6 +173,7 @@ public com.google.protobuf.Duration getTtl() {
    *
    * .google.protobuf.Duration ttl = 1;
    */
+  @java.lang.Override
   public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
     return getTtl();
   }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
index 55295c195..ee75fc7d3 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The snapshot.
    */
+  @java.lang.Override
   public java.lang.String getSnapshot() {
     java.lang.Object ref = snapshot_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getSnapshot() {
    *
    * @return The bytes for snapshot.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSnapshotBytes() {
     java.lang.Object ref = snapshot_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
index abca9f36e..7aed4b01a 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The subscription.
    */
+  @java.lang.Override
   public java.lang.String getSubscription() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getSubscription() {
    *
    * @return The bytes for subscription.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getSubscriptionBytes() {
     java.lang.Object ref = subscription_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
index 8e0f4174d..acf62a7f7 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java
@@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The topic.
    */
+  @java.lang.Override
   public java.lang.String getTopic() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -152,6 +153,7 @@ public java.lang.String getTopic() {
    *
    * @return The bytes for topic.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getTopicBytes() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
index f3eca13fd..72ce020e1 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java
@@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The project.
    */
+  @java.lang.Override
   public java.lang.String getProject() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -165,6 +166,7 @@ public java.lang.String getProject() {
    *
    * @return The bytes for project.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getProjectBytes() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getProjectBytes() {
    *
    * @return The pageSize.
    */
+  @java.lang.Override
   public int getPageSize() {
     return pageSize_;
   }
@@ -209,6 +212,7 @@ public int getPageSize() {
    *
    * @return The pageToken.
    */
+  @java.lang.Override
   public java.lang.String getPageToken() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -233,6 +237,7 @@ public java.lang.String getPageToken() {
    *
    * @return The bytes for pageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getPageTokenBytes() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -725,6 +730,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) {
      *
      * @return The pageSize.
      */
+    @java.lang.Override
     public int getPageSize() {
       return pageSize_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
index 9a7fd3cff..e355e42f6 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java
@@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * repeated .google.pubsub.v1.Snapshot snapshots = 1;
    */
+  @java.lang.Override
   public java.util.List getSnapshotsList() {
     return snapshots_;
   }
@@ -149,6 +150,7 @@ public java.util.List getSnapshotsList() {
    *
    * repeated .google.pubsub.v1.Snapshot snapshots = 1;
    */
+  @java.lang.Override
   public java.util.List
       getSnapshotsOrBuilderList() {
     return snapshots_;
@@ -162,6 +164,7 @@ public java.util.List getSnapshotsList() {
    *
    * repeated .google.pubsub.v1.Snapshot snapshots = 1;
    */
+  @java.lang.Override
   public int getSnapshotsCount() {
     return snapshots_.size();
   }
@@ -174,6 +177,7 @@ public int getSnapshotsCount() {
    *
    * repeated .google.pubsub.v1.Snapshot snapshots = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.Snapshot getSnapshots(int index) {
     return snapshots_.get(index);
   }
@@ -186,6 +190,7 @@ public com.google.pubsub.v1.Snapshot getSnapshots(int index) {
    *
    * repeated .google.pubsub.v1.Snapshot snapshots = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) {
     return snapshots_.get(index);
   }
@@ -204,6 +209,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) {
    *
    * @return The nextPageToken.
    */
+  @java.lang.Override
   public java.lang.String getNextPageToken() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
@@ -227,6 +233,7 @@ public java.lang.String getNextPageToken() {
    *
    * @return The bytes for nextPageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNextPageTokenBytes() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
index f1f4b9536..a1484c696 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java
@@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The project.
    */
+  @java.lang.Override
   public java.lang.String getProject() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -165,6 +166,7 @@ public java.lang.String getProject() {
    *
    * @return The bytes for project.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getProjectBytes() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getProjectBytes() {
    *
    * @return The pageSize.
    */
+  @java.lang.Override
   public int getPageSize() {
     return pageSize_;
   }
@@ -209,6 +212,7 @@ public int getPageSize() {
    *
    * @return The pageToken.
    */
+  @java.lang.Override
   public java.lang.String getPageToken() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -233,6 +237,7 @@ public java.lang.String getPageToken() {
    *
    * @return The bytes for pageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getPageTokenBytes() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -725,6 +730,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) {
      *
      * @return The pageSize.
      */
+    @java.lang.Override
     public int getPageSize() {
       return pageSize_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
index b9c4f2451..03b7ba951 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java
@@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * repeated .google.pubsub.v1.Subscription subscriptions = 1;
    */
+  @java.lang.Override
   public java.util.List getSubscriptionsList() {
     return subscriptions_;
   }
@@ -149,6 +150,7 @@ public java.util.List getSubscriptionsList()
    *
    * repeated .google.pubsub.v1.Subscription subscriptions = 1;
    */
+  @java.lang.Override
   public java.util.List
       getSubscriptionsOrBuilderList() {
     return subscriptions_;
@@ -162,6 +164,7 @@ public java.util.List getSubscriptionsList()
    *
    * repeated .google.pubsub.v1.Subscription subscriptions = 1;
    */
+  @java.lang.Override
   public int getSubscriptionsCount() {
     return subscriptions_.size();
   }
@@ -174,6 +177,7 @@ public int getSubscriptionsCount() {
    *
    * repeated .google.pubsub.v1.Subscription subscriptions = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.Subscription getSubscriptions(int index) {
     return subscriptions_.get(index);
   }
@@ -186,6 +190,7 @@ public com.google.pubsub.v1.Subscription getSubscriptions(int index) {
    *
    * repeated .google.pubsub.v1.Subscription subscriptions = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int index) {
     return subscriptions_.get(index);
   }
@@ -205,6 +210,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int
    *
    * @return The nextPageToken.
    */
+  @java.lang.Override
   public java.lang.String getNextPageToken() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
@@ -229,6 +235,7 @@ public java.lang.String getNextPageToken() {
    *
    * @return The bytes for nextPageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNextPageTokenBytes() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
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 5e59b993c..2edd5bdc8 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
@@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The topic.
    */
+  @java.lang.Override
   public java.lang.String getTopic() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -165,6 +166,7 @@ public java.lang.String getTopic() {
    *
    * @return The bytes for topic.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getTopicBytes() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getTopicBytes() {
    *
    * @return The pageSize.
    */
+  @java.lang.Override
   public int getPageSize() {
     return pageSize_;
   }
@@ -209,6 +212,7 @@ public int getPageSize() {
    *
    * @return The pageToken.
    */
+  @java.lang.Override
   public java.lang.String getPageToken() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -233,6 +237,7 @@ public java.lang.String getPageToken() {
    *
    * @return The bytes for pageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getPageTokenBytes() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -725,6 +730,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) {
      *
      * @return The pageSize.
      */
+    @java.lang.Override
     public int getPageSize() {
       return pageSize_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
index 86521700f..a19c8778d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java
@@ -202,6 +202,7 @@ public com.google.protobuf.ByteString getSnapshotsBytes(int index) {
    *
    * @return The nextPageToken.
    */
+  @java.lang.Override
   public java.lang.String getNextPageToken() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
@@ -226,6 +227,7 @@ public java.lang.String getNextPageToken() {
    *
    * @return The bytes for nextPageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNextPageTokenBytes() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
index 80a44a393..2bd00bee6 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java
@@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The topic.
    */
+  @java.lang.Override
   public java.lang.String getTopic() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -165,6 +166,7 @@ public java.lang.String getTopic() {
    *
    * @return The bytes for topic.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getTopicBytes() {
     java.lang.Object ref = topic_;
     if (ref instanceof java.lang.String) {
@@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getTopicBytes() {
    *
    * @return The pageSize.
    */
+  @java.lang.Override
   public int getPageSize() {
     return pageSize_;
   }
@@ -209,6 +212,7 @@ public int getPageSize() {
    *
    * @return The pageToken.
    */
+  @java.lang.Override
   public java.lang.String getPageToken() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -233,6 +237,7 @@ public java.lang.String getPageToken() {
    *
    * @return The bytes for pageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getPageTokenBytes() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -727,6 +732,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) {
      *
      * @return The pageSize.
      */
+    @java.lang.Override
     public int getPageSize() {
       return pageSize_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
index fbf2b4f23..303bd86a4 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java
@@ -203,6 +203,7 @@ public com.google.protobuf.ByteString getSubscriptionsBytes(int index) {
    *
    * @return The nextPageToken.
    */
+  @java.lang.Override
   public java.lang.String getNextPageToken() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
@@ -227,6 +228,7 @@ public java.lang.String getNextPageToken() {
    *
    * @return The bytes for nextPageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNextPageTokenBytes() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
index b048fd3de..b6660177d 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java
@@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * @return The project.
    */
+  @java.lang.Override
   public java.lang.String getProject() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -165,6 +166,7 @@ public java.lang.String getProject() {
    *
    * @return The bytes for project.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getProjectBytes() {
     java.lang.Object ref = project_;
     if (ref instanceof java.lang.String) {
@@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getProjectBytes() {
    *
    * @return The pageSize.
    */
+  @java.lang.Override
   public int getPageSize() {
     return pageSize_;
   }
@@ -209,6 +212,7 @@ public int getPageSize() {
    *
    * @return The pageToken.
    */
+  @java.lang.Override
   public java.lang.String getPageToken() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -233,6 +237,7 @@ public java.lang.String getPageToken() {
    *
    * @return The bytes for pageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getPageTokenBytes() {
     java.lang.Object ref = pageToken_;
     if (ref instanceof java.lang.String) {
@@ -724,6 +729,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) {
      *
      * @return The pageSize.
      */
+    @java.lang.Override
     public int getPageSize() {
       return pageSize_;
     }
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
index d9b660532..6e42dbb0e 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java
@@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * repeated .google.pubsub.v1.Topic topics = 1;
    */
+  @java.lang.Override
   public java.util.List getTopicsList() {
     return topics_;
   }
@@ -149,6 +150,7 @@ public java.util.List getTopicsList() {
    *
    * repeated .google.pubsub.v1.Topic topics = 1;
    */
+  @java.lang.Override
   public java.util.List getTopicsOrBuilderList() {
     return topics_;
   }
@@ -161,6 +163,7 @@ public java.util.List getTopicsOr
    *
    * repeated .google.pubsub.v1.Topic topics = 1;
    */
+  @java.lang.Override
   public int getTopicsCount() {
     return topics_.size();
   }
@@ -173,6 +176,7 @@ public int getTopicsCount() {
    *
    * repeated .google.pubsub.v1.Topic topics = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.Topic getTopics(int index) {
     return topics_.get(index);
   }
@@ -185,6 +189,7 @@ public com.google.pubsub.v1.Topic getTopics(int index) {
    *
    * repeated .google.pubsub.v1.Topic topics = 1;
    */
+  @java.lang.Override
   public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder(int index) {
     return topics_.get(index);
   }
@@ -203,6 +208,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder(int index) {
    *
    * @return The nextPageToken.
    */
+  @java.lang.Override
   public java.lang.String getNextPageToken() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
@@ -226,6 +232,7 @@ public java.lang.String getNextPageToken() {
    *
    * @return The bytes for nextPageToken.
    */
+  @java.lang.Override
   public com.google.protobuf.ByteString getNextPageTokenBytes() {
     java.lang.Object ref = nextPageToken_;
     if (ref instanceof java.lang.String) {
diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java
index 64ae300e9..b03bda501 100644
--- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java
+++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java
@@ -18,7 +18,15 @@
 
 package com.google.pubsub.v1;
 
-/** Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} */
+/**
+ *
+ *
+ * 
+ * A policy constraining the storage of messages published to the topic.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} + */ public final class MessageStoragePolicy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.MessageStoragePolicy) @@ -355,7 +363,15 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} */ + /** + * + * + *
+   * A policy constraining the storage of messages published to the topic.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} + */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.MessageStoragePolicy) 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 76bbfe4b6..a3e24dce8 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 @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The subscription. */ + @java.lang.Override public java.lang.String getSubscription() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -172,6 +173,7 @@ public java.lang.String getSubscription() { * * @return The bytes for subscription. */ + @java.lang.Override public com.google.protobuf.ByteString getSubscriptionBytes() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -265,6 +267,7 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { * * @return The ackDeadlineSeconds. */ + @java.lang.Override public int getAckDeadlineSeconds() { return ackDeadlineSeconds_; } @@ -944,6 +947,7 @@ public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { * * @return The ackDeadlineSeconds. */ + @java.lang.Override public int getAckDeadlineSeconds() { return ackDeadlineSeconds_; } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java index 6b50cb7b9..0ee605fad 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java @@ -142,6 +142,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The subscription. */ + @java.lang.Override public java.lang.String getSubscription() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -167,6 +168,7 @@ public java.lang.String getSubscription() { * * @return The bytes for subscription. */ + @java.lang.Override public com.google.protobuf.ByteString getSubscriptionBytes() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -197,6 +199,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * @return Whether the pushConfig field is set. */ + @java.lang.Override public boolean hasPushConfig() { return pushConfig_ != null; } @@ -216,6 +219,7 @@ public boolean hasPushConfig() { * * @return The pushConfig. */ + @java.lang.Override public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; } @@ -233,6 +237,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * .google.pubsub.v1.PushConfig push_config = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { return getPushConfig(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java index 402948c49..f255ee55b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The topic. */ + @java.lang.Override public java.lang.String getTopic() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -168,6 +169,7 @@ public java.lang.String getTopic() { * * @return The bytes for topic. */ + @java.lang.Override public com.google.protobuf.ByteString getTopicBytes() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -193,6 +195,7 @@ public com.google.protobuf.ByteString getTopicBytes() { * repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED]; *
*/ + @java.lang.Override public java.util.List getMessagesList() { return messages_; } @@ -207,6 +210,7 @@ public java.util.List getMessagesList() { * repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED]; *
*/ + @java.lang.Override public java.util.List getMessagesOrBuilderList() { return messages_; @@ -222,6 +226,7 @@ public java.util.List getMessagesList() { * repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public int getMessagesCount() { return messages_.size(); } @@ -236,6 +241,7 @@ public int getMessagesCount() { * repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.pubsub.v1.PubsubMessage getMessages(int index) { return messages_.get(index); } @@ -250,6 +256,7 @@ public com.google.pubsub.v1.PubsubMessage getMessages(int index) { * repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder(int index) { return messages_.get(index); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java index e2240639f..b801122a0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java @@ -188,6 +188,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The data. */ + @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } @@ -227,6 +228,7 @@ public int getAttributesCount() { * * map<string, string> attributes = 2; */ + @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -234,6 +236,7 @@ public boolean containsAttributes(java.lang.String key) { return internalGetAttributes().getMap().containsKey(key); } /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); @@ -248,6 +251,7 @@ public java.util.Map getAttributes() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } @@ -261,6 +265,7 @@ public java.util.Map getAttributesMap() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -279,6 +284,7 @@ public java.lang.String getAttributesOrDefault( * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -306,6 +312,7 @@ public java.lang.String getAttributesOrThrow(java.lang.String key) { * * @return The messageId. */ + @java.lang.Override public java.lang.String getMessageId() { java.lang.Object ref = messageId_; if (ref instanceof java.lang.String) { @@ -331,6 +338,7 @@ public java.lang.String getMessageId() { * * @return The bytes for messageId. */ + @java.lang.Override public com.google.protobuf.ByteString getMessageIdBytes() { java.lang.Object ref = messageId_; if (ref instanceof java.lang.String) { @@ -358,6 +366,7 @@ public com.google.protobuf.ByteString getMessageIdBytes() { * * @return Whether the publishTime field is set. */ + @java.lang.Override public boolean hasPublishTime() { return publishTime_ != null; } @@ -374,6 +383,7 @@ public boolean hasPublishTime() { * * @return The publishTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getPublishTime() { return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_; } @@ -388,6 +398,7 @@ public com.google.protobuf.Timestamp getPublishTime() { * * .google.protobuf.Timestamp publish_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { return getPublishTime(); } @@ -413,6 +424,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * * @return The orderingKey. */ + @java.lang.Override public java.lang.String getOrderingKey() { java.lang.Object ref = orderingKey_; if (ref instanceof java.lang.String) { @@ -443,6 +455,7 @@ public java.lang.String getOrderingKey() { * * @return The bytes for orderingKey. */ + @java.lang.Override public com.google.protobuf.ByteString getOrderingKeyBytes() { java.lang.Object ref = orderingKey_; if (ref instanceof java.lang.String) { @@ -891,6 +904,7 @@ public Builder mergeFrom( * * @return The data. */ + @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } @@ -973,6 +987,7 @@ public int getAttributesCount() { * * map<string, string> attributes = 2; */ + @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -980,6 +995,7 @@ public boolean containsAttributes(java.lang.String key) { return internalGetAttributes().getMap().containsKey(key); } /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); @@ -994,6 +1010,7 @@ public java.util.Map getAttributes() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } @@ -1007,6 +1024,7 @@ public java.util.Map getAttributesMap() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1025,6 +1043,7 @@ public java.lang.String getAttributesOrDefault( * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); 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 3ac4f6571..818591419 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 @@ -285,223 +285,224 @@ 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\"V" - + "\n\031DetachSubscriptionRequest\0229\n\014subscript" - + "ion\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com" - + "/Topic\"\034\n\032DetachSubscriptionResponse\"\256\005\n" - + "\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005topi" - + "c\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/T" - + "opic\0221\n\013push_config\030\004 \001(\0132\034.google.pubsu" - + "b.v1.PushConfig\022\034\n\024ack_deadline_seconds\030" - + "\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022=\n\032" - + "message_retention_duration\030\010 \001(\0132\031.googl" - + "e.protobuf.Duration\022:\n\006labels\030\t \003(\0132*.go" - + "ogle.pubsub.v1.Subscription.LabelsEntry\022" - + "\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021expi" - + "ration_policy\030\013 \001(\0132\".google.pubsub.v1.E" - + "xpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dead_" - + "letter_policy\030\r \001(\0132\".google.pubsub.v1.D" - + "eadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132\035." - + "google.pubsub.v1.RetryPolicy\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU" - + "\n\"pubsub.googleapis.com/Subscription\022/pr" - + "ojects/{project}/subscriptions/{subscrip" - + "tion}\"u\n\013RetryPolicy\0222\n\017minimum_backoff\030" - + "\001 \001(\0132\031.google.protobuf.Duration\0222\n\017maxi" - + "mum_backoff\030\002 \001(\0132\031.google.protobuf.Dura" - + "tion\"L\n\020DeadLetterPolicy\022\031\n\021dead_letter_" - + "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.go" - + "ogle.protobuf.Duration\"\255\002\n\nPushConfig\022\025\n" - + "\rpush_endpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003(\013" - + "2,.google.pubsub.v1.PushConfig.Attribute" - + "sEntry\022<\n\noidc_token\030\003 \001(\0132&.google.pubs" - + "ub.v1.PushConfig.OidcTokenH\000\032<\n\tOidcToke" - + "n\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010audi" - + "ence\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\025authentication_" - + "method\"m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(" - + "\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1.Pu" - + "bsubMessage\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n" - + "\026GetSubscriptionRequest\022@\n\014subscription\030" - + "\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Sub" - + "scription\"\214\001\n\031UpdateSubscriptionRequest\022" - + "9\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\030Lis" - + "tSubscriptionsRequest\022D\n\007project\030\001 \001(\tB3" - + "\340A\002\372A-\n+cloudresourcemanager.googleapis." - + "com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" - + "oken\030\003 \001(\t\"k\n\031ListSubscriptionsResponse\022" - + "5\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub.v" - + "1.Subscription\022\027\n\017next_page_token\030\002 \001(\t\"" - + "]\n\031DeleteSubscriptionRequest\022@\n\014subscrip" - + "tion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" - + "m/Subscription\"\223\001\n\027ModifyPushConfigReque" - + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub" - + ".googleapis.com/Subscription\0226\n\013push_con" - + "fig\030\002 \001(\0132\034.google.pubsub.v1.PushConfigB" - + "\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001 \001" - + "(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscr" - + "iption\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\014PullResp" - + "onse\022<\n\021received_messages\030\001 \003(\0132!.google" - + ".pubsub.v1.ReceivedMessage\"\225\001\n\030ModifyAck" - + "DeadlineRequest\022@\n\014subscription\030\001 \001(\tB*\340" - + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\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\022AcknowledgeRequest" + + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"]" + + "\n\031DetachSubscriptionRequest\022@\n\014subscript" + + "ion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com" + + "/Subscription\"\034\n\032DetachSubscriptionRespo" + + "nse\"\300\005\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" + + "2\n\005topic\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapi" + + "s.com/Topic\0221\n\013push_config\030\004 \001(\0132\034.googl" + + "e.pubsub.v1.PushConfig\022\034\n\024ack_deadline_s" + + "econds\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" + + "(\0132*.google.pubsub.v1.Subscription.Label" + + "sEntry\022\037\n\027enable_message_ordering\030\n \001(\010\022" + + "=\n\021expiration_policy\030\013 \001(\0132\".google.pubs" + + "ub.v1.ExpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>" + + "\n\022dead_letter_policy\030\r \001(\0132\".google.pubs" + + "ub.v1.DeadLetterPolicy\0223\n\014retry_policy\030\016" + + " \001(\0132\035.google.pubsub.v1.RetryPolicy\022\020\n\010d" + + "etached\030\017 \001(\010\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.google" + + "apis.com/Subscription\022/projects/{project" + + "}/subscriptions/{subscription}\"u\n\013RetryP" + + "olicy\0222\n\017minimum_backoff\030\001 \001(\0132\031.google." + + "protobuf.Duration\0222\n\017maximum_backoff\030\002 \001" + + "(\0132\031.google.protobuf.Duration\"L\n\020DeadLet" + + "terPolicy\022\031\n\021dead_letter_topic\030\001 \001(\t\022\035\n\025" + + "max_delivery_attempts\030\002 \001(\005\":\n\020Expiratio" + + "nPolicy\022&\n\003ttl\030\001 \001(\0132\031.google.protobuf.D" + + "uration\"\255\002\n\nPushConfig\022\025\n\rpush_endpoint\030" + + "\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.google.pubsu" + + "b.v1.PushConfig.AttributesEntry\022<\n\noidc_" + + "token\030\003 \001(\0132&.google.pubsub.v1.PushConfi" + + "g.OidcTokenH\000\032<\n\tOidcToken\022\035\n\025service_ac" + + "count_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t\0321\n\017A" + + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001B\027\n\025authentication_method\"m\n\017Recei" + + "vedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030\002 " + + "\001(\0132\037.google.pubsub.v1.PubsubMessage\022\030\n\020" + + "delivery_attempt\030\003 \001(\005\"Z\n\026GetSubscriptio" + + "nRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"" + + "pubsub.googleapis.com/Subscription\"\214\001\n\031U" + + "pdateSubscriptionRequest\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.protob" + + "uf.FieldMaskB\003\340A\002\"\207\001\n\030ListSubscriptionsR" + + "equest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudre" + + "sourcemanager.googleapis.com/Project\022\021\n\t" + + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031L" + + "istSubscriptionsResponse\0225\n\rsubscription" + + "s\030\001 \003(\0132\036.google.pubsub.v1.Subscription\022" + + "\027\n\017next_page_token\030\002 \001(\t\"]\n\031DeleteSubscr" + + "iptionRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002" + + "\372A$\n\"pubsub.googleapis.com/Subscription\"" + + "\223\001\n\027ModifyPushConfigRequest\022@\n\014subscript" + + "ion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com" + + "/Subscription\0226\n\013push_config\030\002 \001(\0132\034.goo" + + "gle.pubsub.v1.PushConfigB\003\340A\002\"\215\001\n\013PullRe" + + "quest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pub" + + "sub.googleapis.com/Subscription\022!\n\022retur" + + "n_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messag" + + "es\030\003 \001(\005B\003\340A\002\"L\n\014PullResponse\022<\n\021receive" + + "d_messages\030\001 \003(\0132!.google.pubsub.v1.Rece" + + "ivedMessage\"\225\001\n\030ModifyAckDeadlineRequest" + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" - + "oogleapis.com/Subscription\022\024\n\007ack_ids\030\002 " - + "\003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequest\022@\n\014sub" - + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027" - + "modify_deadline_seconds\030\003 \003(\005\022\037\n\027modify_" - + "deadline_ack_ids\030\004 \003(\t\022(\n\033stream_ack_dea" - + "dline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 " - + "\001(\t\"U\n\025StreamingPullResponse\022<\n\021received" - + "_messages\030\001 \003(\0132!.google.pubsub.v1.Recei" - + "vedMessage\"\203\002\n\025CreateSnapshotRequest\0224\n\004" - + "name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.co" - + "m/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$" - + "\n\"pubsub.googleapis.com/Subscription\022C\n\006" - + "labels\030\003 \003(\01323.google.pubsub.v1.CreateSn" - + "apshotRequest.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\025Upd" - + "ateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.g" - + "oogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_" - + "mask\030\002 \001(\0132\032.google.protobuf.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.googleapis.com/Topic\022" - + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" - + "imestamp\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\036pu" - + "bsub.googleapis.com/Snapshot\022\'projects/{" - + "project}/snapshots/{snapshot}\"N\n\022GetSnap" - + "shotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036p" - + "ubsub.googleapis.com/Snapshot\"\203\001\n\024ListSn" - + "apshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n" - + "+cloudresourcemanager.googleapis.com/Pro" - + "ject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " - + "\001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapshot" - + "s\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshotRe" - + "quest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub." - + "googleapis.com/Snapshot\"\276\001\n\013SeekRequest\022" - + "@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.go" - + "ogleapis.com/Subscription\022*\n\004time\030\002 \001(\0132" - + "\032.google.protobuf.TimestampH\000\0227\n\010snapsho" - + "t\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Snap" - + "shotH\000B\010\n\006target\"\016\n\014SeekResponse2\243\013\n\tPub" - + "lisher\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\004nam" - + "e\022}\n\013UpdateTopic\022$.google.pubsub.v1.Upda" - + "teTopicRequest\032\027.google.pubsub.v1.Topic\"" - + "/\202\323\344\223\002)2$/v1/{topic.name=projects/*/topi" - + "cs/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v1." - + "PublishRequest\032!.google.pubsub.v1.Publis" - + "hResponse\"C\202\323\344\223\002,\"\'/v1/{topic=projects/*" - + "/topics/*}:publish:\001*\332A\016topic,messages\022w" - + "\n\010GetTopic\022!.google.pubsub.v1.GetTopicRe" - + "quest\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.ListTo" - + "picsRequest\032$.google.pubsub.v1.ListTopic" - + "sResponse\"1\202\323\344\223\002!\022\037/v1/{project=projects" - + "/*}/topics\332A\007project\022\272\001\n\026ListTopicSubscr" - + "iptions\022/.google.pubsub.v1.ListTopicSubs" - + "criptionsRequest\0320.google.pubsub.v1.List" - + "TopicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v1/" - + "{topic=projects/*/topics/*}/subscription" - + "s\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.googl" - + "e.pubsub.v1.ListTopicSnapshotsRequest\032,." - + "google.pubsub.v1.ListTopicSnapshotsRespo" - + "nse\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/topic" - + "s/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022$." - + "google.pubsub.v1.DeleteTopicRequest\032\026.go" - + "ogle.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topic=" - + "projects/*/topics/*}\332A\005topic\022\255\001\n\022DetachS" - + "ubscription\022+.google.pubsub.v1.DetachSub" - + "scriptionRequest\032,.google.pubsub.v1.Deta" - + "chSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/{sub" - + "scription=projects/*/subscriptions/*}:de" - + "tach\032p\312A\025pubsub.googleapis.com\322AUhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/pubsub2\203" - + "\025\n\nSubscriber\022\264\001\n\022CreateSubscription\022\036.g" - + "oogle.pubsub.v1.Subscription\032\036.google.pu" - + "bsub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=" - + "projects/*/subscriptions/*}:\001*\332A+name,to" - + "pic,push_config,ack_deadline_seconds\022\241\001\n" - + "\017GetSubscription\022(.google.pubsub.v1.GetS" - + "ubscriptionRequest\032\036.google.pubsub.v1.Su" - + "bscription\"D\202\323\344\223\002/\022-/v1/{subscription=pr" - + "ojects/*/subscriptions/*}\332A\014subscription" - + "\022\240\001\n\022UpdateSubscription\022+.google.pubsub." - + "v1.UpdateSubscriptionRequest\032\036.google.pu" - + "bsub.v1.Subscription\"=\202\323\344\223\002722/v1/{subsc" - + "ription.name=projects/*/subscriptions/*}" - + ":\001*\022\246\001\n\021ListSubscriptions\022*.google.pubsu" - + "b.v1.ListSubscriptionsRequest\032+.google.p" - + "ubsub.v1.ListSubscriptionsResponse\"8\202\323\344\223" - + "\002(\022&/v1/{project=projects/*}/subscriptio" - + "ns\332A\007project\022\237\001\n\022DeleteSubscription\022+.go" - + "ogle.pubsub.v1.DeleteSubscriptionRequest" - + "\032\026.google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{s" - + "ubscription=projects/*/subscriptions/*}\332" - + "A\014subscription\022\317\001\n\021ModifyAckDeadline\022*.g" - + "oogle.pubsub.v1.ModifyAckDeadlineRequest" - + "\032\026.google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{s" - + "ubscription=projects/*/subscriptions/*}:" - + "modifyAckDeadline:\001*\332A)subscription,ack_" - + "ids,ack_deadline_seconds\022\250\001\n\013Acknowledge" - + "\022$.google.pubsub.v1.AcknowledgeRequest\032\026" - + ".google.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{sub" - + "scription=projects/*/subscriptions/*}:ac" - + "knowledge:\001*\332A\024subscription,ack_ids\022\263\001\n\004" - + "Pull\022\035.google.pubsub.v1.PullRequest\032\036.go" - + "ogle.pubsub.v1.PullResponse\"l\202\323\344\223\0027\"2/v1" - + "/{subscription=projects/*/subscriptions/" - + "*}:pull:\001*\332A,subscription,return_immedia" - + "tely,max_messages\022f\n\rStreamingPull\022&.goo" - + "gle.pubsub.v1.StreamingPullRequest\032\'.goo" - + "gle.pubsub.v1.StreamingPullResponse\"\000(\0010" - + "\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub.v" - + "1.ModifyPushConfigRequest\032\026.google.proto" - + "buf.Empty\"d\202\323\344\223\002C\">/v1/{subscription=pro" - + "jects/*/subscriptions/*}:modifyPushConfi" - + "g:\001*\332A\030subscription,push_config\022\211\001\n\013GetS" - + "napshot\022$.google.pubsub.v1.GetSnapshotRe" - + "quest\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.p" - + "ubsub.v1.ListSnapshotsRequest\032\'.google.p" - + "ubsub.v1.ListSnapshotsResponse\"4\202\323\344\223\002$\022\"" - + "/v1/{project=projects/*}/snapshots\332A\007pro" - + "ject\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.Upd" - + "ateSnapshotRequest\032\032.google.pubsub.v1.Sn" - + "apshot\"5\202\323\344\223\002/2*/v1/{snapshot.name=proje" - + "cts/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapshot" - + "\022\'.google.pubsub.v1.DeleteSnapshotReques" - + "t\032\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%/v1/{" - + "snapshot=projects/*/snapshots/*}\332A\010snaps" - + "hot\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRequ" - + "est\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344" - + "\223\0027\"2/v1/{subscription=projects/*/subscr" - + "iptions/*}:seek:\001*\032p\312A\025pubsub.googleapis" - + ".com\322AUhttps://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/pubsubB\256\001\n\024com.google.pubsub.v1B\013P" - + "ubsubProtoP\001Z6google.golang.org/genproto" - + "/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google" - + ".Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V" - + "1\352\002\031Google::Cloud::PubSub::V1b\006proto3" + + "oogleapis.com/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\022AcknowledgeRequest\022@\n\014subscriptio" + + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S" + + "ubscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\350\001\n\024St" + + "reamingPullRequest\022@\n\014subscription\030\001 \001(\t" + + "B*\340A\002\372A$\n\"pubsub.googleapis.com/Subscrip" + + "tion\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_id" + + "s\030\004 \003(\t\022(\n\033stream_ack_deadline_seconds\030\005" + + " \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 \001(\t\"U\n\025Streamin" + + "gPullResponse\022<\n\021received_messages\030\001 \003(\013" + + "2!.google.pubsub.v1.ReceivedMessage\"\203\002\n\025" + + "CreateSnapshotRequest\0224\n\004name\030\001 \001(\tB&\340A\002" + + "\372A \n\036pubsub.googleapis.com/Snapshot\022@\n\014s" + + "ubscription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.google" + + "apis.com/Subscription\022C\n\006labels\030\003 \003(\01323." + + "google.pubsub.v1.CreateSnapshotRequest.L" + + "abelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequ" + + "est\0221\n\010snapshot\030\001 \001(\0132\032.google.pubsub.v1" + + ".SnapshotB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\002\"\257\002\n\010Snapsho" + + "t\022\014\n\004name\030\001 \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pub" + + "sub.googleapis.com/Topic\022/\n\013expire_time\030" + + "\003 \001(\0132\032.google.protobuf.Timestamp\0226\n\006lab" + + "els\030\004 \003(\0132&.google.pubsub.v1.Snapshot.La" + + "belsEntry\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/Snapshot\022\'projects/{project}/snapsh" + + "ots/{snapshot}\"N\n\022GetSnapshotRequest\0228\n\010" + + "snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapi" + + "s.com/Snapshot\"\203\001\n\024ListSnapshotsRequest\022" + + "D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcem" + + "anager.googleapis.com/Project\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n\025ListSnap" + + "shotsResponse\022-\n\tsnapshots\030\001 \003(\0132\032.googl" + + "e.pubsub.v1.Snapshot\022\027\n\017next_page_token\030" + + "\002 \001(\t\"Q\n\025DeleteSnapshotRequest\0228\n\010snapsh" + + "ot\030\001 \001(\tB&\340A\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/Su" + + "bscription\022*\n\004time\030\002 \001(\0132\032.google.protob" + + "uf.TimestampH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036p" + + "ubsub.googleapis.com/SnapshotH\000B\010\n\006targe" + + "t\"\016\n\014SeekResponse2\243\013\n\tPublisher\022q\n\013Creat" + + "eTopic\022\027.google.pubsub.v1.Topic\032\027.google" + + ".pubsub.v1.Topic\"0\202\323\344\223\002#\032\036/v1/{name=proj" + + "ects/*/topics/*}:\001*\332A\004name\022}\n\013UpdateTopi" + + "c\022$.google.pubsub.v1.UpdateTopicRequest\032" + + "\027.google.pubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{t" + + "opic.name=projects/*/topics/*}:\001*\022\223\001\n\007Pu" + + "blish\022 .google.pubsub.v1.PublishRequest\032" + + "!.google.pubsub.v1.PublishResponse\"C\202\323\344\223" + + "\002,\"\'/v1/{topic=projects/*/topics/*}:publ" + + "ish:\001*\332A\016topic,messages\022w\n\010GetTopic\022!.go" + + "ogle.pubsub.v1.GetTopicRequest\032\027.google." + + "pubsub.v1.Topic\"/\202\323\344\223\002!\022\037/v1/{topic=proj" + + "ects/*/topics/*}\332A\005topic\022\212\001\n\nListTopics\022" + + "#.google.pubsub.v1.ListTopicsRequest\032$.g" + + "oogle.pubsub.v1.ListTopicsResponse\"1\202\323\344\223" + + "\002!\022\037/v1/{project=projects/*}/topics\332A\007pr" + + "oject\022\272\001\n\026ListTopicSubscriptions\022/.googl" + + "e.pubsub.v1.ListTopicSubscriptionsReques" + + "t\0320.google.pubsub.v1.ListTopicSubscripti" + + "onsResponse\"=\202\323\344\223\002/\022-/v1/{topic=projects" + + "/*/topics/*}/subscriptions\332A\005topic\022\252\001\n\022L" + + "istTopicSnapshots\022+.google.pubsub.v1.Lis" + + "tTopicSnapshotsRequest\032,.google.pubsub.v" + + "1.ListTopicSnapshotsResponse\"9\202\323\344\223\002+\022)/v" + + "1/{topic=projects/*/topics/*}/snapshots\332" + + "A\005topic\022|\n\013DeleteTopic\022$.google.pubsub.v" + + "1.DeleteTopicRequest\032\026.google.protobuf.E" + + "mpty\"/\202\323\344\223\002!*\037/v1/{topic=projects/*/topi" + + "cs/*}\332A\005topic\022\255\001\n\022DetachSubscription\022+.g" + + "oogle.pubsub.v1.DetachSubscriptionReques" + + "t\032,.google.pubsub.v1.DetachSubscriptionR" + + "esponse\"<\202\323\344\223\0026\"4/v1/{subscription=proje" + + "cts/*/subscriptions/*}:detach\032p\312A\025pubsub" + + ".googleapis.com\322AUhttps://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/pubsub2\203\025\n\nSubscriber\022\264" + + "\001\n\022CreateSubscription\022\036.google.pubsub.v1" + + ".Subscription\032\036.google.pubsub.v1.Subscri" + + "ption\"^\202\323\344\223\002*\032%/v1/{name=projects/*/subs" + + "criptions/*}:\001*\332A+name,topic,push_config" + + ",ack_deadline_seconds\022\241\001\n\017GetSubscriptio" + + "n\022(.google.pubsub.v1.GetSubscriptionRequ" + + "est\032\036.google.pubsub.v1.Subscription\"D\202\323\344" + + "\223\002/\022-/v1/{subscription=projects/*/subscr" + + "iptions/*}\332A\014subscription\022\240\001\n\022UpdateSubs" + + "cription\022+.google.pubsub.v1.UpdateSubscr" + + "iptionRequest\032\036.google.pubsub.v1.Subscri" + + "ption\"=\202\323\344\223\002722/v1/{subscription.name=pr" + + "ojects/*/subscriptions/*}:\001*\022\246\001\n\021ListSub" + + "scriptions\022*.google.pubsub.v1.ListSubscr" + + "iptionsRequest\032+.google.pubsub.v1.ListSu" + + "bscriptionsResponse\"8\202\323\344\223\002(\022&/v1/{projec" + + "t=projects/*}/subscriptions\332A\007project\022\237\001" + + "\n\022DeleteSubscription\022+.google.pubsub.v1." + + "DeleteSubscriptionRequest\032\026.google.proto" + + "buf.Empty\"D\202\323\344\223\002/*-/v1/{subscription=pro" + + "jects/*/subscriptions/*}\332A\014subscription\022" + + "\317\001\n\021ModifyAckDeadline\022*.google.pubsub.v1" + + ".ModifyAckDeadlineRequest\032\026.google.proto" + + "buf.Empty\"v\202\323\344\223\002D\"?/v1/{subscription=pro" + + "jects/*/subscriptions/*}:modifyAckDeadli" + + "ne:\001*\332A)subscription,ack_ids,ack_deadlin" + + "e_seconds\022\250\001\n\013Acknowledge\022$.google.pubsu" + + "b.v1.AcknowledgeRequest\032\026.google.protobu" + + "f.Empty\"[\202\323\344\223\002>\"9/v1/{subscription=proje" + + "cts/*/subscriptions/*}:acknowledge:\001*\332A\024" + + "subscription,ack_ids\022\263\001\n\004Pull\022\035.google.p" + + "ubsub.v1.PullRequest\032\036.google.pubsub.v1." + + "PullResponse\"l\202\323\344\223\0027\"2/v1/{subscription=" + + "projects/*/subscriptions/*}:pull:\001*\332A,su" + + "bscription,return_immediately,max_messag" + + "es\022f\n\rStreamingPull\022&.google.pubsub.v1.S" + + "treamingPullRequest\032\'.google.pubsub.v1.S" + + "treamingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPus" + + "hConfig\022).google.pubsub.v1.ModifyPushCon" + + "figRequest\032\026.google.protobuf.Empty\"d\202\323\344\223" + + "\002C\">/v1/{subscription=projects/*/subscri" + + "ptions/*}:modifyPushConfig:\001*\332A\030subscrip" + + "tion,push_config\022\211\001\n\013GetSnapshot\022$.googl" + + "e.pubsub.v1.GetSnapshotRequest\032\032.google." + + "pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022%/v1/{snapsho" + + "t=projects/*/snapshots/*}\332A\010snapshot\022\226\001\n" + + "\rListSnapshots\022&.google.pubsub.v1.ListSn" + + "apshotsRequest\032\'.google.pubsub.v1.ListSn" + + "apshotsResponse\"4\202\323\344\223\002$\022\"/v1/{project=pr" + + "ojects/*}/snapshots\332A\007project\022\227\001\n\016Create" + + "Snapshot\022\'.google.pubsub.v1.CreateSnapsh" + + "otRequest\032\032.google.pubsub.v1.Snapshot\"@\202" + + "\323\344\223\002&\032!/v1/{name=projects/*/snapshots/*}" + + ":\001*\332A\021name,subscription\022\214\001\n\016UpdateSnapsh" + + "ot\022\'.google.pubsub.v1.UpdateSnapshotRequ" + + "est\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223\002/2" + + "*/v1/{snapshot.name=projects/*/snapshots" + + "/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsu" + + "b.v1.DeleteSnapshotRequest\032\026.google.prot" + + "obuf.Empty\"8\202\323\344\223\002\'*%/v1/{snapshot=projec" + + "ts/*/snapshots/*}\332A\010snapshot\022\204\001\n\004Seek\022\035." + + "google.pubsub.v1.SeekRequest\032\036.google.pu" + + "bsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subsc" + + "ription=projects/*/subscriptions/*}:seek" + + ":\001*\032p\312A\025pubsub.googleapis.com\322AUhttps://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/pubsubB\256\001" + + "\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z6g" + + "oogle.golang.org/genproto/googleapis/pub" + + "sub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub.V" + + "1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Clo" + + "ud::PubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -675,6 +676,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Filter", "DeadLetterPolicy", "RetryPolicy", + "Detached", }); internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor = internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0); 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 401fdeb0f..4c59e15a5 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 @@ -135,6 +135,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The subscription. */ + @java.lang.Override public java.lang.String getSubscription() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -160,6 +161,7 @@ public java.lang.String getSubscription() { * * @return The bytes for subscription. */ + @java.lang.Override public com.google.protobuf.ByteString getSubscriptionBytes() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -192,6 +194,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * @return The returnImmediately. */ + @java.lang.Override @java.lang.Deprecated public boolean getReturnImmediately() { return returnImmediately_; @@ -212,6 +215,7 @@ public boolean getReturnImmediately() { * * @return The maxMessages. */ + @java.lang.Override public int getMaxMessages() { return maxMessages_; } @@ -700,6 +704,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * @return The returnImmediately. */ + @java.lang.Override @java.lang.Deprecated public boolean getReturnImmediately() { return returnImmediately_; @@ -772,6 +777,7 @@ public Builder clearReturnImmediately() { * * @return The maxMessages. */ + @java.lang.Override public int getMaxMessages() { return maxMessages_; } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java index 6e66eb427..bca433c65 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java @@ -133,6 +133,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public java.util.List getReceivedMessagesList() { return receivedMessages_; } @@ -148,6 +149,7 @@ public java.util.List getReceivedMessagesL * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public java.util.List getReceivedMessagesOrBuilderList() { return receivedMessages_; @@ -164,6 +166,7 @@ public java.util.List getReceivedMessagesL * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public int getReceivedMessagesCount() { return receivedMessages_.size(); } @@ -179,6 +182,7 @@ public int getReceivedMessagesCount() { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessages_.get(index); } @@ -194,6 +198,7 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { return receivedMessages_.get(index); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java index 5557855c8..12614a75b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java @@ -347,6 +347,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The serviceAccountEmail. */ + @java.lang.Override public java.lang.String getServiceAccountEmail() { java.lang.Object ref = serviceAccountEmail_; if (ref instanceof java.lang.String) { @@ -373,6 +374,7 @@ public java.lang.String getServiceAccountEmail() { * * @return The bytes for serviceAccountEmail. */ + @java.lang.Override public com.google.protobuf.ByteString getServiceAccountEmailBytes() { java.lang.Object ref = serviceAccountEmail_; if (ref instanceof java.lang.String) { @@ -403,6 +405,7 @@ public com.google.protobuf.ByteString getServiceAccountEmailBytes() { * * @return The audience. */ + @java.lang.Override public java.lang.String getAudience() { java.lang.Object ref = audience_; if (ref instanceof java.lang.String) { @@ -430,6 +433,7 @@ public java.lang.String getAudience() { * * @return The bytes for audience. */ + @java.lang.Override public com.google.protobuf.ByteString getAudienceBytes() { java.lang.Object ref = audience_; if (ref instanceof java.lang.String) { @@ -1147,6 +1151,7 @@ public AuthenticationMethodCase getAuthenticationMethodCase() { * * @return The pushEndpoint. */ + @java.lang.Override public java.lang.String getPushEndpoint() { java.lang.Object ref = pushEndpoint_; if (ref instanceof java.lang.String) { @@ -1170,6 +1175,7 @@ public java.lang.String getPushEndpoint() { * * @return The bytes for pushEndpoint. */ + @java.lang.Override public com.google.protobuf.ByteString getPushEndpointBytes() { java.lang.Object ref = pushEndpoint_; if (ref instanceof java.lang.String) { @@ -1231,6 +1237,7 @@ public int getAttributesCount() { * * map<string, string> attributes = 2; */ + @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1238,6 +1245,7 @@ public boolean containsAttributes(java.lang.String key) { return internalGetAttributes().getMap().containsKey(key); } /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); @@ -1266,6 +1274,7 @@ public java.util.Map getAttributes() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } @@ -1293,6 +1302,7 @@ public java.util.Map getAttributesMap() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1325,6 +1335,7 @@ public java.lang.String getAttributesOrDefault( * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1349,6 +1360,7 @@ public java.lang.String getAttributesOrThrow(java.lang.String key) { * * @return Whether the oidcToken field is set. */ + @java.lang.Override public boolean hasOidcToken() { return authenticationMethodCase_ == 3; } @@ -1364,6 +1376,7 @@ public boolean hasOidcToken() { * * @return The oidcToken. */ + @java.lang.Override public com.google.pubsub.v1.PushConfig.OidcToken getOidcToken() { if (authenticationMethodCase_ == 3) { return (com.google.pubsub.v1.PushConfig.OidcToken) authenticationMethod_; @@ -1380,6 +1393,7 @@ public com.google.pubsub.v1.PushConfig.OidcToken getOidcToken() { * * .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3; */ + @java.lang.Override public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder() { if (authenticationMethodCase_ == 3) { return (com.google.pubsub.v1.PushConfig.OidcToken) authenticationMethod_; @@ -1965,6 +1979,7 @@ public int getAttributesCount() { * * map<string, string> attributes = 2; */ + @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1972,6 +1987,7 @@ public boolean containsAttributes(java.lang.String key) { return internalGetAttributes().getMap().containsKey(key); } /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); @@ -2000,6 +2016,7 @@ public java.util.Map getAttributes() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } @@ -2027,6 +2044,7 @@ public java.util.Map getAttributesMap() { * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -2059,6 +2077,7 @@ public java.lang.String getAttributesOrDefault( * * map<string, string> attributes = 2; */ + @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2190,6 +2209,7 @@ public Builder putAllAttributes(java.util.Map.google.pubsub.v1.PushConfig.OidcToken oidc_token = 3; */ + @java.lang.Override public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder() { if ((authenticationMethodCase_ == 3) && (oidcTokenBuilder_ != null)) { return oidcTokenBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java index 298013f30..38e472e7a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java @@ -144,6 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The ackId. */ + @java.lang.Override public java.lang.String getAckId() { java.lang.Object ref = ackId_; if (ref instanceof java.lang.String) { @@ -166,6 +167,7 @@ public java.lang.String getAckId() { * * @return The bytes for ackId. */ + @java.lang.Override public com.google.protobuf.ByteString getAckIdBytes() { java.lang.Object ref = ackId_; if (ref instanceof java.lang.String) { @@ -191,6 +193,7 @@ public com.google.protobuf.ByteString getAckIdBytes() { * * @return Whether the message field is set. */ + @java.lang.Override public boolean hasMessage() { return message_ != null; } @@ -205,6 +208,7 @@ public boolean hasMessage() { * * @return The message. */ + @java.lang.Override public com.google.pubsub.v1.PubsubMessage getMessage() { return message_ == null ? com.google.pubsub.v1.PubsubMessage.getDefaultInstance() : message_; } @@ -217,6 +221,7 @@ public com.google.pubsub.v1.PubsubMessage getMessage() { * * .google.pubsub.v1.PubsubMessage message = 2; */ + @java.lang.Override public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { return getMessage(); } @@ -245,6 +250,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { * * @return The deliveryAttempt. */ + @java.lang.Override public int getDeliveryAttempt() { return deliveryAttempt_; } @@ -919,6 +925,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { * * @return The deliveryAttempt. */ + @java.lang.Override public int getDeliveryAttempt() { return deliveryAttempt_; } 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 index 4d7f081ea..4b6a1934e 100644 --- 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 @@ -151,6 +151,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the minimumBackoff field is set. */ + @java.lang.Override public boolean hasMinimumBackoff() { return minimumBackoff_ != null; } @@ -166,6 +167,7 @@ public boolean hasMinimumBackoff() { * * @return The minimumBackoff. */ + @java.lang.Override public com.google.protobuf.Duration getMinimumBackoff() { return minimumBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() @@ -181,6 +183,7 @@ public com.google.protobuf.Duration getMinimumBackoff() { * * .google.protobuf.Duration minimum_backoff = 1; */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { return getMinimumBackoff(); } @@ -199,6 +202,7 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { * * @return Whether the maximumBackoff field is set. */ + @java.lang.Override public boolean hasMaximumBackoff() { return maximumBackoff_ != null; } @@ -214,6 +218,7 @@ public boolean hasMaximumBackoff() { * * @return The maximumBackoff. */ + @java.lang.Override public com.google.protobuf.Duration getMaximumBackoff() { return maximumBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() @@ -229,6 +234,7 @@ public com.google.protobuf.Duration getMaximumBackoff() { * * .google.protobuf.Duration maximum_backoff = 2; */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { return getMaximumBackoff(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java index 7b5b68eeb..48cca085a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java @@ -193,6 +193,7 @@ public TargetCase getTargetCase() { * * @return The subscription. */ + @java.lang.Override public java.lang.String getSubscription() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -217,6 +218,7 @@ public java.lang.String getSubscription() { * * @return The bytes for subscription. */ + @java.lang.Override public com.google.protobuf.ByteString getSubscriptionBytes() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -251,6 +253,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * @return Whether the time field is set. */ + @java.lang.Override public boolean hasTime() { return targetCase_ == 2; } @@ -275,6 +278,7 @@ public boolean hasTime() { * * @return The time. */ + @java.lang.Override public com.google.protobuf.Timestamp getTime() { if (targetCase_ == 2) { return (com.google.protobuf.Timestamp) target_; @@ -300,6 +304,7 @@ public com.google.protobuf.Timestamp getTime() { * * .google.protobuf.Timestamp time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { if (targetCase_ == 2) { return (com.google.protobuf.Timestamp) target_; @@ -904,6 +909,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * @return Whether the time field is set. */ + @java.lang.Override public boolean hasTime() { return targetCase_ == 2; } @@ -928,6 +934,7 @@ public boolean hasTime() { * * @return The time. */ + @java.lang.Override public com.google.protobuf.Timestamp getTime() { if (timeBuilder_ == null) { if (targetCase_ == 2) { @@ -1117,6 +1124,7 @@ public com.google.protobuf.Timestamp.Builder getTimeBuilder() { * * .google.protobuf.Timestamp time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { if ((targetCase_ == 2) && (timeBuilder_ != null)) { return timeBuilder_.getMessageOrBuilder(); @@ -1182,6 +1190,7 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { * * @return The snapshot. */ + @java.lang.Override public java.lang.String getSnapshot() { java.lang.Object ref = ""; if (targetCase_ == 3) { @@ -1211,6 +1220,7 @@ public java.lang.String getSnapshot() { * * @return The bytes for snapshot. */ + @java.lang.Override public com.google.protobuf.ByteString getSnapshotBytes() { java.lang.Object ref = ""; if (targetCase_ == 3) { diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java index bebe34404..6d6000105 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java @@ -175,6 +175,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -197,6 +198,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -222,6 +224,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The topic. */ + @java.lang.Override public java.lang.String getTopic() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -244,6 +247,7 @@ public java.lang.String getTopic() { * * @return The bytes for topic. */ + @java.lang.Override public com.google.protobuf.ByteString getTopicBytes() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -278,6 +282,7 @@ public com.google.protobuf.ByteString getTopicBytes() { * * @return Whether the expireTime field is set. */ + @java.lang.Override public boolean hasExpireTime() { return expireTime_ != null; } @@ -301,6 +306,7 @@ public boolean hasExpireTime() { * * @return The expireTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } @@ -322,6 +328,7 @@ public com.google.protobuf.Timestamp getExpireTime() { * * .google.protobuf.Timestamp expire_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { return getExpireTime(); } @@ -361,6 +368,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -368,6 +376,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -382,6 +391,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -395,6 +405,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -412,6 +423,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1337,6 +1349,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1344,6 +1357,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1358,6 +1372,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1371,6 +1386,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1389,6 +1405,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); 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 6d30c9daf..ba52cd753 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 @@ -200,6 +200,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The subscription. */ + @java.lang.Override public java.lang.String getSubscription() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -227,6 +228,7 @@ public java.lang.String getSubscription() { * * @return The bytes for subscription. */ + @java.lang.Override public com.google.protobuf.ByteString getSubscriptionBytes() { java.lang.Object ref = subscription_; if (ref instanceof java.lang.String) { @@ -339,6 +341,7 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { * * @return A list containing the modifyDeadlineSeconds. */ + @java.lang.Override public java.util.List getModifyDeadlineSecondsList() { return modifyDeadlineSeconds_; } @@ -487,6 +490,7 @@ public com.google.protobuf.ByteString getModifyDeadlineAckIdsBytes(int index) { * * @return The streamAckDeadlineSeconds. */ + @java.lang.Override public int getStreamAckDeadlineSeconds() { return streamAckDeadlineSeconds_; } @@ -509,6 +513,7 @@ public int getStreamAckDeadlineSeconds() { * * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -536,6 +541,7 @@ public java.lang.String getClientId() { * * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -1762,6 +1768,7 @@ public Builder addModifyDeadlineAckIdsBytes(com.google.protobuf.ByteString value * * @return The streamAckDeadlineSeconds. */ + @java.lang.Override public int getStreamAckDeadlineSeconds() { return streamAckDeadlineSeconds_; } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java index a2e4ad7de..8b5c0a1ad 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public java.util.List getReceivedMessagesList() { return receivedMessages_; } @@ -143,6 +144,7 @@ public java.util.List getReceivedMessagesL * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public java.util.List getReceivedMessagesOrBuilderList() { return receivedMessages_; @@ -156,6 +158,7 @@ public java.util.List getReceivedMessagesL * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public int getReceivedMessagesCount() { return receivedMessages_.size(); } @@ -168,6 +171,7 @@ public int getReceivedMessagesCount() { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessages_.get(index); } @@ -180,6 +184,7 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ + @java.lang.Override public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { return receivedMessages_.get(index); } 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 64391376b..5d4db2928 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 @@ -197,6 +197,11 @@ private Subscription( retryPolicy_ = subBuilder.buildPartial(); } + break; + } + case 120: + { + detached_ = input.readBool(); break; } default: @@ -262,6 +267,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -289,6 +295,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -318,6 +325,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The topic. */ + @java.lang.Override public java.lang.String getTopic() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -344,6 +352,7 @@ public java.lang.String getTopic() { * * @return The bytes for topic. */ + @java.lang.Override public com.google.protobuf.ByteString getTopicBytes() { java.lang.Object ref = topic_; if (ref instanceof java.lang.String) { @@ -371,6 +380,7 @@ public com.google.protobuf.ByteString getTopicBytes() { * * @return Whether the pushConfig field is set. */ + @java.lang.Override public boolean hasPushConfig() { return pushConfig_ != null; } @@ -387,6 +397,7 @@ public boolean hasPushConfig() { * * @return The pushConfig. */ + @java.lang.Override public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; } @@ -401,6 +412,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * * .google.pubsub.v1.PushConfig push_config = 4; */ + @java.lang.Override public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { return getPushConfig(); } @@ -434,6 +446,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * * @return The ackDeadlineSeconds. */ + @java.lang.Override public int getAckDeadlineSeconds() { return ackDeadlineSeconds_; } @@ -457,6 +470,7 @@ public int getAckDeadlineSeconds() { * * @return The retainAckedMessages. */ + @java.lang.Override public boolean getRetainAckedMessages() { return retainAckedMessages_; } @@ -479,6 +493,7 @@ public boolean getRetainAckedMessages() { * * @return Whether the messageRetentionDuration field is set. */ + @java.lang.Override public boolean hasMessageRetentionDuration() { return messageRetentionDuration_ != null; } @@ -498,6 +513,7 @@ public boolean hasMessageRetentionDuration() { * * @return The messageRetentionDuration. */ + @java.lang.Override public com.google.protobuf.Duration getMessageRetentionDuration() { return messageRetentionDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() @@ -517,6 +533,7 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { * * .google.protobuf.Duration message_retention_duration = 8; */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilder() { return getMessageRetentionDuration(); } @@ -556,6 +573,7 @@ public int getLabelsCount() { * * map<string, string> labels = 9; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -563,6 +581,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -577,6 +596,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 9; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -590,6 +610,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 9; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -607,6 +628,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 9; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -637,6 +659,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * @return The enableMessageOrdering. */ + @java.lang.Override public boolean getEnableMessageOrdering() { return enableMessageOrdering_; } @@ -659,6 +682,7 @@ public boolean getEnableMessageOrdering() { * * @return Whether the expirationPolicy field is set. */ + @java.lang.Override public boolean hasExpirationPolicy() { return expirationPolicy_ != null; } @@ -678,6 +702,7 @@ public boolean hasExpirationPolicy() { * * @return The expirationPolicy. */ + @java.lang.Override public com.google.pubsub.v1.ExpirationPolicy getExpirationPolicy() { return expirationPolicy_ == null ? com.google.pubsub.v1.ExpirationPolicy.getDefaultInstance() @@ -697,6 +722,7 @@ public com.google.pubsub.v1.ExpirationPolicy getExpirationPolicy() { * * .google.pubsub.v1.ExpirationPolicy expiration_policy = 11; */ + @java.lang.Override public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuilder() { return getExpirationPolicy(); } @@ -711,15 +737,13 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild * 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.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -739,15 +763,13 @@ public java.lang.String getFilter() { * 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. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -779,6 +801,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return Whether the deadLetterPolicy field is set. */ + @java.lang.Override public boolean hasDeadLetterPolicy() { return deadLetterPolicy_ != null; } @@ -799,6 +822,7 @@ public boolean hasDeadLetterPolicy() { * * @return The deadLetterPolicy. */ + @java.lang.Override public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() { return deadLetterPolicy_ == null ? com.google.pubsub.v1.DeadLetterPolicy.getDefaultInstance() @@ -819,6 +843,7 @@ public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() { * * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13; */ + @java.lang.Override public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuilder() { return getDeadLetterPolicy(); } @@ -829,21 +854,19 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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. */ + @java.lang.Override public boolean hasRetryPolicy() { return retryPolicy_ != null; } @@ -851,21 +874,19 @@ public boolean hasRetryPolicy() { * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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. */ + @java.lang.Override public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { return retryPolicy_ == null ? com.google.pubsub.v1.RetryPolicy.getDefaultInstance() @@ -875,23 +896,43 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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; */ + @java.lang.Override public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { return getRetryPolicy(); } + public static final int DETACHED_FIELD_NUMBER = 15; + private boolean detached_; + /** + * + * + *
+   * Indicates whether the subscription is detached from its topic. Detached
+   * subscriptions don't receive messages from their topic and don't retain any
+   * backlog. `Pull` and `StreamingPull` requests will return
+   * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
+   * the endpoint will not be made.
+   * 
+ * + * bool detached = 15; + * + * @return The detached. + */ + @java.lang.Override + public boolean getDetached() { + return detached_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -941,6 +982,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (retryPolicy_ != null) { output.writeMessage(14, getRetryPolicy()); } + if (detached_ != false) { + output.writeBool(15, detached_); + } unknownFields.writeTo(output); } @@ -995,6 +1039,9 @@ public int getSerializedSize() { if (retryPolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getRetryPolicy()); } + if (detached_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, detached_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1037,6 +1084,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRetryPolicy()) { if (!getRetryPolicy().equals(other.getRetryPolicy())) return false; } + if (getDetached() != other.getDetached()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1084,6 +1132,8 @@ public int hashCode() { hash = (37 * hash) + RETRY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getRetryPolicy().hashCode(); } + hash = (37 * hash) + DETACHED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDetached()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1291,6 +1341,8 @@ public Builder clear() { retryPolicy_ = null; retryPolicyBuilder_ = null; } + detached_ = false; + return this; } @@ -1351,6 +1403,7 @@ public com.google.pubsub.v1.Subscription buildPartial() { } else { result.retryPolicy_ = retryPolicyBuilder_.build(); } + result.detached_ = detached_; onBuilt(); return result; } @@ -1437,6 +1490,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasRetryPolicy()) { mergeRetryPolicy(other.getRetryPolicy()); } + if (other.getDetached() != false) { + setDetached(other.getDetached()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1956,6 +2012,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * * @return The ackDeadlineSeconds. */ + @java.lang.Override public int getAckDeadlineSeconds() { return ackDeadlineSeconds_; } @@ -2045,6 +2102,7 @@ public Builder clearAckDeadlineSeconds() { * * @return The retainAckedMessages. */ + @java.lang.Override public boolean getRetainAckedMessages() { return retainAckedMessages_; } @@ -2362,6 +2420,7 @@ public int getLabelsCount() { * * map<string, string> labels = 9; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2369,6 +2428,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -2383,6 +2443,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 9; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -2396,6 +2457,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 9; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -2414,6 +2476,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 9; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2504,6 +2567,7 @@ public Builder putAllLabels(java.util.Map va * * @return The enableMessageOrdering. */ + @java.lang.Override public boolean getEnableMessageOrdering() { return enableMessageOrdering_; } @@ -2795,9 +2859,6 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild * 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; @@ -2823,9 +2884,6 @@ public java.lang.String getFilter() { * 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; @@ -2851,9 +2909,6 @@ public com.google.protobuf.ByteString getFilterBytes() { * 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; @@ -2878,9 +2933,6 @@ public Builder setFilter(java.lang.String value) { * 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; @@ -2901,9 +2953,6 @@ public Builder clearFilter() { * 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; @@ -3172,15 +3221,12 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3194,15 +3240,12 @@ public boolean hasRetryPolicy() { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3222,15 +3265,12 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3252,15 +3292,12 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3279,15 +3316,12 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy.Builder builderFo * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3313,15 +3347,12 @@ public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3341,15 +3372,12 @@ public Builder clearRetryPolicy() { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3363,15 +3391,12 @@ public com.google.pubsub.v1.RetryPolicy.Builder getRetryPolicyBuilder() { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3389,15 +3414,12 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { * * *
-     * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+     * A policy that specifies how 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; @@ -3419,6 +3441,70 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { return retryPolicyBuilder_; } + private boolean detached_; + /** + * + * + *
+     * Indicates whether the subscription is detached from its topic. Detached
+     * subscriptions don't receive messages from their topic and don't retain any
+     * backlog. `Pull` and `StreamingPull` requests will return
+     * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
+     * the endpoint will not be made.
+     * 
+ * + * bool detached = 15; + * + * @return The detached. + */ + @java.lang.Override + public boolean getDetached() { + return detached_; + } + /** + * + * + *
+     * Indicates whether the subscription is detached from its topic. Detached
+     * subscriptions don't receive messages from their topic and don't retain any
+     * backlog. `Pull` and `StreamingPull` requests will return
+     * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
+     * the endpoint will not be made.
+     * 
+ * + * bool detached = 15; + * + * @param value The detached to set. + * @return This builder for chaining. + */ + public Builder setDetached(boolean value) { + + detached_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether the subscription is detached from its topic. Detached
+     * subscriptions don't receive messages from their topic and don't retain any
+     * backlog. `Pull` and `StreamingPull` requests will return
+     * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
+     * the endpoint will not be made.
+     * 
+ * + * bool detached = 15; + * + * @return This builder for chaining. + */ + public Builder clearDetached() { + + detached_ = false; + onChanged(); + return this; + } + @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 dd48671fb..9a36df9e0 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 @@ -366,9 +366,6 @@ public interface SubscriptionOrBuilder * 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; @@ -384,9 +381,6 @@ public interface SubscriptionOrBuilder * 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; @@ -452,15 +446,12 @@ public interface SubscriptionOrBuilder * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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; @@ -472,15 +463,12 @@ public interface SubscriptionOrBuilder * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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; @@ -492,18 +480,32 @@ public interface SubscriptionOrBuilder * * *
-   * A policy that specifies how Cloud Pub/Sub retries message delivery for this
+   * A policy that specifies how 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(); + + /** + * + * + *
+   * Indicates whether the subscription is detached from its topic. Detached
+   * subscriptions don't receive messages from their topic and don't retain any
+   * backlog. `Pull` and `StreamingPull` requests will return
+   * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
+   * the endpoint will not be made.
+   * 
+ * + * bool detached = 15; + * + * @return The detached. + */ + boolean getDetached(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java index e062abc0e..5df76aa71 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java @@ -176,6 +176,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -203,6 +204,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -250,6 +252,7 @@ public int getLabelsCount() { * * map<string, string> labels = 2; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -257,6 +260,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -271,6 +275,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 2; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -284,6 +289,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 2; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -301,6 +307,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 2; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -327,6 +334,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * @return Whether the messageStoragePolicy field is set. */ + @java.lang.Override public boolean hasMessageStoragePolicy() { return messageStoragePolicy_ != null; } @@ -343,6 +351,7 @@ public boolean hasMessageStoragePolicy() { * * @return The messageStoragePolicy. */ + @java.lang.Override public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { return messageStoragePolicy_ == null ? com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance() @@ -359,6 +368,7 @@ public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { * * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; */ + @java.lang.Override public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder() { return getMessageStoragePolicy(); } @@ -378,6 +388,7 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * * @return The kmsKeyName. */ + @java.lang.Override public java.lang.String getKmsKeyName() { java.lang.Object ref = kmsKeyName_; if (ref instanceof java.lang.String) { @@ -402,6 +413,7 @@ public java.lang.String getKmsKeyName() { * * @return The bytes for kmsKeyName. */ + @java.lang.Override public com.google.protobuf.ByteString getKmsKeyNameBytes() { java.lang.Object ref = kmsKeyName_; if (ref instanceof java.lang.String) { @@ -979,6 +991,7 @@ public int getLabelsCount() { * * map<string, string> labels = 2; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -986,6 +999,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1000,6 +1014,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 2; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1013,6 +1028,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 2; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1031,6 +1047,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 2; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java index b22075d56..078d0d1be 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java @@ -145,6 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the snapshot field is set. */ + @java.lang.Override public boolean hasSnapshot() { return snapshot_ != null; } @@ -159,6 +160,7 @@ public boolean hasSnapshot() { * * @return The snapshot. */ + @java.lang.Override public com.google.pubsub.v1.Snapshot getSnapshot() { return snapshot_ == null ? com.google.pubsub.v1.Snapshot.getDefaultInstance() : snapshot_; } @@ -171,6 +173,7 @@ public com.google.pubsub.v1.Snapshot getSnapshot() { * * .google.pubsub.v1.Snapshot snapshot = 1 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { return getSnapshot(); } @@ -190,6 +193,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -206,6 +210,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -220,6 +225,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java index 80b4be911..ffed68bcf 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the subscription field is set. */ + @java.lang.Override public boolean hasSubscription() { return subscription_ != null; } @@ -163,6 +164,7 @@ public boolean hasSubscription() { * * @return The subscription. */ + @java.lang.Override public com.google.pubsub.v1.Subscription getSubscription() { return subscription_ == null ? com.google.pubsub.v1.Subscription.getDefaultInstance() @@ -179,6 +181,7 @@ public com.google.pubsub.v1.Subscription getSubscription() { * .google.pubsub.v1.Subscription subscription = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { return getSubscription(); } @@ -198,6 +201,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -214,6 +218,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -228,6 +233,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } 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 44b586ae1..7458cb8ad 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 @@ -144,6 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the topic field is set. */ + @java.lang.Override public boolean hasTopic() { return topic_ != null; } @@ -158,6 +159,7 @@ public boolean hasTopic() { * * @return The topic. */ + @java.lang.Override public com.google.pubsub.v1.Topic getTopic() { return topic_ == null ? com.google.pubsub.v1.Topic.getDefaultInstance() : topic_; } @@ -170,6 +172,7 @@ public com.google.pubsub.v1.Topic getTopic() { * * .google.pubsub.v1.Topic topic = 1 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { return getTopic(); } @@ -192,6 +195,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -211,6 +215,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -228,6 +233,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } 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 0311cc5b3..d85f2734e 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 @@ -135,6 +135,7 @@ service Publisher { } } +// A policy constraining the storage of messages published to the topic. message MessageStoragePolicy { // A list of IDs of GCP regions where messages that are published to the topic // may be persisted in storage. Messages published by publishers running in @@ -367,7 +368,9 @@ message DetachSubscriptionRequest { // Format is `projects/{project}/subscriptions/{subscription}`. string subscription = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } ]; } @@ -701,9 +704,6 @@ message Subscription { // 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 @@ -716,17 +716,21 @@ message Subscription { // permission to Acknowledge() messages on this subscription. DeadLetterPolicy dead_letter_policy = 13; - // A policy that specifies how Cloud Pub/Sub retries message delivery for this + // A policy that specifies how 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; + + // Indicates whether the subscription is detached from its topic. Detached + // subscriptions don't receive messages from their topic and don't retain any + // backlog. `Pull` and `StreamingPull` requests will return + // FAILED_PRECONDITION. If the subscription is a push subscription, pushes to + // the endpoint will not be made. + bool detached = 15; } // A policy that specifies how Cloud Pub/Sub retries message delivery. diff --git a/synth.metadata b/synth.metadata index 887afc20e..88c12b23c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f5f268f5293e60143ac742a4eeb7dd6306ebf505", - "internalRef": "313276022" + "sha": "86285bbd54fbf9708838219e3422aa47fb8fc0b0", + "internalRef": "314795690" } }, { From 1902551525ba2513bc5bbb28a4c632e9ed6d93fe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Jun 2020 15:58:10 +0200 Subject: [PATCH 21/22] chore(deps): update dependency com.google.cloud:libraries-bom to v5.6.0 (#234) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b8373ed8a..81d253aa3 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 5.5.0 + 5.6.0 pom import From cdb7ae7ebfe132be955e5ceb231c1714f07a0600 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2020 09:30:21 -0700 Subject: [PATCH 22/22] chore: release 1.107.0 (#212) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated samples/pom.xml [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 proto-google-cloud-pubsub-v1/pom.xml [ci skip] * updated samples/snapshot/pom.xml [ci skip] * updated samples/install-without-bom/pom.xml [ci skip] * updated samples/snippets/pom.xml [ci skip] * updated pom.xml Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 4 ++-- google-cloud-pubsub-bom/pom.xml | 8 ++++---- google-cloud-pubsub/pom.xml | 4 ++-- grpc-google-cloud-pubsub-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-pubsub-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 9 files changed, 42 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88250e270..4c98dcf42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.107.0](https://www.github.com/googleapis/java-pubsub/compare/v1.106.0...v1.107.0) (2020-06-09) + + +### Features + +* add detach subscription rpc ([#216](https://www.github.com/googleapis/java-pubsub/issues/216)) ([09866b0](https://www.github.com/googleapis/java-pubsub/commit/09866b0d36e2dd1c994b4c91807d71552b65c8e1)) +* regenerated to pick up changes in the API or client library generator ([#185](https://www.github.com/googleapis/java-pubsub/issues/185)) ([16624f8](https://www.github.com/googleapis/java-pubsub/commit/16624f88ad19ccaf2ea074a62242496be103659f)), closes [#533](https://www.github.com/googleapis/java-pubsub/issues/533) [#535](https://www.github.com/googleapis/java-pubsub/issues/535) [#534](https://www.github.com/googleapis/java-pubsub/issues/534) + + +### Bug Fixes + +* update ignored diffs ([#206](https://www.github.com/googleapis/java-pubsub/issues/206)) ([240e141](https://www.github.com/googleapis/java-pubsub/commit/240e141a8b4f8e4d4e252672bb4ae4d091dde453)), closes [#6784](https://www.github.com/googleapis/java-pubsub/issues/6784) [#11](https://www.github.com/googleapis/java-pubsub/issues/11) + + +### Dependencies + +* bump shared-deps version and add back certain test deps ([#218](https://www.github.com/googleapis/java-pubsub/issues/218)) ([49ecc69](https://www.github.com/googleapis/java-pubsub/commit/49ecc69fb6a63abf6a83f82f2820ff386cdaf5fb)) +* remove grpc test dep since it's now in shared-deps ([#220](https://www.github.com/googleapis/java-pubsub/issues/220)) ([28ab521](https://www.github.com/googleapis/java-pubsub/commit/28ab5211c344d60743c3cb11f568c8f2a4e2c040)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.6.0 ([#219](https://www.github.com/googleapis/java-pubsub/issues/219)) ([c6fc69d](https://www.github.com/googleapis/java-pubsub/commit/c6fc69d47dea6f3833a9a2945d27ed3f9e310c52)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.7.0 ([#221](https://www.github.com/googleapis/java-pubsub/issues/221)) ([89eae9a](https://www.github.com/googleapis/java-pubsub/commit/89eae9a6c3dc585926f85fc0de2b80f7dbfedb42)) +* update dependency com.google.errorprone:error_prone_annotations to v2.4.0 ([#225](https://www.github.com/googleapis/java-pubsub/issues/225)) ([f375ecb](https://www.github.com/googleapis/java-pubsub/commit/f375ecbbd66e518a25c1d0459ba0634121ddced1)) + ## [1.106.0](https://www.github.com/googleapis/java-pubsub/compare/v1.105.1...v1.106.0) (2020-05-20) diff --git a/README.md b/README.md index 388948793..1807397e6 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.106.0' +compile 'com.google.cloud:google-cloud-pubsub:1.107.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.106.0" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.107.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 8ba10396b..f0c317395 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.106.1-SNAPSHOT + 1.107.0 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.88.1-SNAPSHOT + 1.89.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.88.1-SNAPSHOT + 1.89.0 com.google.cloud google-cloud-pubsub - 1.106.1-SNAPSHOT + 1.107.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 5b3e98761..1dfb0dc3e 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.106.1-SNAPSHOT + 1.107.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.106.1-SNAPSHOT + 1.107.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index cf0c8d698..8a50c5255 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.88.1-SNAPSHOT + 1.89.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.106.1-SNAPSHOT + 1.107.0 diff --git a/pom.xml b/pom.xml index 6813a9d5a..765dceceb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.106.1-SNAPSHOT + 1.107.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -82,17 +82,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.88.1-SNAPSHOT + 1.89.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.88.1-SNAPSHOT + 1.89.0 com.google.cloud google-cloud-pubsub - 1.106.1-SNAPSHOT + 1.107.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index f30bb9ea9..c1851807d 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.88.1-SNAPSHOT + 1.89.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.106.1-SNAPSHOT + 1.107.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ddbb83147..fb28de2c8 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.106.1-SNAPSHOT + 1.107.0 diff --git a/versions.txt b/versions.txt index 57cecb2f3..d298a7f8c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-pubsub-v1:1.88.0:1.88.1-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.88.0:1.88.1-SNAPSHOT -google-cloud-pubsub:1.106.0:1.106.1-SNAPSHOT \ No newline at end of file +proto-google-cloud-pubsub-v1:1.89.0:1.89.0 +grpc-google-cloud-pubsub-v1:1.89.0:1.89.0 +google-cloud-pubsub:1.107.0:1.107.0 \ No newline at end of file