{@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
@@ -207,7 +207,7 @@ public SubscriberStub getStub() {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
@@ -245,10 +245,7 @@ public SubscriberStub getStub() {
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Subscription createSubscription(
- ProjectSubscriptionName name,
- TopicName topic,
- PushConfig pushConfig,
- int ackDeadlineSeconds) {
+ SubscriptionName name, TopicName topic, PushConfig pushConfig, int ackDeadlineSeconds) {
Subscription request =
Subscription.newBuilder()
.setName(name == null ? null : name.toString())
@@ -276,7 +273,7 @@ public final Subscription createSubscription(
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
@@ -314,7 +311,7 @@ public final Subscription createSubscription(
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Subscription createSubscription(
- ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) {
+ SubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) {
Subscription request =
Subscription.newBuilder()
.setName(name == null ? null : name.toString())
@@ -342,7 +339,7 @@ public final Subscription createSubscription(
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
@@ -408,7 +405,7 @@ public final Subscription createSubscription(
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
@@ -476,7 +473,7 @@ public final Subscription createSubscription(
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* Subscription request =
* Subscription.newBuilder()
- * .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
@@ -554,12 +551,12 @@ public final Subscription createSubscription(Subscription request) {
* If the subscriber never acknowledges the message, the Pub/Sub system will eventually
* redeliver the message.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #createSubscription(ProjectSubscriptionName, TopicName, PushConfig,
- * int)} instead.
+ * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)}
+ * instead.
*/
@Deprecated
public final Subscription createSubscription(
- ProjectSubscriptionName name,
+ com.google.pubsub.v1.ProjectSubscriptionName name,
ProjectTopicName topic,
PushConfig pushConfig,
int ackDeadlineSeconds) {
@@ -592,7 +589,7 @@ public final Subscription createSubscription(
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* Subscription request =
* Subscription.newBuilder()
- * .setName(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
@@ -626,7 +623,7 @@ public final UnaryCallable createSubscriptionCallabl
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* Subscription response = subscriptionAdminClient.getSubscription(subscription);
* }
* }
@@ -635,7 +632,7 @@ public final UnaryCallable createSubscriptionCallabl
* `projects/{project}/subscriptions/{sub}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Subscription getSubscription(ProjectSubscriptionName subscription) {
+ public final Subscription getSubscription(SubscriptionName subscription) {
GetSubscriptionRequest request =
GetSubscriptionRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -651,7 +648,7 @@ public final Subscription getSubscription(ProjectSubscriptionName subscription)
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* Subscription response = subscriptionAdminClient.getSubscription(subscription);
* }
* }
@@ -676,7 +673,7 @@ public final Subscription getSubscription(String subscription) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* GetSubscriptionRequest request =
* GetSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* Subscription response = subscriptionAdminClient.getSubscription(request);
* }
@@ -699,7 +696,7 @@ public final Subscription getSubscription(GetSubscriptionRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* GetSubscriptionRequest request =
* GetSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* ApiFuture future =
* subscriptionAdminClient.getSubscriptionCallable().futureCall(request);
@@ -855,7 +852,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
+ * ApiFuture future =
* subscriptionAdminClient.listSubscriptionsPagedCallable().futureCall(request);
* // Do something.
* for (Subscription element : future.get().iterateAll()) {
@@ -886,7 +883,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR
* while (true) {
* ListSubscriptionsResponse response =
* subscriptionAdminClient.listSubscriptionsCallable().call(request);
- * for (Subscription element : response.getSubscriptionsList()) {
+ * for (Subscription element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -915,7 +912,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* subscriptionAdminClient.deleteSubscription(subscription);
* }
* }
@@ -924,7 +921,7 @@ public final ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsR
* `projects/{project}/subscriptions/{sub}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteSubscription(ProjectSubscriptionName subscription) {
+ public final void deleteSubscription(SubscriptionName subscription) {
DeleteSubscriptionRequest request =
DeleteSubscriptionRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -943,7 +940,7 @@ public final void deleteSubscription(ProjectSubscriptionName subscription) {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* subscriptionAdminClient.deleteSubscription(subscription);
* }
* }
@@ -971,7 +968,7 @@ public final void deleteSubscription(String subscription) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* DeleteSubscriptionRequest request =
* DeleteSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* subscriptionAdminClient.deleteSubscription(request);
* }
@@ -997,7 +994,7 @@ public final void deleteSubscription(DeleteSubscriptionRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* DeleteSubscriptionRequest request =
* DeleteSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* ApiFuture future =
* subscriptionAdminClient.deleteSubscriptionCallable().futureCall(request);
@@ -1021,7 +1018,7 @@ public final UnaryCallable deleteSubscriptionC
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* List ackIds = new ArrayList<>();
* int ackDeadlineSeconds = 2135351438;
* subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
@@ -1040,8 +1037,8 @@ public final UnaryCallable deleteSubscriptionC
* 600 seconds (10 minutes).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- /* package-private */ final void modifyAckDeadline(
- ProjectSubscriptionName subscription, List ackIds, int ackDeadlineSeconds) {
+ public final void modifyAckDeadline(
+ SubscriptionName subscription, List ackIds, int ackDeadlineSeconds) {
ModifyAckDeadlineRequest request =
ModifyAckDeadlineRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -1062,7 +1059,7 @@ public final UnaryCallable deleteSubscriptionC
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* List ackIds = new ArrayList<>();
* int ackDeadlineSeconds = 2135351438;
* subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
@@ -1105,7 +1102,7 @@ public final void modifyAckDeadline(
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ModifyAckDeadlineRequest request =
* ModifyAckDeadlineRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .addAllAckIds(new ArrayList())
* .setAckDeadlineSeconds(2135351438)
* .build();
@@ -1133,7 +1130,7 @@ public final void modifyAckDeadline(ModifyAckDeadlineRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ModifyAckDeadlineRequest request =
* ModifyAckDeadlineRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .addAllAckIds(new ArrayList())
* .setAckDeadlineSeconds(2135351438)
* .build();
@@ -1160,7 +1157,7 @@ public final UnaryCallable modifyAckDeadlineCal
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* List ackIds = new ArrayList<>();
* subscriptionAdminClient.acknowledge(subscription, ackIds);
* }
@@ -1172,7 +1169,7 @@ public final UnaryCallable modifyAckDeadlineCal
* returned by the Pub/Sub system in the `Pull` response. Must not be empty.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void acknowledge(ProjectSubscriptionName subscription, List ackIds) {
+ public final void acknowledge(SubscriptionName subscription, List ackIds) {
AcknowledgeRequest request =
AcknowledgeRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -1193,7 +1190,7 @@ public final void acknowledge(ProjectSubscriptionName subscription, List
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* List ackIds = new ArrayList<>();
* subscriptionAdminClient.acknowledge(subscription, ackIds);
* }
@@ -1225,7 +1222,7 @@ public final void acknowledge(String subscription, List ackIds) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* AcknowledgeRequest request =
* AcknowledgeRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .addAllAckIds(new ArrayList())
* .build();
* subscriptionAdminClient.acknowledge(request);
@@ -1253,7 +1250,7 @@ public final void acknowledge(AcknowledgeRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* AcknowledgeRequest request =
* AcknowledgeRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .addAllAckIds(new ArrayList())
* .build();
* ApiFuture future = subscriptionAdminClient.acknowledgeCallable().futureCall(request);
@@ -1275,7 +1272,7 @@ public final UnaryCallable acknowledgeCallable() {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* int maxMessages = 496131527;
* PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
* }
@@ -1287,7 +1284,7 @@ public final UnaryCallable acknowledgeCallable() {
* a positive integer. The Pub/Sub system may return fewer than the number specified.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) {
+ public final PullResponse pull(SubscriptionName subscription, int maxMessages) {
PullRequest request =
PullRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -1305,7 +1302,7 @@ public final PullResponse pull(ProjectSubscriptionName subscription, int maxMess
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* int maxMessages = 496131527;
* PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
* }
@@ -1332,7 +1329,7 @@ public final PullResponse pull(String subscription, int maxMessages) {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* boolean returnImmediately = true;
* int maxMessages = 496131527;
* PullResponse response =
@@ -1352,8 +1349,8 @@ public final PullResponse pull(String subscription, int maxMessages) {
* a positive integer. The Pub/Sub system may return fewer than the number specified.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- /* package-private */ final PullResponse pull(
- ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) {
+ public final PullResponse pull(
+ SubscriptionName subscription, boolean returnImmediately, int maxMessages) {
PullRequest request =
PullRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -1372,7 +1369,7 @@ public final PullResponse pull(String subscription, int maxMessages) {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* boolean returnImmediately = true;
* int maxMessages = 496131527;
* PullResponse response =
@@ -1413,7 +1410,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* PullRequest request =
* PullRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setReturnImmediately(true)
* .setMaxMessages(496131527)
* .build();
@@ -1439,7 +1436,7 @@ public final PullResponse pull(PullRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* PullRequest request =
* PullRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setReturnImmediately(true)
* .setMaxMessages(496131527)
* .build();
@@ -1470,7 +1467,7 @@ public final UnaryCallable pullCallable() {
* subscriptionAdminClient.streamingPullCallable().call();
* StreamingPullRequest request =
* StreamingPullRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .addAllAckIds(new ArrayList())
* .addAllModifyDeadlineSeconds(new ArrayList())
* .addAllModifyDeadlineAckIds(new ArrayList())
@@ -1504,7 +1501,7 @@ public final UnaryCallable pullCallable() {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* PushConfig pushConfig = PushConfig.newBuilder().build();
* subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
* }
@@ -1518,7 +1515,7 @@ public final UnaryCallable pullCallable() {
* pausing the subscription if `Pull` or `StreamingPull` is not called.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) {
+ public final void modifyPushConfig(SubscriptionName subscription, PushConfig pushConfig) {
ModifyPushConfigRequest request =
ModifyPushConfigRequest.newBuilder()
.setSubscription(subscription == null ? null : subscription.toString())
@@ -1540,7 +1537,7 @@ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushCon
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* PushConfig pushConfig = PushConfig.newBuilder().build();
* subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
* }
@@ -1578,7 +1575,7 @@ public final void modifyPushConfig(String subscription, PushConfig pushConfig) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ModifyPushConfigRequest request =
* ModifyPushConfigRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .build();
* subscriptionAdminClient.modifyPushConfig(request);
@@ -1607,7 +1604,7 @@ public final void modifyPushConfig(ModifyPushConfigRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* ModifyPushConfigRequest request =
* ModifyPushConfigRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .build();
* ApiFuture future =
@@ -1632,7 +1629,7 @@ public final UnaryCallable modifyPushConfigCalla
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
* }
* }
@@ -1641,7 +1638,7 @@ public final UnaryCallable modifyPushConfigCalla
* `projects/{project}/snapshots/{snap}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Snapshot getSnapshot(ProjectSnapshotName snapshot) {
+ public final Snapshot getSnapshot(SnapshotName snapshot) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setSnapshot(snapshot == null ? null : snapshot.toString())
@@ -1660,7 +1657,7 @@ public final Snapshot getSnapshot(ProjectSnapshotName snapshot) {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * String snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
* Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
* }
* }
@@ -1687,7 +1684,7 @@ public final Snapshot getSnapshot(String snapshot) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* GetSnapshotRequest request =
* GetSnapshotRequest.newBuilder()
- * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
* .build();
* Snapshot response = subscriptionAdminClient.getSnapshot(request);
* }
@@ -1713,7 +1710,7 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* GetSnapshotRequest request =
* GetSnapshotRequest.newBuilder()
- * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
* .build();
* ApiFuture future =
* subscriptionAdminClient.getSnapshotCallable().futureCall(request);
@@ -1830,7 +1827,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
+ * ApiFuture future =
* subscriptionAdminClient.listSnapshotsPagedCallable().futureCall(request);
* // Do something.
* for (Snapshot element : future.get().iterateAll()) {
@@ -1864,7 +1861,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
* while (true) {
* ListSnapshotsResponse response =
* subscriptionAdminClient.listSnapshotsCallable().call(request);
- * for (Snapshot element : response.getSnapshotsList()) {
+ * for (Snapshot element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1900,8 +1897,8 @@ public final UnaryCallable listSnap
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
* }
* }
@@ -1920,8 +1917,7 @@ public final UnaryCallable listSnap
* `projects/{project}/subscriptions/{sub}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Snapshot createSnapshot(
- ProjectSnapshotName name, ProjectSubscriptionName subscription) {
+ public final Snapshot createSnapshot(SnapshotName name, SubscriptionName subscription) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setName(name == null ? null : name.toString())
@@ -1949,8 +1945,8 @@ public final Snapshot createSnapshot(
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * SnapshotName name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
* }
* }
@@ -1969,7 +1965,7 @@ public final Snapshot createSnapshot(
* `projects/{project}/subscriptions/{sub}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) {
+ public final Snapshot createSnapshot(SnapshotName name, String subscription) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setName(name == null ? null : name.toString())
@@ -1997,8 +1993,8 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
- * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * String name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * SubscriptionName subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
* }
* }
@@ -2017,7 +2013,7 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti
* `projects/{project}/subscriptions/{sub}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) {
+ public final Snapshot createSnapshot(String name, SubscriptionName subscription) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setName(name)
@@ -2045,8 +2041,8 @@ public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscr
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
- * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * String name = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * String subscription = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
* Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
* }
* }
@@ -2092,8 +2088,8 @@ public final Snapshot createSnapshot(String name, String subscription) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* CreateSnapshotRequest request =
* CreateSnapshotRequest.newBuilder()
- * .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .putAllLabels(new HashMap())
* .build();
* Snapshot response = subscriptionAdminClient.createSnapshot(request);
@@ -2128,8 +2124,8 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* CreateSnapshotRequest request =
* CreateSnapshotRequest.newBuilder()
- * .setName(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .putAllLabels(new HashMap())
* .build();
* ApiFuture future =
@@ -2211,7 +2207,7 @@ public final UnaryCallable updateSnapshotCallab
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * SnapshotName snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]");
* subscriptionAdminClient.deleteSnapshot(snapshot);
* }
* }
@@ -2220,7 +2216,7 @@ public final UnaryCallable updateSnapshotCallab
* `projects/{project}/snapshots/{snap}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteSnapshot(ProjectSnapshotName snapshot) {
+ public final void deleteSnapshot(SnapshotName snapshot) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setSnapshot(snapshot == null ? null : snapshot.toString())
@@ -2242,7 +2238,7 @@ public final void deleteSnapshot(ProjectSnapshotName snapshot) {
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * String snapshot = SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
* subscriptionAdminClient.deleteSnapshot(snapshot);
* }
* }
@@ -2273,7 +2269,7 @@ public final void deleteSnapshot(String snapshot) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* DeleteSnapshotRequest request =
* DeleteSnapshotRequest.newBuilder()
- * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
* .build();
* subscriptionAdminClient.deleteSnapshot(request);
* }
@@ -2302,7 +2298,7 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* DeleteSnapshotRequest request =
* DeleteSnapshotRequest.newBuilder()
- * .setSnapshot(ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
+ * .setSnapshot(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString())
* .build();
* ApiFuture future =
* subscriptionAdminClient.deleteSnapshotCallable().futureCall(request);
@@ -2330,7 +2326,7 @@ public final UnaryCallable deleteSnapshotCallable(
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* SeekRequest request =
* SeekRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* SeekResponse response = subscriptionAdminClient.seek(request);
* }
@@ -2358,7 +2354,7 @@ public final SeekResponse seek(SeekRequest request) {
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
* SeekRequest request =
* SeekRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* ApiFuture future = subscriptionAdminClient.seekCallable().futureCall(request);
* // Do something.
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java
index 1a9ba2887..61b154c1e 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java
@@ -27,8 +27,6 @@
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.pubsub.v1.stub.PublisherStub;
import com.google.cloud.pubsub.v1.stub.PublisherStubSettings;
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
@@ -47,7 +45,6 @@
import com.google.pubsub.v1.ListTopicsRequest;
import com.google.pubsub.v1.ListTopicsResponse;
import com.google.pubsub.v1.ProjectName;
-import com.google.pubsub.v1.ProjectSubscriptionName;
import com.google.pubsub.v1.ProjectTopicName;
import com.google.pubsub.v1.PublishRequest;
import com.google.pubsub.v1.PublishResponse;
@@ -666,7 +663,7 @@ public final ListTopicsPagedResponse listTopics(ListTopicsRequest request) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future = topicAdminClient.listTopicsPagedCallable().futureCall(request);
+ * ApiFuture future = topicAdminClient.listTopicsPagedCallable().futureCall(request);
* // Do something.
* for (Topic element : future.get().iterateAll()) {
* // doThingsWith(element);
@@ -694,7 +691,7 @@ public final UnaryCallable listTopic
* .build();
* while (true) {
* ListTopicsResponse response = topicAdminClient.listTopicsCallable().call(request);
- * for (Topic element : response.getTopicsList()) {
+ * for (Topic element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -834,7 +831,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
+ * ApiFuture future =
* topicAdminClient.listTopicSubscriptionsPagedCallable().futureCall(request);
* // Do something.
* for (String element : future.get().iterateAll()) {
@@ -865,7 +862,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(
* while (true) {
* ListTopicSubscriptionsResponse response =
* topicAdminClient.listTopicSubscriptionsCallable().call(request);
- * for (String element : response.getSubscriptionsList()) {
+ * for (String element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -989,7 +986,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
+ * ApiFuture future =
* topicAdminClient.listTopicSnapshotsPagedCallable().futureCall(request);
* // Do something.
* for (String element : future.get().iterateAll()) {
@@ -1023,7 +1020,7 @@ public final ListTopicSnapshotsPagedResponse listTopicSnapshots(
* while (true) {
* ListTopicSnapshotsResponse response =
* topicAdminClient.listTopicSnapshotsCallable().call(request);
- * for (String element : response.getSnapshotsList()) {
+ * for (String element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1183,7 +1180,7 @@ public final UnaryCallable deleteTopicCallable() {
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* DetachSubscriptionRequest request =
* DetachSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* DetachSubscriptionResponse response = topicAdminClient.detachSubscription(request);
* }
@@ -1208,7 +1205,7 @@ public final DetachSubscriptionResponse detachSubscription(DetachSubscriptionReq
* try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
* DetachSubscriptionRequest request =
* DetachSubscriptionRequest.newBuilder()
- * .setSubscription(ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
+ * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .build();
* ApiFuture future =
* topicAdminClient.detachSubscriptionCallable().futureCall(request);
@@ -1600,17 +1597,6 @@ public static ApiFuture createAsync(
private ListTopicSubscriptionsPagedResponse(ListTopicSubscriptionsPage page) {
super(page, ListTopicSubscriptionsFixedSizeCollection.createEmptyCollection());
}
-
- public Iterable iterateAllAsProjectSubscriptionName() {
- return Iterables.transform(
- iterateAll(),
- new Function() {
- @Override
- public ProjectSubscriptionName apply(String arg0) {
- return ProjectSubscriptionName.parse(arg0);
- }
- });
- }
}
public static class ListTopicSubscriptionsPage
@@ -1643,28 +1629,6 @@ public ApiFuture createPageAsync(
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
-
- public Iterable iterateAllAsProjectSubscriptionName() {
- return Iterables.transform(
- iterateAll(),
- new Function() {
- @Override
- public ProjectSubscriptionName apply(String arg0) {
- return ProjectSubscriptionName.parse(arg0);
- }
- });
- }
-
- public Iterable getValuesAsProjectSubscriptionName() {
- return Iterables.transform(
- getValues(),
- new Function() {
- @Override
- public ProjectSubscriptionName apply(String arg0) {
- return ProjectSubscriptionName.parse(arg0);
- }
- });
- }
}
public static class ListTopicSubscriptionsFixedSizeCollection
@@ -1689,17 +1653,6 @@ protected ListTopicSubscriptionsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListTopicSubscriptionsFixedSizeCollection(pages, collectionSize);
}
-
- public Iterable getValuesAsProjectSubscriptionName() {
- return Iterables.transform(
- getValues(),
- new Function() {
- @Override
- public ProjectSubscriptionName apply(String arg0) {
- return ProjectSubscriptionName.parse(arg0);
- }
- });
- }
}
public static class ListTopicSnapshotsPagedResponse
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java
index 820341320..128d54247 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java
@@ -43,7 +43,7 @@
*
* {@code
* try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * SubscriptionName name = SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
* TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
* PushConfig pushConfig = PushConfig.newBuilder().build();
* int ackDeadlineSeconds = 2135351438;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
index 5ccb0793e..2b2e725c1 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
@@ -369,7 +369,7 @@ protected GrpcPublisherStub(
callableFactory.createUnaryCallable(
updateTopicTransportSettings, settings.updateTopicSettings(), clientContext);
this.publishCallable =
- callableFactory.createUnaryCallable(
+ callableFactory.createBatchingCallable(
publishTransportSettings, settings.publishSettings(), clientContext);
this.getTopicCallable =
callableFactory.createUnaryCallable(
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
index 89900c0e4..914a95d8c 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
@@ -35,10 +35,10 @@
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.protobuf.ByteString;
-import com.google.pubsub.v1.ProjectSubscriptionName;
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.PushConfig;
import com.google.pubsub.v1.Subscription;
+import com.google.pubsub.v1.SubscriptionName;
import com.google.pubsub.v1.TopicName;
import java.util.Collections;
import java.util.List;
@@ -94,7 +94,7 @@ private String formatForTest(String resourceName) {
}
private Subscription getSubscription(
- ProjectSubscriptionName subscriptionName,
+ SubscriptionName subscriptionName,
TopicName topicName,
PushConfig pushConfig,
int ackDeadline) {
@@ -151,9 +151,8 @@ public void testVPCPushSubscriber() {
.setProject(projectId)
.setTopic(formatForTest("testing-vpc-push-subscriber-topic"))
.build();
- ProjectSubscriptionName subscriptionName =
- ProjectSubscriptionName.of(
- projectId, formatForTest("testing-vpc-push-subscriber-subscription"));
+ SubscriptionName subscriptionName =
+ SubscriptionName.of(projectId, formatForTest("testing-vpc-push-subscriber-subscription"));
topicAdminClient.createTopic(topicName);
try {
@@ -179,9 +178,8 @@ public void testPublishSubscribe() throws Exception {
.setProject(projectId)
.setTopic(formatForTest("testing-publish-subscribe-topic"))
.build();
- ProjectSubscriptionName subscriptionName =
- ProjectSubscriptionName.of(
- projectId, formatForTest("testing-publish-subscribe-subscription"));
+ SubscriptionName subscriptionName =
+ SubscriptionName.of(projectId, formatForTest("testing-publish-subscribe-subscription"));
topicAdminClient.createTopic(topicName);
@@ -191,7 +189,7 @@ public void testPublishSubscribe() throws Exception {
final BlockingQueue
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PullResponse pull(PullRequest request) {
+ return pullCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many
+ * concurrent pull requests pending for the given subscription.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * int maxMessages = 496131527;
+ * PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription from which messages should be pulled. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param maxMessages Required. The maximum number of messages to return for this request. Must be
+ * a positive integer. The Pub/Sub system may return fewer than the number specified.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #pull(SubscriptionName, int)} instead.
+ */
+ @Deprecated
+ public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) {
+ PullRequest request =
+ PullRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setMaxMessages(maxMessages)
+ .build();
+ return pull(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many
+ * concurrent pull requests pending for the given subscription.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * boolean returnImmediately = true;
+ * int maxMessages = 496131527;
+ * PullResponse response =
+ * subscriptionAdminClient.pull(subscription, returnImmediately, maxMessages);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription from which messages should be pulled. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param returnImmediately Optional. If this field set to true, the system will respond
+ * immediately even if it there are no messages available to return in the `Pull` response.
+ * Otherwise, the system may wait (for a bounded amount of time) until at least one message is
+ * available, rather than returning no messages. Warning: setting this field to `true` is
+ * discouraged because it adversely impacts the performance of `Pull` operations. We recommend
+ * that users do not set this field.
+ * @param maxMessages Required. The maximum number of messages to return for this request. Must be
+ * a positive integer. The Pub/Sub system may return fewer than the number specified.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #pull(SubscriptionName, boolean, int)} instead.
*/
- public final PullResponse pull(PullRequest request) {
- return pullCallable().call(request);
+ @Deprecated
+ final PullResponse pull(
+ ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) {
+ PullRequest request =
+ PullRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setReturnImmediately(returnImmediately)
+ .setMaxMessages(maxMessages)
+ .build();
+ return pull(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
@@ -1589,6 +1939,44 @@ public final void modifyPushConfig(ModifyPushConfigRequest request) {
modifyPushConfigCallable().call(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Modifies the `PushConfig` for a specified subscription.
+ *
+ * This may be used to change a push subscription to a pull one (signified by an empty
+ * `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push
+ * subscription. Messages will accumulate for delivery continuously through the call regardless of
+ * changes to the `PushConfig`.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * PushConfig pushConfig = PushConfig.newBuilder().build();
+ * subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
+ * }
+ * }
+ *
+ * @param subscription Required. The name of the subscription. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param pushConfig Required. The push configuration for future deliveries.
+ * An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages
+ * from the given subscription and allow messages to be pulled and acknowledged - effectively
+ * pausing the subscription if `Pull` or `StreamingPull` is not called.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #modifyPushConfig(SubscriptionName, PushConfig)} instead.
+ */
+ @Deprecated
+ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) {
+ ModifyPushConfigRequest request =
+ ModifyPushConfigRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setPushConfig(pushConfig)
+ .build();
+ modifyPushConfig(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Modifies the `PushConfig` for a specified subscription.
@@ -1697,6 +2085,36 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) {
return getSnapshotCallable().call(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration details of a snapshot. Snapshots are used in <a
+ * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which
+ * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment
+ * state of messages in an existing subscription to the state captured by a snapshot.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
+ * }
+ * }
+ *
+ * @param snapshot Required. The name of the snapshot to get. Format is
+ * `projects/{project}/snapshots/{snap}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #getSnapshot(SnapshotName)} instead.
+ */
+ @Deprecated
+ public final Snapshot getSnapshot(ProjectSnapshotName snapshot) {
+ GetSnapshotRequest request =
+ GetSnapshotRequest.newBuilder()
+ .setSnapshot(snapshot == null ? null : snapshot.toString())
+ .build();
+ return getSnapshot(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the configuration details of a snapshot. Snapshots are used in <a
@@ -2103,6 +2521,157 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) {
return createSnapshotCallable().call(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(SnapshotName, SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(
+ ProjectSnapshotName name, ProjectSubscriptionName subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ return createSnapshot(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(String, SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name)
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ return createSnapshot(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(SnapshotName, String)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setSubscription(subscription)
+ .build();
+ return createSnapshot(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a snapshot from the requested subscription. Snapshots are used in
@@ -2282,6 +2851,39 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) {
deleteSnapshotCallable().call(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes an existing snapshot. Snapshots are used in [Seek]
+ * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage
+ * message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in
+ * an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all
+ * messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new
+ * one may be created with the same name, but the new one has no association with the old snapshot
+ * or its subscription, unless the same subscription is specified.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * subscriptionAdminClient.deleteSnapshot(snapshot);
+ * }
+ * }
+ *
+ * @param snapshot Required. The name of the snapshot to delete. Format is
+ * `projects/{project}/snapshots/{snap}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #deleteSnapshot(SnapshotName)} instead.
+ */
+ @Deprecated
+ public final void deleteSnapshot(ProjectSnapshotName snapshot) {
+ DeleteSnapshotRequest request =
+ DeleteSnapshotRequest.newBuilder()
+ .setSnapshot(snapshot == null ? null : snapshot.toString())
+ .build();
+ deleteSnapshot(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes an existing snapshot. Snapshots are used in [Seek]
diff --git a/owlbot.py b/owlbot.py
index 42af76ac6..0d280ad71 100644
--- a/owlbot.py
+++ b/owlbot.py
@@ -402,11 +402,11 @@
* If the subscriber never acknowledges the message, the Pub/Sub system will eventually
* redeliver the message.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #createSubscription(ProjectSubscriptionName, TopicName, PushConfig, int)} instead.
+ * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} instead.
*/
@Deprecated
public final Subscription createSubscription(
- com.google.pubsub.v1.ProjectSubscriptionName name,
+ ProjectSubscriptionName name,
ProjectTopicName topic,
PushConfig pushConfig,
int ackDeadlineSeconds) {
@@ -419,11 +419,648 @@
.build();
return createSubscription(request);
}
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a subscription to a given topic. See the [resource name rules]
+ * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already
+ * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns
+ * `NOT_FOUND`.
+ *
+ *
If the name is not provided in the request, the server will assign a random name for this
+ * subscription on the same project as the topic, conforming to the [resource name format]
+ * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in
+ * the returned Subscription object. Note that for REST API requests, you must specify a name in
+ * the request.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString();
+ * PushConfig pushConfig = PushConfig.newBuilder().build();
+ * int ackDeadlineSeconds = 2135351438;
+ * Subscription response =
+ * subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+ * }
+ * }
+ *
+ * @param name Required. The name of the subscription. It must have the format
+ * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a
+ * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores
+ * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3
+ * and 255 characters in length, and it must not start with `"goog"`.
+ * @param topic Required. The name of the topic from which this subscription is receiving
+ * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
+ * `_deleted-topic_` if the topic has been deleted.
+ * @param pushConfig If push delivery is used with this subscription, this field is used to
+ * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
+ * messages using API methods.
+ * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
+ * for the subscriber to acknowledge receipt before resending the message. In the interval
+ * after the message is delivered and before it is acknowledged, it is considered to be
+ * <i>outstanding</i>. During that time period, the message will not be
+ * redelivered (on a best-effort basis).
+ * For pull subscriptions, this value is used as the initial value for the ack deadline. To
+ * override this value for a given message, call `ModifyAckDeadline` with the corresponding
+ * `ack_id` if using non-streaming pull or send the `ack_id` in a
+ * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline
+ * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds
+ * (10 minutes). If this parameter is 0, a default value of 10 seconds is used.
+ *
For push delivery, this value is also used to set the request timeout for the call to
+ * the push endpoint.
+ *
If the subscriber never acknowledges the message, the Pub/Sub system will eventually
+ * redeliver the message.
+ * @deprecated Use {@link #createSubscription(SubscriptionName, String, PushConfig, int)} instead.
+ */
+ @Deprecated
+ public final Subscription createSubscription(
+ ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) {
+ Subscription request =
+ Subscription.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setTopic(topic)
+ .setPushConfig(pushConfig)
+ .setAckDeadlineSeconds(ackDeadlineSeconds)
+ .build();
+ return createSubscription(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a subscription to a given topic. See the [resource name rules]
+ * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already
+ * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns
+ * `NOT_FOUND`.
+ *
+ *
If the name is not provided in the request, the server will assign a random name for this
+ * subscription on the same project as the topic, conforming to the [resource name format]
+ * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in
+ * the returned Subscription object. Note that for REST API requests, you must specify a name in
+ * the request.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+ * PushConfig pushConfig = PushConfig.newBuilder().build();
+ * int ackDeadlineSeconds = 2135351438;
+ * Subscription response =
+ * subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+ * }
+ * }
+ *
+ * @param name Required. The name of the subscription. It must have the format
+ * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a
+ * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores
+ * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3
+ * and 255 characters in length, and it must not start with `"goog"`.
+ * @param topic Required. The name of the topic from which this subscription is receiving
+ * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
+ * `_deleted-topic_` if the topic has been deleted.
+ * @param pushConfig If push delivery is used with this subscription, this field is used to
+ * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
+ * messages using API methods.
+ * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
+ * for the subscriber to acknowledge receipt before resending the message. In the interval
+ * after the message is delivered and before it is acknowledged, it is considered to be
+ * <i>outstanding</i>. During that time period, the message will not be
+ * redelivered (on a best-effort basis).
+ * For pull subscriptions, this value is used as the initial value for the ack deadline. To
+ * override this value for a given message, call `ModifyAckDeadline` with the corresponding
+ * `ack_id` if using non-streaming pull or send the `ack_id` in a
+ * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline
+ * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds
+ * (10 minutes). If this parameter is 0, a default value of 10 seconds is used.
+ *
For push delivery, this value is also used to set the request timeout for the call to
+ * the push endpoint.
+ *
If the subscriber never acknowledges the message, the Pub/Sub system will eventually
+ * redeliver the message.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} instead.
+ */
+ @Deprecated
+ public final Subscription createSubscription(
+ ProjectSubscriptionName name,
+ TopicName topic,
+ PushConfig pushConfig,
+ int ackDeadlineSeconds) {
+ Subscription request =
+ Subscription.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setTopic(topic == null ? null : topic.toString())
+ .setPushConfig(pushConfig)
+ .setAckDeadlineSeconds(ackDeadlineSeconds)
+ .build();
+ return createSubscription(request);
+ }
+"""
+
+GET_SUBSCRIPTION_PREVIOUS = r'(\s+public final Subscription getSubscription\(GetSubscriptionRequest request\) {\n\s+return.*\n\s+})'
+
+GET_SUBSCRIPTION = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration details of a subscription.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * Subscription response = subscriptionAdminClient.getSubscription(subscription);
+ * }
+ * }
+ *
+ * @param subscription Required. The name of the subscription to get. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #getSubscription(SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final Subscription getSubscription(ProjectSubscriptionName subscription) {
+ GetSubscriptionRequest request =
+ GetSubscriptionRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ return getSubscription(request);
+ }
+"""
+
+DELETE_SUBSCRIPTION_PREVIOUS = r'(\s+public final void deleteSubscription\(DeleteSubscriptionRequest request\) {\n\s+deleteSubscription.*\n\s+})'
+
+DELETE_SUBSCRIPTION = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an existing subscription. All messages retained in the subscription are immediately
+ * dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is
+ * deleted, a new one may be created with the same name, but the new one has no association with
+ * the old subscription or its topic unless the same topic is specified.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * subscriptionAdminClient.deleteSubscription(subscription);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription to delete. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #deleteSubscription(SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final void deleteSubscription(ProjectSubscriptionName subscription) {
+ DeleteSubscriptionRequest request =
+ DeleteSubscriptionRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ deleteSubscription(request);
+ }
+"""
+
+MODIFY_ACK_DEADLINE_PREVIOUS = r'(\s+public final void modifyAckDeadline\(ModifyAckDeadlineRequest request\) {\n\s+modifyAckDeadline.*\n\s+})'
+
+MODIFY_ACK_DEADLINE = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Modifies the ack deadline for a specific message. This method is useful to indicate that more
+ * time is needed to process a message by the subscriber, or to make the message available for
+ * redelivery if the processing was interrupted. Note that this does not modify the
+ * subscription-level `ackDeadlineSeconds` used for subsequent messages.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * List ackIds = new ArrayList<>();
+ * int ackDeadlineSeconds = 2135351438;
+ * subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds);
+ * }
+ * }
+ *
+ * @param subscription Required. The name of the subscription. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param ackIds Required. List of acknowledgment IDs.
+ * @param ackDeadlineSeconds Required. The new ack deadline with respect to the time this request
+ * was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will
+ * expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might
+ * immediately make the message available for delivery to another subscriber client. This
+ * typically results in an increase in the rate of message redeliveries (that is, duplicates).
+ * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is
+ * 600 seconds (10 minutes).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #modifyAckDeadline(SubscriptionName, List, int)} instead.
+ */
+ @Deprecated
+ final void modifyAckDeadline(
+ ProjectSubscriptionName subscription, List ackIds, int ackDeadlineSeconds) {
+ ModifyAckDeadlineRequest request =
+ ModifyAckDeadlineRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .addAllAckIds(ackIds)
+ .setAckDeadlineSeconds(ackDeadlineSeconds)
+ .build();
+ modifyAckDeadline(request);
+ }
+"""
+
+ACKNOWLEDGE_PREVIOUS = r'(\s+public final void acknowledge\(AcknowledgeRequest request\) {\n\s+acknowledge.*\n\s+})'
+
+ACKNOWLEDGE = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The
+ * Pub/Sub system can remove the relevant messages from the subscription.
+ *
+ * Acknowledging a message whose ack deadline has expired may succeed, but such a message may
+ * be redelivered later. Acknowledging a message more than once will not result in an error.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * List ackIds = new ArrayList<>();
+ * subscriptionAdminClient.acknowledge(subscription, ackIds);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription whose message is being acknowledged. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was
+ * returned by the Pub/Sub system in the `Pull` response. Must not be empty.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #acknowledge(SubscriptionName, List)} instead.
+ */
+ @Deprecated
+ public final void acknowledge(ProjectSubscriptionName subscription, List ackIds) {
+ AcknowledgeRequest request =
+ AcknowledgeRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .addAllAckIds(ackIds)
+ .build();
+ acknowledge(request);
+ }
+"""
+
+PULL_PREVIOUS = r'(\s+public final PullResponse pull\(PullRequest request\) {\n\s+return.*\n\s+})'
+
+PULL = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many
+ * concurrent pull requests pending for the given subscription.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * int maxMessages = 496131527;
+ * PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription from which messages should be pulled. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param maxMessages Required. The maximum number of messages to return for this request. Must be
+ * a positive integer. The Pub/Sub system may return fewer than the number specified.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #pull(SubscriptionName, int)} instead.
+ */
+ @Deprecated
+ public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) {
+ PullRequest request =
+ PullRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setMaxMessages(maxMessages)
+ .build();
+ return pull(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many
+ * concurrent pull requests pending for the given subscription.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * boolean returnImmediately = true;
+ * int maxMessages = 496131527;
+ * PullResponse response =
+ * subscriptionAdminClient.pull(subscription, returnImmediately, maxMessages);
+ * }
+ * }
+ *
+ * @param subscription Required. The subscription from which messages should be pulled. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param returnImmediately Optional. If this field set to true, the system will respond
+ * immediately even if it there are no messages available to return in the `Pull` response.
+ * Otherwise, the system may wait (for a bounded amount of time) until at least one message is
+ * available, rather than returning no messages. Warning: setting this field to `true` is
+ * discouraged because it adversely impacts the performance of `Pull` operations. We recommend
+ * that users do not set this field.
+ * @param maxMessages Required. The maximum number of messages to return for this request. Must be
+ * a positive integer. The Pub/Sub system may return fewer than the number specified.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #pull(SubscriptionName, boolean, int)} instead.
+ */
+ @Deprecated
+ final PullResponse pull(
+ ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) {
+ PullRequest request =
+ PullRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setReturnImmediately(returnImmediately)
+ .setMaxMessages(maxMessages)
+ .build();
+ return pull(request);
+ }
+"""
+
+MODIFY_PUSH_CONFIG_PREVIOUS = r'(\s+public final void modifyPushConfig\(ModifyPushConfigRequest request\) {\n\s+modifyPushConfig.*\n\s+})'
+
+MODIFY_PUSH_CONFIG = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Modifies the `PushConfig` for a specified subscription.
+ *
+ * This may be used to change a push subscription to a pull one (signified by an empty
+ * `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push
+ * subscription. Messages will accumulate for delivery continuously through the call regardless of
+ * changes to the `PushConfig`.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * PushConfig pushConfig = PushConfig.newBuilder().build();
+ * subscriptionAdminClient.modifyPushConfig(subscription, pushConfig);
+ * }
+ * }
+ *
+ * @param subscription Required. The name of the subscription. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @param pushConfig Required. The push configuration for future deliveries.
+ * An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages
+ * from the given subscription and allow messages to be pulled and acknowledged - effectively
+ * pausing the subscription if `Pull` or `StreamingPull` is not called.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use {@link #modifyPushConfig(SubscriptionName, PushConfig)} instead.
+ */
+ @Deprecated
+ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) {
+ ModifyPushConfigRequest request =
+ ModifyPushConfigRequest.newBuilder()
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .setPushConfig(pushConfig)
+ .build();
+ modifyPushConfig(request);
+ }
+"""
+
+CREATE_SNAPSHOT_PREVIOUS = r'(\s+public final Snapshot createSnapshot\(CreateSnapshotRequest request\) {\n\s+return.*\n\s+})'
+
+CREATE_SNAPSHOT = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(SnapshotName, SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(
+ ProjectSnapshotName name, ProjectSubscriptionName subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ return createSnapshot(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString();
+ * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(String, SubscriptionName)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name)
+ .setSubscription(subscription == null ? null : subscription.toString())
+ .build();
+ return createSnapshot(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshot from the requested subscription. Snapshots are used in
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to
+ * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of
+ * messages in an existing subscription to the state captured by a snapshot. If the snapshot
+ * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns
+ * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would
+ * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the
+ * `Snapshot.expire_time` field. If the name is not provided in the request, the server will
+ * assign a random name for this snapshot on the same project as the subscription, conforming to
+ * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * generated name is populated in the returned Snapshot object. Note that for REST API requests,
+ * you must specify a name in the request.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString();
+ * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription);
+ * }
+ * }
+ *
+ * @param name Required. User-provided name for this snapshot. If the name is not provided in the
+ * request, the server will assign a random name for this snapshot on the same project as the
+ * subscription. Note that for REST API requests, you must specify a name. See the <a
+ * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name
+ * rules</a>. Format is `projects/{project}/snapshots/{snap}`.
+ * @param subscription Required. The subscription whose backlog the snapshot retains.
+ * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the
+ * subscription. More precisely, this is defined as the messages in the subscription's backlog
+ * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as
+ * well as: (b) Any messages published to the subscription's topic following the successful
+ * completion of the CreateSnapshot request. Format is
+ * `projects/{project}/subscriptions/{sub}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #createSnapshot(SnapshotName, String)} instead.
+ */
+ @Deprecated
+ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) {
+ CreateSnapshotRequest request =
+ CreateSnapshotRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setSubscription(subscription)
+ .build();
+ return createSnapshot(request);
+ }
+"""
+
+DELETE_SNAPSHOT_PREVIOUS = r'(\s+public final void deleteSnapshot\(DeleteSnapshotRequest request\) {\n\s+deleteSnapshot.*\n\s+})'
+
+DELETE_SNAPSHOT = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes an existing snapshot. Snapshots are used in [Seek]
+ * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage
+ * message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in
+ * an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all
+ * messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new
+ * one may be created with the same name, but the new one has no association with the old snapshot
+ * or its subscription, unless the same subscription is specified.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * subscriptionAdminClient.deleteSnapshot(snapshot);
+ * }
+ * }
+ *
+ * @param snapshot Required. The name of the snapshot to delete. Format is
+ * `projects/{project}/snapshots/{snap}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #deleteSnapshot(SnapshotName)} instead.
+ */
+ @Deprecated
+ public final void deleteSnapshot(ProjectSnapshotName snapshot) {
+ DeleteSnapshotRequest request =
+ DeleteSnapshotRequest.newBuilder()
+ .setSnapshot(snapshot == null ? null : snapshot.toString())
+ .build();
+ deleteSnapshot(request);
+ }
+"""
+
+GET_SNAPSHOT_PREVIOUS = r'(\s+public final Snapshot getSnapshot\(GetSnapshotRequest request\) {\n\s+return.*\n\s+})'
+
+GET_SNAPSHOT = """
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration details of a snapshot. Snapshots are used in <a
+ * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which
+ * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment
+ * state of messages in an existing subscription to the state captured by a snapshot.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
+ * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+ * Snapshot response = subscriptionAdminClient.getSnapshot(snapshot);
+ * }
+ * }
+ *
+ * @param snapshot Required. The name of the snapshot to get. Format is
+ * `projects/{project}/snapshots/{snap}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated Use Use {@link #getSnapshot(SnapshotName)} instead.
+ */
+ @Deprecated
+ public final Snapshot getSnapshot(ProjectSnapshotName snapshot) {
+ GetSnapshotRequest request =
+ GetSnapshotRequest.newBuilder()
+ .setSnapshot(snapshot == null ? null : snapshot.toString())
+ .build();
+ return getSnapshot(request);
+ }
"""
PACKAGE = 'package com.google.cloud.pubsub.v1;'
IMPORT_PROJECT_TOPIC_NAME = 'import com.google.pubsub.v1.ProjectTopicName;'
+IMPORT_PROJECT_SUBSCRIPTION_NAME = 'import com.google.pubsub.v1.ProjectSubscriptionName;'
+IMPORT_PROJECT_SNAPSHOT_NAME = 'import com.google.pubsub.v1.ProjectSnapshotName;'
for library in s.get_staging_dirs():
# put any special-case replacements here
@@ -504,10 +1141,64 @@
"\g<1>\n\n" + CREATE_SUBSCRIPTION
)
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ DELETE_SUBSCRIPTION_PREVIOUS,
+ "\g<1>\n\n" + DELETE_SUBSCRIPTION
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ GET_SUBSCRIPTION_PREVIOUS,
+ "\g<1>\n\n" + GET_SUBSCRIPTION
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ MODIFY_ACK_DEADLINE_PREVIOUS,
+ "\g<1>\n\n" + MODIFY_ACK_DEADLINE
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ ACKNOWLEDGE_PREVIOUS,
+ "\g<1>\n\n" + ACKNOWLEDGE
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ PULL_PREVIOUS,
+ "\g<1>\n\n" + PULL
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ MODIFY_PUSH_CONFIG_PREVIOUS,
+ "\g<1>\n\n" + MODIFY_PUSH_CONFIG
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ CREATE_SNAPSHOT_PREVIOUS,
+ "\g<1>\n\n" + CREATE_SNAPSHOT
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ GET_SNAPSHOT_PREVIOUS,
+ "\g<1>\n\n" + GET_SNAPSHOT
+ )
+
+ s.replace(
+ '**/SubscriptionAdminClient.java',
+ DELETE_SNAPSHOT_PREVIOUS,
+ "\g<1>\n\n" + DELETE_SNAPSHOT
+ )
+
s.replace(
'**/*AdminClient.java',
PACKAGE,
- PACKAGE + '\n\n' + IMPORT_PROJECT_TOPIC_NAME + '\n'
+ PACKAGE + '\n\n' + IMPORT_PROJECT_TOPIC_NAME + '\n' + IMPORT_PROJECT_SUBSCRIPTION_NAME + '\n' + IMPORT_PROJECT_SNAPSHOT_NAME + '\n'
)
s.move(library)
From ff64f76da6d9c2499ee843255e8e7e68128a82cd Mon Sep 17 00:00:00 2001
From: Tianzi Cai
Date: Wed, 1 Dec 2021 14:36:44 -0500
Subject: [PATCH 24/28] samples: use LinkedHashMap for ordered publish (#938)
* samples: use LinkedHashMap for ordered publish
* also update resume publish sample
---
.../src/main/java/pubsub/PublishWithOrderingKeys.java | 4 ++--
.../src/main/java/pubsub/ResumePublishWithOrderingKeys.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java
index d199e7ff8..e1509db5a 100644
--- a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java
+++ b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java
@@ -27,7 +27,7 @@
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.TopicName;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -54,7 +54,7 @@ public static void publishWithOrderingKeysExample(String projectId, String topic
.build();
try {
- Map messages = new HashMap();
+ Map messages = new LinkedHashMap();
messages.put("message1", "key1");
messages.put("message2", "key2");
messages.put("message3", "key1");
diff --git a/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java b/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java
index 06489637d..ce5e91754 100644
--- a/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java
+++ b/samples/snippets/src/main/java/pubsub/ResumePublishWithOrderingKeys.java
@@ -27,7 +27,7 @@
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.TopicName;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -52,7 +52,7 @@ public static void resumePublishWithOrderingKeysExample(String projectId, String
.build();
try {
- Map messages = new HashMap();
+ Map messages = new LinkedHashMap();
messages.put("message1", "key1");
messages.put("message2", "key2");
messages.put("message3", "key1");
From 44cdcf5d3f1815654b9b255c1096e290a7db9030 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Fri, 3 Dec 2021 17:06:29 +0100
Subject: [PATCH 25/28] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v2.5.1 (#942)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.5.0` -> `2.5.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-dependencies
### [`v2.5.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#251-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare250v251-2021-12-03)
[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.5.0...v2.5.1)
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub).
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3205a02aa..b225e6d12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
com.google.cloud
google-cloud-shared-dependencies
- 2.5.0
+ 2.5.1
pom
import
From 41f881b2d075f9ee730f5eaf24885146d9fadccf Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Fri, 3 Dec 2021 21:16:24 +0100
Subject: [PATCH 26/28] deps: update dependency
com.google.cloud:google-cloud-core to v2.3.2 (#941)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.3.1` -> `2.3.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-core
### [`v2.3.2`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#232-httpswwwgithubcomgoogleapisjava-corecomparev231v232-2021-12-02)
[Compare Source](https://togithub.com/googleapis/java-core/compare/v2.3.1...v2.3.2)
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub).
---
samples/install-without-bom/pom.xml | 2 +-
samples/snapshot/pom.xml | 2 +-
samples/snippets/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index dd12c7f48..a0b977b9e 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -80,7 +80,7 @@
com.google.cloud
google-cloud-core
- 2.3.1
+ 2.3.2
tests
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index e85f5a995..06653bfec 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -79,7 +79,7 @@
com.google.cloud
google-cloud-core
- 2.3.1
+ 2.3.2
tests
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index e39780f6f..04f4002bf 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -90,7 +90,7 @@
com.google.cloud
google-cloud-core
- 2.3.1
+ 2.3.2
tests
From df3a5fecd4d87ae79cba312109242146b84f9e55 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Sun, 5 Dec 2021 06:30:23 +0100
Subject: [PATCH 27/28] deps: update dependency
com.google.cloud:google-cloud-core to v2.3.3 (#943)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.3.2` -> `2.3.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-core
### [`v2.3.3`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#233-httpswwwgithubcomgoogleapisjava-corecomparev232v233-2021-12-02)
[Compare Source](https://togithub.com/googleapis/java-core/compare/v2.3.2...v2.3.3)
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsub).
---
samples/install-without-bom/pom.xml | 2 +-
samples/snapshot/pom.xml | 2 +-
samples/snippets/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index a0b977b9e..90237c256 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -80,7 +80,7 @@
com.google.cloud
google-cloud-core
- 2.3.2
+ 2.3.3
tests
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 06653bfec..3c1cfeabf 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -79,7 +79,7 @@
com.google.cloud
google-cloud-core
- 2.3.2
+ 2.3.3
tests
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 04f4002bf..e93ed15c9 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -90,7 +90,7 @@
com.google.cloud
google-cloud-core
- 2.3.2
+ 2.3.3
tests
From cf45b2ea68af95ee9923cb8a7639b6e18bcb804e Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Mon, 6 Dec 2021 16:40:13 +0000
Subject: [PATCH 28/28] chore: release 1.115.0 (#889)
:robot: I have created a release \*beep\* \*boop\*
---
## [1.115.0](https://www.github.com/googleapis/java-pubsub/compare/v1.114.7...v1.115.0) (2021-12-05)
### Features
* creating java backport ([#895](https://www.github.com/googleapis/java-pubsub/issues/895)) ([51b01e2](https://www.github.com/googleapis/java-pubsub/commit/51b01e254a4be87a8a779fbc5da697c70920d82f))
### Bug Fixes
* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-pubsub/issues/1266)) ([#888](https://www.github.com/googleapis/java-pubsub/issues/888)) ([ed3ae2f](https://www.github.com/googleapis/java-pubsub/commit/ed3ae2fb0a0c72073f6bae5dc4111424740fd883))
### Dependencies
* update dependency com.google.cloud:google-cloud-core to v2.3.0 ([#913](https://www.github.com/googleapis/java-pubsub/issues/913)) ([adfd456](https://www.github.com/googleapis/java-pubsub/commit/adfd4562a8041d71af65cd98cf1d17b881e35dd3))
* update dependency com.google.cloud:google-cloud-core to v2.3.1 ([#927](https://www.github.com/googleapis/java-pubsub/issues/927)) ([9fcc996](https://www.github.com/googleapis/java-pubsub/commit/9fcc9965284f6a57dc79f31eb96a2e430cef72e4))
* update dependency com.google.cloud:google-cloud-core to v2.3.2 ([#941](https://www.github.com/googleapis/java-pubsub/issues/941)) ([41f881b](https://www.github.com/googleapis/java-pubsub/commit/41f881b2d075f9ee730f5eaf24885146d9fadccf))
* update dependency com.google.cloud:google-cloud-core to v2.3.3 ([#943](https://www.github.com/googleapis/java-pubsub/issues/943)) ([df3a5fe](https://www.github.com/googleapis/java-pubsub/commit/df3a5fecd4d87ae79cba312109242146b84f9e55))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#919](https://www.github.com/googleapis/java-pubsub/issues/919)) ([4adf335](https://www.github.com/googleapis/java-pubsub/commit/4adf335b78ce6b13af22c3c3a64c4ea1a24f05cd))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#942](https://www.github.com/googleapis/java-pubsub/issues/942)) ([44cdcf5](https://www.github.com/googleapis/java-pubsub/commit/44cdcf5d3f1815654b9b255c1096e290a7db9030))
* update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#901](https://www.github.com/googleapis/java-pubsub/issues/901)) ([8733144](https://www.github.com/googleapis/java-pubsub/commit/8733144854aaebfec0cd5f03ab14d820c6d22c0e))
* update dependency com.google.protobuf:protobuf-java-util to v3.19.1 ([#885](https://www.github.com/googleapis/java-pubsub/issues/885)) ([d0a02a9](https://www.github.com/googleapis/java-pubsub/commit/d0a02a9f320b254a3e4ef60bfff47a6bb3a2427f))
* update dependency org.apache.avro:avro to v1.11.0 ([#894](https://www.github.com/googleapis/java-pubsub/issues/894)) ([b7ba1a8](https://www.github.com/googleapis/java-pubsub/commit/b7ba1a871c4c26f50d87b41c2627b6e6aef63b3c))
* update gson to 2.8.9 ([ec97e93](https://www.github.com/googleapis/java-pubsub/commit/ec97e93ae53666d5c5cad71821f12cefa4fbaf2e))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 26 ++++++++++++++++++++++++++
google-cloud-pubsub-bom/pom.xml | 8 ++++----
google-cloud-pubsub/pom.xml | 4 ++--
grpc-google-cloud-pubsub-v1/pom.xml | 4 ++--
pom.xml | 8 ++++----
proto-google-cloud-pubsub-v1/pom.xml | 4 ++--
samples/snapshot/pom.xml | 2 +-
versions.txt | 6 +++---
8 files changed, 44 insertions(+), 18 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 844c15108..56f92b58b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,31 @@
# Changelog
+## [1.115.0](https://www.github.com/googleapis/java-pubsub/compare/v1.114.7...v1.115.0) (2021-12-05)
+
+
+### Features
+
+* creating java backport ([#895](https://www.github.com/googleapis/java-pubsub/issues/895)) ([51b01e2](https://www.github.com/googleapis/java-pubsub/commit/51b01e254a4be87a8a779fbc5da697c70920d82f))
+
+
+### Bug Fixes
+
+* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-pubsub/issues/1266)) ([#888](https://www.github.com/googleapis/java-pubsub/issues/888)) ([ed3ae2f](https://www.github.com/googleapis/java-pubsub/commit/ed3ae2fb0a0c72073f6bae5dc4111424740fd883))
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-core to v2.3.0 ([#913](https://www.github.com/googleapis/java-pubsub/issues/913)) ([adfd456](https://www.github.com/googleapis/java-pubsub/commit/adfd4562a8041d71af65cd98cf1d17b881e35dd3))
+* update dependency com.google.cloud:google-cloud-core to v2.3.1 ([#927](https://www.github.com/googleapis/java-pubsub/issues/927)) ([9fcc996](https://www.github.com/googleapis/java-pubsub/commit/9fcc9965284f6a57dc79f31eb96a2e430cef72e4))
+* update dependency com.google.cloud:google-cloud-core to v2.3.2 ([#941](https://www.github.com/googleapis/java-pubsub/issues/941)) ([41f881b](https://www.github.com/googleapis/java-pubsub/commit/41f881b2d075f9ee730f5eaf24885146d9fadccf))
+* update dependency com.google.cloud:google-cloud-core to v2.3.3 ([#943](https://www.github.com/googleapis/java-pubsub/issues/943)) ([df3a5fe](https://www.github.com/googleapis/java-pubsub/commit/df3a5fecd4d87ae79cba312109242146b84f9e55))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#919](https://www.github.com/googleapis/java-pubsub/issues/919)) ([4adf335](https://www.github.com/googleapis/java-pubsub/commit/4adf335b78ce6b13af22c3c3a64c4ea1a24f05cd))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#942](https://www.github.com/googleapis/java-pubsub/issues/942)) ([44cdcf5](https://www.github.com/googleapis/java-pubsub/commit/44cdcf5d3f1815654b9b255c1096e290a7db9030))
+* update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#901](https://www.github.com/googleapis/java-pubsub/issues/901)) ([8733144](https://www.github.com/googleapis/java-pubsub/commit/8733144854aaebfec0cd5f03ab14d820c6d22c0e))
+* update dependency com.google.protobuf:protobuf-java-util to v3.19.1 ([#885](https://www.github.com/googleapis/java-pubsub/issues/885)) ([d0a02a9](https://www.github.com/googleapis/java-pubsub/commit/d0a02a9f320b254a3e4ef60bfff47a6bb3a2427f))
+* update dependency org.apache.avro:avro to v1.11.0 ([#894](https://www.github.com/googleapis/java-pubsub/issues/894)) ([b7ba1a8](https://www.github.com/googleapis/java-pubsub/commit/b7ba1a871c4c26f50d87b41c2627b6e6aef63b3c))
+* update gson to 2.8.9 ([ec97e93](https://www.github.com/googleapis/java-pubsub/commit/ec97e93ae53666d5c5cad71821f12cefa4fbaf2e))
+
### [1.114.7](https://www.github.com/googleapis/java-pubsub/compare/v1.114.6...v1.114.7) (2021-10-19)
diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml
index 2519a0eb6..ced5ea112 100644
--- a/google-cloud-pubsub-bom/pom.xml
+++ b/google-cloud-pubsub-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-pubsub-bom
- 1.114.8-SNAPSHOT
+ 1.115.0
pom
com.google.cloud
@@ -52,17 +52,17 @@
com.google.cloud
google-cloud-pubsub
- 1.114.8-SNAPSHOT
+ 1.115.0
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml
index a0b0644ff..7b79ff876 100644
--- a/google-cloud-pubsub/pom.xml
+++ b/google-cloud-pubsub/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-pubsub
- 1.114.8-SNAPSHOT
+ 1.115.0
jar
Google Cloud Pub/Sub
https://github.com/googleapis/java-pubsub
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-pubsub-parent
- 1.114.8-SNAPSHOT
+ 1.115.0
google-cloud-pubsub
diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml
index e61f7eb21..068478a89 100644
--- a/grpc-google-cloud-pubsub-v1/pom.xml
+++ b/grpc-google-cloud-pubsub-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
grpc-google-cloud-pubsub-v1
GRPC library for grpc-google-cloud-pubsub-v1
com.google.cloud
google-cloud-pubsub-parent
- 1.114.8-SNAPSHOT
+ 1.115.0
diff --git a/pom.xml b/pom.xml
index b225e6d12..eb90896c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-pubsub-parent
pom
- 1.114.8-SNAPSHOT
+ 1.115.0
Google Cloud Pub/Sub Parent
https://github.com/googleapis/java-pubsub
@@ -69,17 +69,17 @@
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
com.google.cloud
google-cloud-pubsub
- 1.114.8-SNAPSHOT
+ 1.115.0
diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml
index 0a92c26a4..3d94f06a8 100644
--- a/proto-google-cloud-pubsub-v1/pom.xml
+++ b/proto-google-cloud-pubsub-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.96.8-SNAPSHOT
+ 1.97.0
proto-google-cloud-pubsub-v1
PROTO library for proto-google-cloud-pubsub-v1
com.google.cloud
google-cloud-pubsub-parent
- 1.114.8-SNAPSHOT
+ 1.115.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 3c1cfeabf..d6ba900f6 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -43,7 +43,7 @@
com.google.cloud
google-cloud-pubsub
- 1.114.8-SNAPSHOT
+ 1.115.0
diff --git a/versions.txt b/versions.txt
index fab6b0810..75deb1c0a 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-pubsub:1.114.7:1.114.8-SNAPSHOT
-grpc-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT
-proto-google-cloud-pubsub-v1:1.96.7:1.96.8-SNAPSHOT
+google-cloud-pubsub:1.115.0:1.115.0
+grpc-google-cloud-pubsub-v1:1.97.0:1.97.0
+proto-google-cloud-pubsub-v1:1.97.0:1.97.0