diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 548523021..04c4bc231 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -37,6 +37,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -724,7 +726,7 @@ public final UnaryCallable listTopicsCall // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * *

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

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

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

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

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

Sample code: + * + *


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

Sample code: + * + *


+   * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
+   *   TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]");
+   *   DetachSubscriptionRequest request = DetachSubscriptionRequest.newBuilder()
+   *     .setSubscription(subscription.toString())
+   *     .build();
+   *   ApiFuture<DetachSubscriptionResponse> future = topicAdminClient.detachSubscriptionCallable().futureCall(request);
+   *   // Do something
+   *   DetachSubscriptionResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + detachSubscriptionCallable() { + return stub.detachSubscriptionCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java index 59119e19b..7c79aabc7 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java @@ -39,6 +39,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -150,6 +152,12 @@ public UnaryCallSettings getIamPolicySettings() { return ((PublisherStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** Returns the object with the settings used for calls to detachSubscription. */ + public UnaryCallSettings + detachSubscriptionSettings() { + return ((PublisherStubSettings) getStubSettings()).detachSubscriptionSettings(); + } + public static final TopicAdminSettings create(PublisherStubSettings stub) throws IOException { return new TopicAdminSettings.Builder(stub.toBuilder()).build(); } @@ -310,6 +318,12 @@ public UnaryCallSettings.Builder getIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** Returns the builder for the settings used for calls to detachSubscription. */ + public UnaryCallSettings.Builder + detachSubscriptionSettings() { + return getStubSettingsBuilder().detachSubscriptionSettings(); + } + @Override public TopicAdminSettings build() throws IOException { return new TopicAdminSettings(this); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java index 02baa7378..52cdf25dc 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java @@ -35,6 +35,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -152,6 +154,16 @@ public class GrpcPublisherStub extends PublisherStub { .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + detachSubscriptionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.pubsub.v1.Publisher/DetachSubscription") + .setRequestMarshaller( + ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance())) + .build(); private final BackgroundResource backgroundResources; @@ -174,6 +186,8 @@ public class GrpcPublisherStub extends PublisherStub { private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable + detachSubscriptionCallable; private final GrpcStubCallableFactory callableFactory; @@ -360,6 +374,20 @@ public Map extract(TestIamPermissionsRequest request) { } }) .build(); + GrpcCallSettings + detachSubscriptionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(detachSubscriptionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DetachSubscriptionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("subscription", String.valueOf(request.getSubscription())); + return params.build(); + } + }) + .build(); this.createTopicCallable = callableFactory.createUnaryCallable( @@ -413,6 +441,11 @@ public Map extract(TestIamPermissionsRequest request) { testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.detachSubscriptionCallable = + callableFactory.createUnaryCallable( + detachSubscriptionTransportSettings, + settings.detachSubscriptionSettings(), + clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -478,6 +511,11 @@ public UnaryCallable getIamPolicyCallable() { return testIamPermissionsCallable; } + public UnaryCallable + detachSubscriptionCallable() { + return detachSubscriptionCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java index 6ff2d02f8..93cdf2f03 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java @@ -29,6 +29,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -114,6 +116,11 @@ public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public UnaryCallable + detachSubscriptionCallable() { + throw new UnsupportedOperationException("Not implemented: detachSubscriptionCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index ee84a4ab3..457731c61 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -60,6 +60,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -137,6 +139,8 @@ public class PublisherStubSettings extends StubSettings { private final UnaryCallSettings getIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings + detachSubscriptionSettings; /** Returns the object with the settings used for calls to createTopic. */ public UnaryCallSettings createTopicSettings() { @@ -201,6 +205,12 @@ public UnaryCallSettings getIamPolicySettings() { return testIamPermissionsSettings; } + /** Returns the object with the settings used for calls to detachSubscription. */ + public UnaryCallSettings + detachSubscriptionSettings() { + return detachSubscriptionSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public PublisherStub createStub() throws IOException { if (getTransportChannelProvider() @@ -280,6 +290,7 @@ protected PublisherStubSettings(Builder settingsBuilder) throws IOException { setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + detachSubscriptionSettings = settingsBuilder.detachSubscriptionSettings().build(); } private static final PagedListDescriptor @@ -551,6 +562,8 @@ public static class Builder extends StubSettings.Builder getIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder + detachSubscriptionSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -563,6 +576,8 @@ public static class Builder extends StubSettings.BuildernewArrayList( StatusCode.Code.ABORTED, StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); + definitions.put( + "non_idempotent2", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "non_idempotent", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); @@ -648,6 +663,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + detachSubscriptionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( createTopicSettings, @@ -660,7 +677,8 @@ protected Builder(ClientContext clientContext) { deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + detachSubscriptionSettings); initDefaults(this); } @@ -743,6 +761,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .detachSubscriptionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent2")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + return builder; } @@ -760,6 +783,7 @@ protected Builder(PublisherStubSettings settings) { setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + detachSubscriptionSettings = settings.detachSubscriptionSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -773,7 +797,8 @@ protected Builder(PublisherStubSettings settings) { deleteTopicSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + detachSubscriptionSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -855,6 +880,12 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the builder for the settings used for calls to detachSubscription. */ + public UnaryCallSettings.Builder + detachSubscriptionSettings() { + return detachSubscriptionSettings; + } + @Override public PublisherStubSettings build() throws IOException { return new PublisherStubSettings(this); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java index 0d49c4288..420a757ad 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java @@ -19,6 +19,8 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -185,4 +187,20 @@ public void deleteTopic(DeleteTopicRequest request, StreamObserver respon responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void detachSubscription( + DetachSubscriptionRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DetachSubscriptionResponse) { + requests.add(request); + responseObserver.onNext((DetachSubscriptionResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java index 43510c154..3bc0c77a3 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java @@ -38,6 +38,8 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.pubsub.v1.DeleteTopicRequest; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.GetTopicRequest; import com.google.pubsub.v1.ListTopicSnapshotsRequest; import com.google.pubsub.v1.ListTopicSnapshotsResponse; @@ -622,4 +624,46 @@ public void testIamPermissionsExceptionTest() throws Exception { // Expected exception } } + + @Test + @SuppressWarnings("all") + public void detachSubscriptionTest() { + DetachSubscriptionResponse expectedResponse = DetachSubscriptionResponse.newBuilder().build(); + mockPublisher.addResponse(expectedResponse); + + TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + DetachSubscriptionRequest request = + DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build(); + + DetachSubscriptionResponse actualResponse = client.detachSubscription(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPublisher.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DetachSubscriptionRequest actualRequest = (DetachSubscriptionRequest) actualRequests.get(0); + + Assert.assertEquals(subscription, TopicName.parse(actualRequest.getSubscription())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void detachSubscriptionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockPublisher.addException(exception); + + try { + TopicName subscription = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); + DetachSubscriptionRequest request = + DetachSubscriptionRequest.newBuilder().setSubscription(subscription.toString()).build(); + + client.detachSubscription(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java index a4df9a4bf..8ddccd07f 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java @@ -369,6 +369,51 @@ private PublisherGrpc() {} return getDeleteTopicMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DetachSubscription", + requestType = com.google.pubsub.v1.DetachSubscriptionRequest.class, + responseType = com.google.pubsub.v1.DetachSubscriptionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod() { + io.grpc.MethodDescriptor< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse> + getDetachSubscriptionMethod; + if ((getDetachSubscriptionMethod = PublisherGrpc.getDetachSubscriptionMethod) == null) { + synchronized (PublisherGrpc.class) { + if ((getDetachSubscriptionMethod = PublisherGrpc.getDetachSubscriptionMethod) == null) { + PublisherGrpc.getDetachSubscriptionMethod = + getDetachSubscriptionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DetachSubscription")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new PublisherMethodDescriptorSupplier("DetachSubscription")) + .build(); + } + } + } + return getDetachSubscriptionMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static PublisherStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -492,7 +537,7 @@ public void listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions( @@ -538,6 +583,23 @@ public void deleteTopic( asyncUnimplementedUnaryCall(getDeleteTopicMethod(), responseObserver); } + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public void detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getDetachSubscriptionMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -590,6 +652,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.pubsub.v1.DeleteTopicRequest, com.google.protobuf.Empty>( this, METHODID_DELETE_TOPIC))) + .addMethod( + getDetachSubscriptionMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse>( + this, METHODID_DETACH_SUBSCRIPTION))) .build(); } } @@ -694,7 +763,7 @@ public void listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions( @@ -748,6 +817,26 @@ public void deleteTopic( request, responseObserver); } + + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public void detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -835,7 +924,7 @@ public com.google.pubsub.v1.ListTopicsResponse listTopics( * * *
-     * Lists the names of the subscriptions on this topic.
+     * Lists the names of the attached subscriptions on this topic.
      * 
*/ public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions( @@ -876,6 +965,22 @@ public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots( public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request) { return blockingUnaryCall(getChannel(), getDeleteTopicMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Detaches a subscription from this topic. All messages retained in the
+     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
+     * will return FAILED_PRECONDITION. If the subscription is a push
+     * subscription, pushes to the endpoint will stop.
+     * 
+ */ + public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request) { + return blockingUnaryCall( + getChannel(), getDetachSubscriptionMethod(), getCallOptions(), request); + } } /** @@ -969,7 +1074,7 @@ public com.google.common.util.concurrent.ListenableFuture - * Lists the names of the subscriptions on this topic. + * Lists the names of the attached subscriptions on this topic. * */ public com.google.common.util.concurrent.ListenableFuture< @@ -1014,6 +1119,23 @@ public com.google.common.util.concurrent.ListenableFuture + * Detaches a subscription from this topic. All messages retained in the + * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests + * will return FAILED_PRECONDITION. If the subscription is a push + * subscription, pushes to the endpoint will stop. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.pubsub.v1.DetachSubscriptionResponse> + detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request) { + return futureUnaryCall( + getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_TOPIC = 0; @@ -1024,6 +1146,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1085,6 +1208,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.pubsub.v1.DeleteTopicRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DETACH_SUBSCRIPTION: + serviceImpl.detachSubscription( + (com.google.pubsub.v1.DetachSubscriptionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1157,6 +1286,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListTopicSubscriptionsMethod()) .addMethod(getListTopicSnapshotsMethod()) .addMethod(getDeleteTopicMethod()) + .addMethod(getDetachSubscriptionMethod()) .build(); } } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java new file mode 100644 index 000000000..7e069d6cc --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + * + * + *
+ * Request for the DetachSubscription method.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} + */ +public final class DetachSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionRequest) + DetachSubscriptionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetachSubscriptionRequest.newBuilder() to construct. + private DetachSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetachSubscriptionRequest() { + subscription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetachSubscriptionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetachSubscriptionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + subscription_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionRequest.class, + com.google.pubsub.v1.DetachSubscriptionRequest.Builder.class); + } + + public static final int SUBSCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object subscription_; + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscription_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + public com.google.protobuf.ByteString getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSubscriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSubscriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.DetachSubscriptionRequest)) { + return super.equals(obj); + } + com.google.pubsub.v1.DetachSubscriptionRequest other = + (com.google.pubsub.v1.DetachSubscriptionRequest) obj; + + if (!getSubscription().equals(other.getSubscription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getSubscription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.DetachSubscriptionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the DetachSubscription method.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionRequest) + com.google.pubsub.v1.DetachSubscriptionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionRequest.class, + com.google.pubsub.v1.DetachSubscriptionRequest.Builder.class); + } + + // Construct using com.google.pubsub.v1.DetachSubscriptionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + subscription_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest getDefaultInstanceForType() { + return com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest build() { + com.google.pubsub.v1.DetachSubscriptionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest buildPartial() { + com.google.pubsub.v1.DetachSubscriptionRequest result = + new com.google.pubsub.v1.DetachSubscriptionRequest(this); + result.subscription_ = subscription_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.DetachSubscriptionRequest) { + return mergeFrom((com.google.pubsub.v1.DetachSubscriptionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.DetachSubscriptionRequest other) { + if (other == com.google.pubsub.v1.DetachSubscriptionRequest.getDefaultInstance()) return this; + if (!other.getSubscription().isEmpty()) { + subscription_ = other.subscription_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.DetachSubscriptionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.DetachSubscriptionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object subscription_ = ""; + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + public java.lang.String getSubscription() { + java.lang.Object ref = subscription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + public com.google.protobuf.ByteString getSubscriptionBytes() { + java.lang.Object ref = subscription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subscription_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSubscription() { + + subscription_ = getDefaultInstance().getSubscription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subscription to detach.
+     * Format is `projects/{project}/subscriptions/{subscription}`.
+     * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for subscription to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subscription_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DetachSubscriptionRequest) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.DetachSubscriptionRequest) + private static final com.google.pubsub.v1.DetachSubscriptionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.DetachSubscriptionRequest(); + } + + public static com.google.pubsub.v1.DetachSubscriptionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetachSubscriptionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetachSubscriptionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java new file mode 100644 index 000000000..27cd842bc --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface DetachSubscriptionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The subscription. + */ + java.lang.String getSubscription(); + /** + * + * + *
+   * Required. The subscription to detach.
+   * Format is `projects/{project}/subscriptions/{subscription}`.
+   * 
+ * + * + * string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for subscription. + */ + com.google.protobuf.ByteString getSubscriptionBytes(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java new file mode 100644 index 000000000..a473832a2 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + * + * + *
+ * Response for the DetachSubscription method.
+ * Reserved for future use.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} + */ +public final class DetachSubscriptionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionResponse) + DetachSubscriptionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetachSubscriptionResponse.newBuilder() to construct. + private DetachSubscriptionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetachSubscriptionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetachSubscriptionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DetachSubscriptionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionResponse.class, + com.google.pubsub.v1.DetachSubscriptionResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.DetachSubscriptionResponse)) { + return super.equals(obj); + } + com.google.pubsub.v1.DetachSubscriptionResponse other = + (com.google.pubsub.v1.DetachSubscriptionResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.DetachSubscriptionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the DetachSubscription method.
+   * Reserved for future use.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionResponse) + com.google.pubsub.v1.DetachSubscriptionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.DetachSubscriptionResponse.class, + com.google.pubsub.v1.DetachSubscriptionResponse.Builder.class); + } + + // Construct using com.google.pubsub.v1.DetachSubscriptionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse getDefaultInstanceForType() { + return com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse build() { + com.google.pubsub.v1.DetachSubscriptionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse buildPartial() { + com.google.pubsub.v1.DetachSubscriptionResponse result = + new com.google.pubsub.v1.DetachSubscriptionResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.DetachSubscriptionResponse) { + return mergeFrom((com.google.pubsub.v1.DetachSubscriptionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.DetachSubscriptionResponse other) { + if (other == com.google.pubsub.v1.DetachSubscriptionResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.DetachSubscriptionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.DetachSubscriptionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DetachSubscriptionResponse) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.DetachSubscriptionResponse) + private static final com.google.pubsub.v1.DetachSubscriptionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.DetachSubscriptionResponse(); + } + + public static com.google.pubsub.v1.DetachSubscriptionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetachSubscriptionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetachSubscriptionResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.DetachSubscriptionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java new file mode 100644 index 000000000..ce75ecb80 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface DetachSubscriptionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java index 96601b5fd..fbf2b4f23 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java @@ -133,7 +133,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -147,7 +147,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -161,7 +161,7 @@ public int getSubscriptionsCount() { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -176,7 +176,7 @@ public java.lang.String getSubscriptions(int index) { * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -606,7 +606,7 @@ private void ensureSubscriptionsIsMutable() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -620,7 +620,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -634,7 +634,7 @@ public int getSubscriptionsCount() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -649,7 +649,7 @@ public java.lang.String getSubscriptions(int index) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -664,7 +664,7 @@ public com.google.protobuf.ByteString getSubscriptionsBytes(int index) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -686,7 +686,7 @@ public Builder setSubscriptions(int index, java.lang.String value) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -707,7 +707,7 @@ public Builder addSubscriptions(java.lang.String value) { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -725,7 +725,7 @@ public Builder addAllSubscriptions(java.lang.Iterable values) * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -742,7 +742,7 @@ public Builder clearSubscriptions() { * * *
-     * The names of the subscriptions that match the request.
+     * The names of subscriptions attached to the topic specified in the request.
      * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java index 265a9dd3a..dffc961db 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java @@ -27,7 +27,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -39,7 +39,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -51,7 +51,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } @@ -64,7 +64,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * * *
-   * The names of the subscriptions that match the request.
+   * The names of subscriptions attached to the topic specified in the request.
    * 
* * repeated string subscriptions = 1 [(.google.api.resource_reference) = { ... } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 419f8a825..3ac4f6571 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -91,6 +91,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Subscription_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -277,216 +285,223 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oken\030\003 \001(\t\"H\n\032ListTopicSnapshotsResponse" + "\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_token\030\002" + " \001(\t\"H\n\022DeleteTopicRequest\0222\n\005topic\030\001 \001(" - + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"\256" - + "\005\n\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005to" - + "pic\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com" - + "/Topic\0221\n\013push_config\030\004 \001(\0132\034.google.pub" - + "sub.v1.PushConfig\022\034\n\024ack_deadline_second" - + "s\030\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022=" - + "\n\032message_retention_duration\030\010 \001(\0132\031.goo" - + "gle.protobuf.Duration\022:\n\006labels\030\t \003(\0132*." - + "google.pubsub.v1.Subscription.LabelsEntr" - + "y\022\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021ex" - + "piration_policy\030\013 \001(\0132\".google.pubsub.v1" - + ".ExpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dea" - + "d_letter_policy\030\r \001(\0132\".google.pubsub.v1" - + ".DeadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132" - + "\035.google.pubsub.v1.RetryPolicy\032-\n\013Labels" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352" - + "AU\n\"pubsub.googleapis.com/Subscription\022/" - + "projects/{project}/subscriptions/{subscr" - + "iption}\"u\n\013RetryPolicy\0222\n\017minimum_backof" - + "f\030\001 \001(\0132\031.google.protobuf.Duration\0222\n\017ma" - + "ximum_backoff\030\002 \001(\0132\031.google.protobuf.Du" - + "ration\"L\n\020DeadLetterPolicy\022\031\n\021dead_lette" - + "r_topic\030\001 \001(\t\022\035\n\025max_delivery_attempts\030\002" - + " \001(\005\":\n\020ExpirationPolicy\022&\n\003ttl\030\001 \001(\0132\031." - + "google.protobuf.Duration\"\255\002\n\nPushConfig\022" - + "\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003" - + "(\0132,.google.pubsub.v1.PushConfig.Attribu" - + "tesEntry\022<\n\noidc_token\030\003 \001(\0132&.google.pu" - + "bsub.v1.PushConfig.OidcTokenH\000\032<\n\tOidcTo" - + "ken\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010au" - + "dience\030\002 \001(\t\0321\n\017AttributesEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025authenticatio" - + "n_method\"m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 " - + "\001(\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1." - + "PubsubMessage\022\030\n\020delivery_attempt\030\003 \001(\005\"" - + "Z\n\026GetSubscriptionRequest\022@\n\014subscriptio" - + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S" - + "ubscription\"\214\001\n\031UpdateSubscriptionReques" - + "t\0229\n\014subscription\030\001 \001(\0132\036.google.pubsub." - + "v1.SubscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001(" - + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\207\001\n\030L" - + "istSubscriptionsRequest\022D\n\007project\030\001 \001(\t" - + "B3\340A\002\372A-\n+cloudresourcemanager.googleapi" - + "s.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" - + "_token\030\003 \001(\t\"k\n\031ListSubscriptionsRespons" - + "e\0225\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub" - + ".v1.Subscription\022\027\n\017next_page_token\030\002 \001(" - + "\t\"]\n\031DeleteSubscriptionRequest\022@\n\014subscr" - + "iption\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis." - + "com/Subscription\"\223\001\n\027ModifyPushConfigReq" - + "uest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubs" - + "ub.googleapis.com/Subscription\0226\n\013push_c" - + "onfig\030\002 \001(\0132\034.google.pubsub.v1.PushConfi" - + "gB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001" - + " \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subs" - + "cription\022!\n\022return_immediately\030\002 \001(\010B\005\030\001" - + "\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"L\n\014PullRe" - + "sponse\022<\n\021received_messages\030\001 \003(\0132!.goog" - + "le.pubsub.v1.ReceivedMessage\"\225\001\n\030ModifyA" - + "ckDeadlineRequest\022@\n\014subscription\030\001 \001(\tB" - + "*\340A\002\372A$\n\"pubsub.googleapis.com/Subscript" - + "ion\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadlin" - + "e_seconds\030\003 \001(\005B\003\340A\002\"l\n\022AcknowledgeReque" + + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\"V" + + "\n\031DetachSubscriptionRequest\0229\n\014subscript" + + "ion\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com" + + "/Topic\"\034\n\032DetachSubscriptionResponse\"\256\005\n" + + "\014Subscription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005topi" + + "c\030\002 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/T" + + "opic\0221\n\013push_config\030\004 \001(\0132\034.google.pubsu" + + "b.v1.PushConfig\022\034\n\024ack_deadline_seconds\030" + + "\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022=\n\032" + + "message_retention_duration\030\010 \001(\0132\031.googl" + + "e.protobuf.Duration\022:\n\006labels\030\t \003(\0132*.go" + + "ogle.pubsub.v1.Subscription.LabelsEntry\022" + + "\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021expi" + + "ration_policy\030\013 \001(\0132\".google.pubsub.v1.E" + + "xpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dead_" + + "letter_policy\030\r \001(\0132\".google.pubsub.v1.D" + + "eadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132\035." + + "google.pubsub.v1.RetryPolicy\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU" + + "\n\"pubsub.googleapis.com/Subscription\022/pr" + + "ojects/{project}/subscriptions/{subscrip" + + "tion}\"u\n\013RetryPolicy\0222\n\017minimum_backoff\030" + + "\001 \001(\0132\031.google.protobuf.Duration\0222\n\017maxi" + + "mum_backoff\030\002 \001(\0132\031.google.protobuf.Dura" + + "tion\"L\n\020DeadLetterPolicy\022\031\n\021dead_letter_" + + "topic\030\001 \001(\t\022\035\n\025max_delivery_attempts\030\002 \001" + + "(\005\":\n\020ExpirationPolicy\022&\n\003ttl\030\001 \001(\0132\031.go" + + "ogle.protobuf.Duration\"\255\002\n\nPushConfig\022\025\n" + + "\rpush_endpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003(\013" + + "2,.google.pubsub.v1.PushConfig.Attribute" + + "sEntry\022<\n\noidc_token\030\003 \001(\0132&.google.pubs" + + "ub.v1.PushConfig.OidcTokenH\000\032<\n\tOidcToke" + + "n\022\035\n\025service_account_email\030\001 \001(\t\022\020\n\010audi" + + "ence\030\002 \001(\t\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025authentication_" + + "method\"m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(" + + "\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1.Pu" + + "bsubMessage\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n" + + "\026GetSubscriptionRequest\022@\n\014subscription\030" + + "\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Sub" + + "scription\"\214\001\n\031UpdateSubscriptionRequest\022" + + "9\n\014subscription\030\001 \001(\0132\036.google.pubsub.v1" + + ".SubscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMaskB\003\340A\002\"\207\001\n\030Lis" + + "tSubscriptionsRequest\022D\n\007project\030\001 \001(\tB3" + + "\340A\002\372A-\n+cloudresourcemanager.googleapis." + + "com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" + + "oken\030\003 \001(\t\"k\n\031ListSubscriptionsResponse\022" + + "5\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub.v" + + "1.Subscription\022\027\n\017next_page_token\030\002 \001(\t\"" + + "]\n\031DeleteSubscriptionRequest\022@\n\014subscrip" + + "tion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" + + "m/Subscription\"\223\001\n\027ModifyPushConfigReque" + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub" - + ".googleapis.com/Subscription\022\024\n\007ack_ids\030" - + "\002 \003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequest\022@\n\014s" - + "ubscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.google" - + "apis.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037" - + "\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027modif" - + "y_deadline_ack_ids\030\004 \003(\t\022(\n\033stream_ack_d" - + "eadline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030" - + "\006 \001(\t\"U\n\025StreamingPullResponse\022<\n\021receiv" - + "ed_messages\030\001 \003(\0132!.google.pubsub.v1.Rec" - + "eivedMessage\"\203\002\n\025CreateSnapshotRequest\0224" - + "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis." - + "com/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372" - + "A$\n\"pubsub.googleapis.com/Subscription\022C" - + "\n\006labels\030\003 \003(\01323.google.pubsub.v1.Create" - + "SnapshotRequest.LabelsEntry\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025U" - + "pdateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032" - + ".google.pubsub.v1.SnapshotB\003\340A\002\0224\n\013updat" - + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" - + "B\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topi" - + "c\030\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topi" - + "c\022/\n\013expire_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp\0226\n\006labels\030\004 \003(\0132&.google.pubs" - + "ub.v1.Snapshot.LabelsEntry\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036" - + "pubsub.googleapis.com/Snapshot\022\'projects" - + "/{project}/snapshots/{snapshot}\"N\n\022GetSn" - + "apshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n" - + "\036pubsub.googleapis.com/Snapshot\"\203\001\n\024List" - + "SnapshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A" - + "-\n+cloudresourcemanager.googleapis.com/P" - + "roject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" - + "\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapsh" - + "ots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n" - + "\017next_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshot" - + "Request\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsu" - + "b.googleapis.com/Snapshot\"\276\001\n\013SeekReques" - + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." - + "googleapis.com/Subscription\022*\n\004time\030\002 \001(" - + "\0132\032.google.protobuf.TimestampH\000\0227\n\010snaps" - + "hot\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Sn" - + "apshotH\000B\010\n\006target\"\016\n\014SeekResponse2\363\t\n\tP" - + "ublisher\022q\n\013CreateTopic\022\027.google.pubsub." - + "v1.Topic\032\027.google.pubsub.v1.Topic\"0\202\323\344\223\002" - + "#\032\036/v1/{name=projects/*/topics/*}:\001*\332A\004n" - + "ame\022}\n\013UpdateTopic\022$.google.pubsub.v1.Up" - + "dateTopicRequest\032\027.google.pubsub.v1.Topi" - + "c\"/\202\323\344\223\002)2$/v1/{topic.name=projects/*/to" - + "pics/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v" - + "1.PublishRequest\032!.google.pubsub.v1.Publ" - + "ishResponse\"C\202\323\344\223\002,\"\'/v1/{topic=projects" - + "/*/topics/*}:publish:\001*\332A\016topic,messages" - + "\022w\n\010GetTopic\022!.google.pubsub.v1.GetTopic" - + "Request\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002!" - + "\022\037/v1/{topic=projects/*/topics/*}\332A\005topi" - + "c\022\212\001\n\nListTopics\022#.google.pubsub.v1.List" - + "TopicsRequest\032$.google.pubsub.v1.ListTop" - + "icsResponse\"1\202\323\344\223\002!\022\037/v1/{project=projec" - + "ts/*}/topics\332A\007project\022\272\001\n\026ListTopicSubs" - + "criptions\022/.google.pubsub.v1.ListTopicSu" - + "bscriptionsRequest\0320.google.pubsub.v1.Li" - + "stTopicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v" - + "1/{topic=projects/*/topics/*}/subscripti" - + "ons\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.goo" - + "gle.pubsub.v1.ListTopicSnapshotsRequest\032" - + ",.google.pubsub.v1.ListTopicSnapshotsRes" - + "ponse\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/top" - + "ics/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022" - + "$.google.pubsub.v1.DeleteTopicRequest\032\026." - + "google.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topi" - + "c=projects/*/topics/*}\332A\005topic\032p\312A\025pubsu" - + "b.googleapis.com\322AUhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/pubsub2\203\025\n\nSubscriber\022" - + "\264\001\n\022CreateSubscription\022\036.google.pubsub.v" - + "1.Subscription\032\036.google.pubsub.v1.Subscr" - + "iption\"^\202\323\344\223\002*\032%/v1/{name=projects/*/sub" - + "scriptions/*}:\001*\332A+name,topic,push_confi" - + "g,ack_deadline_seconds\022\241\001\n\017GetSubscripti" - + "on\022(.google.pubsub.v1.GetSubscriptionReq" - + "uest\032\036.google.pubsub.v1.Subscription\"D\202\323" - + "\344\223\002/\022-/v1/{subscription=projects/*/subsc" - + "riptions/*}\332A\014subscription\022\240\001\n\022UpdateSub" - + "scription\022+.google.pubsub.v1.UpdateSubsc" - + "riptionRequest\032\036.google.pubsub.v1.Subscr" - + "iption\"=\202\323\344\223\002722/v1/{subscription.name=p" - + "rojects/*/subscriptions/*}:\001*\022\246\001\n\021ListSu" - + "bscriptions\022*.google.pubsub.v1.ListSubsc" - + "riptionsRequest\032+.google.pubsub.v1.ListS" - + "ubscriptionsResponse\"8\202\323\344\223\002(\022&/v1/{proje" - + "ct=projects/*}/subscriptions\332A\007project\022\237" - + "\001\n\022DeleteSubscription\022+.google.pubsub.v1" - + ".DeleteSubscriptionRequest\032\026.google.prot" - + "obuf.Empty\"D\202\323\344\223\002/*-/v1/{subscription=pr" - + "ojects/*/subscriptions/*}\332A\014subscription" - + "\022\317\001\n\021ModifyAckDeadline\022*.google.pubsub.v" - + "1.ModifyAckDeadlineRequest\032\026.google.prot" - + "obuf.Empty\"v\202\323\344\223\002D\"?/v1/{subscription=pr" - + "ojects/*/subscriptions/*}:modifyAckDeadl" - + "ine:\001*\332A)subscription,ack_ids,ack_deadli" - + "ne_seconds\022\250\001\n\013Acknowledge\022$.google.pubs" - + "ub.v1.AcknowledgeRequest\032\026.google.protob" - + "uf.Empty\"[\202\323\344\223\002>\"9/v1/{subscription=proj" - + "ects/*/subscriptions/*}:acknowledge:\001*\332A" - + "\024subscription,ack_ids\022\263\001\n\004Pull\022\035.google." - + "pubsub.v1.PullRequest\032\036.google.pubsub.v1" - + ".PullResponse\"l\202\323\344\223\0027\"2/v1/{subscription" - + "=projects/*/subscriptions/*}:pull:\001*\332A,s" - + "ubscription,return_immediately,max_messa" - + "ges\022f\n\rStreamingPull\022&.google.pubsub.v1." - + "StreamingPullRequest\032\'.google.pubsub.v1." - + "StreamingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPu" - + "shConfig\022).google.pubsub.v1.ModifyPushCo" - + "nfigRequest\032\026.google.protobuf.Empty\"d\202\323\344" - + "\223\002C\">/v1/{subscription=projects/*/subscr" - + "iptions/*}:modifyPushConfig:\001*\332A\030subscri" - + "ption,push_config\022\211\001\n\013GetSnapshot\022$.goog" - + "le.pubsub.v1.GetSnapshotRequest\032\032.google" - + ".pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022%/v1/{snapsh" - + "ot=projects/*/snapshots/*}\332A\010snapshot\022\226\001" - + "\n\rListSnapshots\022&.google.pubsub.v1.ListS" - + "napshotsRequest\032\'.google.pubsub.v1.ListS" - + "napshotsResponse\"4\202\323\344\223\002$\022\"/v1/{project=p" - + "rojects/*}/snapshots\332A\007project\022\227\001\n\016Creat" - + "eSnapshot\022\'.google.pubsub.v1.CreateSnaps" - + "hotRequest\032\032.google.pubsub.v1.Snapshot\"@" - + "\202\323\344\223\002&\032!/v1/{name=projects/*/snapshots/*" - + "}:\001*\332A\021name,subscription\022\214\001\n\016UpdateSnaps" - + "hot\022\'.google.pubsub.v1.UpdateSnapshotReq" - + "uest\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223\002/" - + "2*/v1/{snapshot.name=projects/*/snapshot" - + "s/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubs" - + "ub.v1.DeleteSnapshotRequest\032\026.google.pro" - + "tobuf.Empty\"8\202\323\344\223\002\'*%/v1/{snapshot=proje" - + "cts/*/snapshots/*}\332A\010snapshot\022\204\001\n\004Seek\022\035" - + ".google.pubsub.v1.SeekRequest\032\036.google.p" - + "ubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subs" - + "cription=projects/*/subscriptions/*}:see" - + "k:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps:/" + + ".googleapis.com/Subscription\0226\n\013push_con" + + "fig\030\002 \001(\0132\034.google.pubsub.v1.PushConfigB" + + "\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001 \001" + + "(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscr" + + "iption\022!\n\022return_immediately\030\002 \001(\010B\005\030\001\340A" + + "\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"L\n\014PullResp" + + "onse\022<\n\021received_messages\030\001 \003(\0132!.google" + + ".pubsub.v1.ReceivedMessage\"\225\001\n\030ModifyAck" + + "DeadlineRequest\022@\n\014subscription\030\001 \001(\tB*\340" + + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" + + "n\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadline_" + + "seconds\030\003 \001(\005B\003\340A\002\"l\n\022AcknowledgeRequest" + + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" + + "oogleapis.com/Subscription\022\024\n\007ack_ids\030\002 " + + "\003(\tB\003\340A\002\"\350\001\n\024StreamingPullRequest\022@\n\014sub" + + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" + + "is.com/Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027" + + "modify_deadline_seconds\030\003 \003(\005\022\037\n\027modify_" + + "deadline_ack_ids\030\004 \003(\t\022(\n\033stream_ack_dea" + + "dline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 " + + "\001(\t\"U\n\025StreamingPullResponse\022<\n\021received" + + "_messages\030\001 \003(\0132!.google.pubsub.v1.Recei" + + "vedMessage\"\203\002\n\025CreateSnapshotRequest\0224\n\004" + + "name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.co" + + "m/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$" + + "\n\"pubsub.googleapis.com/Subscription\022C\n\006" + + "labels\030\003 \003(\01323.google.pubsub.v1.CreateSn" + + "apshotRequest.LabelsEntry\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025Upd" + + "ateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.g" + + "oogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" + + "\340A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topic\030" + + "\002 \001(\tB \372A\035\n\033pubsub.googleapis.com/Topic\022" + + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\0226\n\006labels\030\004 \003(\0132&.google.pubsub" + + ".v1.Snapshot.LabelsEntry\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036pu" + + "bsub.googleapis.com/Snapshot\022\'projects/{" + + "project}/snapshots/{snapshot}\"N\n\022GetSnap" + + "shotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036p" + + "ubsub.googleapis.com/Snapshot\"\203\001\n\024ListSn" + + "apshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n" + + "+cloudresourcemanager.googleapis.com/Pro" + + "ject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapshot" + + "s\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshotRe" + + "quest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub." + + "googleapis.com/Snapshot\"\276\001\n\013SeekRequest\022" + + "@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.go" + + "ogleapis.com/Subscription\022*\n\004time\030\002 \001(\0132" + + "\032.google.protobuf.TimestampH\000\0227\n\010snapsho" + + "t\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Snap" + + "shotH\000B\010\n\006target\"\016\n\014SeekResponse2\243\013\n\tPub" + + "lisher\022q\n\013CreateTopic\022\027.google.pubsub.v1" + + ".Topic\032\027.google.pubsub.v1.Topic\"0\202\323\344\223\002#\032" + + "\036/v1/{name=projects/*/topics/*}:\001*\332A\004nam" + + "e\022}\n\013UpdateTopic\022$.google.pubsub.v1.Upda" + + "teTopicRequest\032\027.google.pubsub.v1.Topic\"" + + "/\202\323\344\223\002)2$/v1/{topic.name=projects/*/topi" + + "cs/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v1." + + "PublishRequest\032!.google.pubsub.v1.Publis" + + "hResponse\"C\202\323\344\223\002,\"\'/v1/{topic=projects/*" + + "/topics/*}:publish:\001*\332A\016topic,messages\022w" + + "\n\010GetTopic\022!.google.pubsub.v1.GetTopicRe" + + "quest\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002!\022\037" + + "/v1/{topic=projects/*/topics/*}\332A\005topic\022" + + "\212\001\n\nListTopics\022#.google.pubsub.v1.ListTo" + + "picsRequest\032$.google.pubsub.v1.ListTopic" + + "sResponse\"1\202\323\344\223\002!\022\037/v1/{project=projects" + + "/*}/topics\332A\007project\022\272\001\n\026ListTopicSubscr" + + "iptions\022/.google.pubsub.v1.ListTopicSubs" + + "criptionsRequest\0320.google.pubsub.v1.List" + + "TopicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v1/" + + "{topic=projects/*/topics/*}/subscription" + + "s\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.googl" + + "e.pubsub.v1.ListTopicSnapshotsRequest\032,." + + "google.pubsub.v1.ListTopicSnapshotsRespo" + + "nse\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/topic" + + "s/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022$." + + "google.pubsub.v1.DeleteTopicRequest\032\026.go" + + "ogle.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topic=" + + "projects/*/topics/*}\332A\005topic\022\255\001\n\022DetachS" + + "ubscription\022+.google.pubsub.v1.DetachSub" + + "scriptionRequest\032,.google.pubsub.v1.Deta" + + "chSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/{sub" + + "scription=projects/*/subscriptions/*}:de" + + "tach\032p\312A\025pubsub.googleapis.com\322AUhttps:/" + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/pubsubB\256" - + "\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z6" - + "google.golang.org/genproto/googleapis/pu" - + "bsub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub." - + "V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cl" - + "oud::PubSub::V1b\006proto3" + + "https://www.googleapis.com/auth/pubsub2\203" + + "\025\n\nSubscriber\022\264\001\n\022CreateSubscription\022\036.g" + + "oogle.pubsub.v1.Subscription\032\036.google.pu" + + "bsub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=" + + "projects/*/subscriptions/*}:\001*\332A+name,to" + + "pic,push_config,ack_deadline_seconds\022\241\001\n" + + "\017GetSubscription\022(.google.pubsub.v1.GetS" + + "ubscriptionRequest\032\036.google.pubsub.v1.Su" + + "bscription\"D\202\323\344\223\002/\022-/v1/{subscription=pr" + + "ojects/*/subscriptions/*}\332A\014subscription" + + "\022\240\001\n\022UpdateSubscription\022+.google.pubsub." + + "v1.UpdateSubscriptionRequest\032\036.google.pu" + + "bsub.v1.Subscription\"=\202\323\344\223\002722/v1/{subsc" + + "ription.name=projects/*/subscriptions/*}" + + ":\001*\022\246\001\n\021ListSubscriptions\022*.google.pubsu" + + "b.v1.ListSubscriptionsRequest\032+.google.p" + + "ubsub.v1.ListSubscriptionsResponse\"8\202\323\344\223" + + "\002(\022&/v1/{project=projects/*}/subscriptio" + + "ns\332A\007project\022\237\001\n\022DeleteSubscription\022+.go" + + "ogle.pubsub.v1.DeleteSubscriptionRequest" + + "\032\026.google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{s" + + "ubscription=projects/*/subscriptions/*}\332" + + "A\014subscription\022\317\001\n\021ModifyAckDeadline\022*.g" + + "oogle.pubsub.v1.ModifyAckDeadlineRequest" + + "\032\026.google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{s" + + "ubscription=projects/*/subscriptions/*}:" + + "modifyAckDeadline:\001*\332A)subscription,ack_" + + "ids,ack_deadline_seconds\022\250\001\n\013Acknowledge" + + "\022$.google.pubsub.v1.AcknowledgeRequest\032\026" + + ".google.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{sub" + + "scription=projects/*/subscriptions/*}:ac" + + "knowledge:\001*\332A\024subscription,ack_ids\022\263\001\n\004" + + "Pull\022\035.google.pubsub.v1.PullRequest\032\036.go" + + "ogle.pubsub.v1.PullResponse\"l\202\323\344\223\0027\"2/v1" + + "/{subscription=projects/*/subscriptions/" + + "*}:pull:\001*\332A,subscription,return_immedia" + + "tely,max_messages\022f\n\rStreamingPull\022&.goo" + + "gle.pubsub.v1.StreamingPullRequest\032\'.goo" + + "gle.pubsub.v1.StreamingPullResponse\"\000(\0010" + + "\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub.v" + + "1.ModifyPushConfigRequest\032\026.google.proto" + + "buf.Empty\"d\202\323\344\223\002C\">/v1/{subscription=pro" + + "jects/*/subscriptions/*}:modifyPushConfi" + + "g:\001*\332A\030subscription,push_config\022\211\001\n\013GetS" + + "napshot\022$.google.pubsub.v1.GetSnapshotRe" + + "quest\032\032.google.pubsub.v1.Snapshot\"8\202\323\344\223\002" + + "\'\022%/v1/{snapshot=projects/*/snapshots/*}" + + "\332A\010snapshot\022\226\001\n\rListSnapshots\022&.google.p" + + "ubsub.v1.ListSnapshotsRequest\032\'.google.p" + + "ubsub.v1.ListSnapshotsResponse\"4\202\323\344\223\002$\022\"" + + "/v1/{project=projects/*}/snapshots\332A\007pro" + + "ject\022\227\001\n\016CreateSnapshot\022\'.google.pubsub." + + "v1.CreateSnapshotRequest\032\032.google.pubsub" + + ".v1.Snapshot\"@\202\323\344\223\002&\032!/v1/{name=projects" + + "/*/snapshots/*}:\001*\332A\021name,subscription\022\214" + + "\001\n\016UpdateSnapshot\022\'.google.pubsub.v1.Upd" + + "ateSnapshotRequest\032\032.google.pubsub.v1.Sn" + + "apshot\"5\202\323\344\223\002/2*/v1/{snapshot.name=proje" + + "cts/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapshot" + + "\022\'.google.pubsub.v1.DeleteSnapshotReques" + + "t\032\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%/v1/{" + + "snapshot=projects/*/snapshots/*}\332A\010snaps" + + "hot\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRequ" + + "est\032\036.google.pubsub.v1.SeekResponse\"=\202\323\344" + + "\223\0027\"2/v1/{subscription=projects/*/subscr" + + "iptions/*}:seek:\001*\032p\312A\025pubsub.googleapis" + + ".com\322AUhttps://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/pubsubB\256\001\n\024com.google.pubsub.v1B\013P" + + "ubsubProtoP\001Z6google.golang.org/genproto" + + "/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google" + + ".Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V" + + "1\352\002\031Google::Cloud::PubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -628,8 +643,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Topic", }); - internal_static_google_pubsub_v1_Subscription_descriptor = + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor, + new java.lang.String[] { + "Subscription", + }); + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_pubsub_v1_Subscription_descriptor = + getDescriptor().getMessageTypes().get(16); internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_descriptor, @@ -656,7 +685,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_RetryPolicy_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_RetryPolicy_descriptor, @@ -664,7 +693,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MinimumBackoff", "MaximumBackoff", }); internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor, @@ -672,7 +701,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeadLetterTopic", "MaxDeliveryAttempts", }); internal_static_google_pubsub_v1_ExpirationPolicy_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ExpirationPolicy_descriptor, @@ -680,7 +709,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Ttl", }); internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_descriptor, @@ -704,7 +733,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, @@ -712,7 +741,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AckId", "Message", "DeliveryAttempt", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, @@ -720,7 +749,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, @@ -728,7 +757,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, @@ -736,7 +765,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, @@ -744,7 +773,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, @@ -752,7 +781,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, @@ -760,7 +789,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "PushConfig", }); internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, @@ -768,7 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "ReturnImmediately", "MaxMessages", }); internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, @@ -776,7 +805,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, @@ -784,7 +813,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, @@ -792,7 +821,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(32); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, @@ -805,7 +834,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientId", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(33); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, @@ -813,7 +842,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(34); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, @@ -829,7 +858,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(35); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, @@ -837,7 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", "UpdateMask", }); internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(36); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, @@ -853,7 +882,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(37); internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, @@ -861,7 +890,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(38); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, @@ -869,7 +898,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(39); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, @@ -877,7 +906,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(40); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, @@ -885,7 +914,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(41); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, @@ -893,7 +922,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "Time", "Snapshot", "Target", }); internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(42); internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekResponse_descriptor, new java.lang.String[] {}); diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index a42d03220..0311cc5b3 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -88,7 +88,7 @@ service Publisher { option (google.api.method_signature) = "project"; } - // Lists the names of the subscriptions on this topic. + // Lists the names of the attached subscriptions on this topic. rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { option (google.api.http) = { @@ -122,6 +122,17 @@ service Publisher { }; option (google.api.method_signature) = "topic"; } + + // Detaches a subscription from this topic. All messages retained in the + // subscription are dropped. Subsequent `Pull` and `StreamingPull` requests + // will return FAILED_PRECONDITION. If the subscription is a push + // subscription, pushes to the endpoint will stop. + rpc DetachSubscription(DetachSubscriptionRequest) + returns (DetachSubscriptionResponse) { + option (google.api.http) = { + post: "/v1/{subscription=projects/*/subscriptions/*}:detach" + }; + } } message MessageStoragePolicy { @@ -300,7 +311,7 @@ message ListTopicSubscriptionsRequest { // Response for the `ListTopicSubscriptions` method. message ListTopicSubscriptionsResponse { - // The names of the subscriptions that match the request. + // The names of subscriptions attached to the topic specified in the request. repeated string subscriptions = 1 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Subscription" }]; @@ -350,6 +361,20 @@ message DeleteTopicRequest { ]; } +// Request for the DetachSubscription method. +message DetachSubscriptionRequest { + // Required. The subscription to detach. + // Format is `projects/{project}/subscriptions/{subscription}`. + string subscription = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; +} + +// Response for the DetachSubscription method. +// Reserved for future use. +message DetachSubscriptionResponse {} + // The service that an application uses to manipulate subscriptions and to // consume messages from a subscription via the `Pull` method or by // establishing a bi-directional stream using the `StreamingPull` method. diff --git a/synth.metadata b/synth.metadata index 3707cd7d4..13da91841 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "ed222384f58d1b3b61d9844bfefe55d71961fbc4" + "sha": "63a0e7a423ca0e9de9e446f0686aec6e6368f67c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "edd3b80fb770548d6ad780105f1782de6ff73ea0", - "internalRef": "311053644" + "sha": "f5f268f5293e60143ac742a4eeb7dd6306ebf505", + "internalRef": "313276022" } }, {