Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 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.
*/
package com.google.pubsub.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* 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.
*
* 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.
*
*/
public interface AsyncService {
/**
*
*
*
* Creates a subscription to a given topic. See the [resource name rules]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Subscription object. Note that
* for REST API requests, you must specify a name in the request.
*
* Updates an existing subscription by updating the fields specified in the
* update mask. Note that certain properties of a subscription, such as its
* topic, are not modifiable.
*
* Deletes an existing subscription. All messages retained in the subscription
* are immediately dropped. Calls to `Pull` after deletion will return
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
* the same name, but the new one has no association with the old
* subscription or its topic unless the same topic is specified.
*
* Modifies the ack deadline for a specific message. This method is useful
* to indicate that more time is needed to process a message by the
* subscriber, or to make the message available for redelivery if the
* processing was interrupted. Note that this does not modify the
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
*
* Acknowledges the messages associated with the `ack_ids` in the
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
* from the subscription.
* Acknowledging a message whose ack deadline has expired may succeed,
* but such a message may be redelivered later. Acknowledging a message more
* than once will not result in an error.
*
* Establishes a stream with the server, which sends messages down to the
* client. The client streams acknowledgements and ack deadline modifications
* back to the server. The server will close the stream and return the status
* on any error. The server may close the stream with status `UNAVAILABLE` to
* reassign server-side resources, in which case, the client should
* re-establish the stream. Flow control can be achieved by configuring the
* underlying RPC channel.
*
* Modifies the `PushConfig` for a specified subscription.
* This may be used to change a push subscription to a pull one (signified by
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
* attributes of a push subscription. Messages will accumulate for delivery
* continuously through the call regardless of changes to the `PushConfig`.
*
* Gets the configuration details of a snapshot. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Lists the existing snapshots. Snapshots are used in [Seek](
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Creates a snapshot from the requested subscription. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* If the snapshot already exists, returns `ALREADY_EXISTS`.
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
* If the backlog in the subscription is too old -- and the resulting snapshot
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
* See also the `Snapshot.expire_time` field. If the name is not provided in
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
* Updates an existing snapshot by updating the fields specified in the update
* mask. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Removes an existing snapshot. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* When the snapshot is deleted, all messages retained in the snapshot
* are immediately dropped. After a snapshot is deleted, a new one may be
* created with the same name, but the new one has no association with the old
* snapshot or its subscription, unless the same subscription is specified.
*
* Seeks an existing subscription to a point in time or to a given snapshot,
* whichever is provided in the request. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot. Note that both the subscription and the
* snapshot must be on the same topic.
*
*/
default void seek(
com.google.pubsub.v1.SeekRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSeekMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Subscriber.
*
*
* 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.
*
*/
public abstract static class SubscriberImplBase implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return SubscriberGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Subscriber.
*
*
* 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.
*
*/
public static final class SubscriberStub extends io.grpc.stub.AbstractAsyncStub {
private SubscriberStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SubscriberStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SubscriberStub(channel, callOptions);
}
/**
*
*
*
* Creates a subscription to a given topic. See the [resource name rules]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Subscription object. Note that
* for REST API requests, you must specify a name in the request.
*
* Updates an existing subscription by updating the fields specified in the
* update mask. Note that certain properties of a subscription, such as its
* topic, are not modifiable.
*
* Deletes an existing subscription. All messages retained in the subscription
* are immediately dropped. Calls to `Pull` after deletion will return
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
* the same name, but the new one has no association with the old
* subscription or its topic unless the same topic is specified.
*
* Modifies the ack deadline for a specific message. This method is useful
* to indicate that more time is needed to process a message by the
* subscriber, or to make the message available for redelivery if the
* processing was interrupted. Note that this does not modify the
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
*
* Acknowledges the messages associated with the `ack_ids` in the
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
* from the subscription.
* Acknowledging a message whose ack deadline has expired may succeed,
* but such a message may be redelivered later. Acknowledging a message more
* than once will not result in an error.
*
* Establishes a stream with the server, which sends messages down to the
* client. The client streams acknowledgements and ack deadline modifications
* back to the server. The server will close the stream and return the status
* on any error. The server may close the stream with status `UNAVAILABLE` to
* reassign server-side resources, in which case, the client should
* re-establish the stream. Flow control can be achieved by configuring the
* underlying RPC channel.
*
* Modifies the `PushConfig` for a specified subscription.
* This may be used to change a push subscription to a pull one (signified by
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
* attributes of a push subscription. Messages will accumulate for delivery
* continuously through the call regardless of changes to the `PushConfig`.
*
* Gets the configuration details of a snapshot. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Lists the existing snapshots. Snapshots are used in [Seek](
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Creates a snapshot from the requested subscription. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* If the snapshot already exists, returns `ALREADY_EXISTS`.
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
* If the backlog in the subscription is too old -- and the resulting snapshot
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
* See also the `Snapshot.expire_time` field. If the name is not provided in
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
* Updates an existing snapshot by updating the fields specified in the update
* mask. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Removes an existing snapshot. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* When the snapshot is deleted, all messages retained in the snapshot
* are immediately dropped. After a snapshot is deleted, a new one may be
* created with the same name, but the new one has no association with the old
* snapshot or its subscription, unless the same subscription is specified.
*
* Seeks an existing subscription to a point in time or to a given snapshot,
* whichever is provided in the request. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot. Note that both the subscription and the
* snapshot must be on the same topic.
*
*/
public void seek(
com.google.pubsub.v1.SeekRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSeekMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Subscriber.
*
*
* 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.
*
*/
public static final class SubscriberBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private SubscriberBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SubscriberBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SubscriberBlockingStub(channel, callOptions);
}
/**
*
*
*
* Creates a subscription to a given topic. See the [resource name rules]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Subscription object. Note that
* for REST API requests, you must specify a name in the request.
*
* Updates an existing subscription by updating the fields specified in the
* update mask. Note that certain properties of a subscription, such as its
* topic, are not modifiable.
*
* Deletes an existing subscription. All messages retained in the subscription
* are immediately dropped. Calls to `Pull` after deletion will return
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
* the same name, but the new one has no association with the old
* subscription or its topic unless the same topic is specified.
*
* Modifies the ack deadline for a specific message. This method is useful
* to indicate that more time is needed to process a message by the
* subscriber, or to make the message available for redelivery if the
* processing was interrupted. Note that this does not modify the
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
*
* Acknowledges the messages associated with the `ack_ids` in the
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
* from the subscription.
* Acknowledging a message whose ack deadline has expired may succeed,
* but such a message may be redelivered later. Acknowledging a message more
* than once will not result in an error.
*
* Modifies the `PushConfig` for a specified subscription.
* This may be used to change a push subscription to a pull one (signified by
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
* attributes of a push subscription. Messages will accumulate for delivery
* continuously through the call regardless of changes to the `PushConfig`.
*
* Gets the configuration details of a snapshot. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Lists the existing snapshots. Snapshots are used in [Seek](
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Creates a snapshot from the requested subscription. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* If the snapshot already exists, returns `ALREADY_EXISTS`.
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
* If the backlog in the subscription is too old -- and the resulting snapshot
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
* See also the `Snapshot.expire_time` field. If the name is not provided in
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
* Updates an existing snapshot by updating the fields specified in the update
* mask. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Removes an existing snapshot. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* When the snapshot is deleted, all messages retained in the snapshot
* are immediately dropped. After a snapshot is deleted, a new one may be
* created with the same name, but the new one has no association with the old
* snapshot or its subscription, unless the same subscription is specified.
*
* Seeks an existing subscription to a point in time or to a given snapshot,
* whichever is provided in the request. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot. Note that both the subscription and the
* snapshot must be on the same topic.
*
*/
public com.google.pubsub.v1.SeekResponse seek(com.google.pubsub.v1.SeekRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSeekMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Subscriber.
*
*
* 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.
*
*/
public static final class SubscriberFutureStub
extends io.grpc.stub.AbstractFutureStub {
private SubscriberFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SubscriberFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SubscriberFutureStub(channel, callOptions);
}
/**
*
*
*
* Creates a subscription to a given topic. See the [resource name rules]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Subscription object. Note that
* for REST API requests, you must specify a name in the request.
*
* Updates an existing subscription by updating the fields specified in the
* update mask. Note that certain properties of a subscription, such as its
* topic, are not modifiable.
*
* Deletes an existing subscription. All messages retained in the subscription
* are immediately dropped. Calls to `Pull` after deletion will return
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
* the same name, but the new one has no association with the old
* subscription or its topic unless the same topic is specified.
*
* Modifies the ack deadline for a specific message. This method is useful
* to indicate that more time is needed to process a message by the
* subscriber, or to make the message available for redelivery if the
* processing was interrupted. Note that this does not modify the
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
*
* Acknowledges the messages associated with the `ack_ids` in the
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
* from the subscription.
* Acknowledging a message whose ack deadline has expired may succeed,
* but such a message may be redelivered later. Acknowledging a message more
* than once will not result in an error.
*
* Modifies the `PushConfig` for a specified subscription.
* This may be used to change a push subscription to a pull one (signified by
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
* attributes of a push subscription. Messages will accumulate for delivery
* continuously through the call regardless of changes to the `PushConfig`.
*
* Gets the configuration details of a snapshot. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Lists the existing snapshots. Snapshots are used in [Seek](
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Creates a snapshot from the requested subscription. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* If the snapshot already exists, returns `ALREADY_EXISTS`.
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
* If the backlog in the subscription is too old -- and the resulting snapshot
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
* See also the `Snapshot.expire_time` field. If the name is not provided in
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
* (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
* Updates an existing snapshot by updating the fields specified in the update
* mask. Snapshots are used in
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
* which allow you to manage message acknowledgments in bulk. That is, you can
* set the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
*
* Removes an existing snapshot. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot.
* When the snapshot is deleted, all messages retained in the snapshot
* are immediately dropped. After a snapshot is deleted, a new one may be
* created with the same name, but the new one has no association with the old
* snapshot or its subscription, unless the same subscription is specified.
*
* Seeks an existing subscription to a point in time or to a given snapshot,
* whichever is provided in the request. Snapshots are used in [Seek]
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
* allow you to manage message acknowledgments in bulk. That is, you can set
* the acknowledgment state of messages in an existing subscription to the
* state captured by a snapshot. Note that both the subscription and the
* snapshot must be on the same topic.
*
*/
public com.google.common.util.concurrent.ListenableFuture
seek(com.google.pubsub.v1.SeekRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSeekMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_SUBSCRIPTION = 0;
private static final int METHODID_GET_SUBSCRIPTION = 1;
private static final int METHODID_UPDATE_SUBSCRIPTION = 2;
private static final int METHODID_LIST_SUBSCRIPTIONS = 3;
private static final int METHODID_DELETE_SUBSCRIPTION = 4;
private static final int METHODID_MODIFY_ACK_DEADLINE = 5;
private static final int METHODID_ACKNOWLEDGE = 6;
private static final int METHODID_PULL = 7;
private static final int METHODID_MODIFY_PUSH_CONFIG = 8;
private static final int METHODID_GET_SNAPSHOT = 9;
private static final int METHODID_LIST_SNAPSHOTS = 10;
private static final int METHODID_CREATE_SNAPSHOT = 11;
private static final int METHODID_UPDATE_SNAPSHOT = 12;
private static final int METHODID_DELETE_SNAPSHOT = 13;
private static final int METHODID_SEEK = 14;
private static final int METHODID_STREAMING_PULL = 15;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_SUBSCRIPTION:
serviceImpl.createSubscription(
(com.google.pubsub.v1.Subscription) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_SUBSCRIPTION:
serviceImpl.getSubscription(
(com.google.pubsub.v1.GetSubscriptionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_SUBSCRIPTION:
serviceImpl.updateSubscription(
(com.google.pubsub.v1.UpdateSubscriptionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_SUBSCRIPTIONS:
serviceImpl.listSubscriptions(
(com.google.pubsub.v1.ListSubscriptionsRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_DELETE_SUBSCRIPTION:
serviceImpl.deleteSubscription(
(com.google.pubsub.v1.DeleteSubscriptionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MODIFY_ACK_DEADLINE:
serviceImpl.modifyAckDeadline(
(com.google.pubsub.v1.ModifyAckDeadlineRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ACKNOWLEDGE:
serviceImpl.acknowledge(
(com.google.pubsub.v1.AcknowledgeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PULL:
serviceImpl.pull(
(com.google.pubsub.v1.PullRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MODIFY_PUSH_CONFIG:
serviceImpl.modifyPushConfig(
(com.google.pubsub.v1.ModifyPushConfigRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_SNAPSHOT:
serviceImpl.getSnapshot(
(com.google.pubsub.v1.GetSnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_SNAPSHOTS:
serviceImpl.listSnapshots(
(com.google.pubsub.v1.ListSnapshotsRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_SNAPSHOT:
serviceImpl.createSnapshot(
(com.google.pubsub.v1.CreateSnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_SNAPSHOT:
serviceImpl.updateSnapshot(
(com.google.pubsub.v1.UpdateSnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_SNAPSHOT:
serviceImpl.deleteSnapshot(
(com.google.pubsub.v1.DeleteSnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SEEK:
serviceImpl.seek(
(com.google.pubsub.v1.SeekRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_STREAMING_PULL:
return (io.grpc.stub.StreamObserver)
serviceImpl.streamingPull(
(io.grpc.stub.StreamObserver)
responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription>(
service, METHODID_CREATE_SUBSCRIPTION)))
.addMethod(
getGetSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.GetSubscriptionRequest, com.google.pubsub.v1.Subscription>(
service, METHODID_GET_SUBSCRIPTION)))
.addMethod(
getUpdateSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.UpdateSubscriptionRequest,
com.google.pubsub.v1.Subscription>(service, METHODID_UPDATE_SUBSCRIPTION)))
.addMethod(
getListSubscriptionsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ListSubscriptionsRequest,
com.google.pubsub.v1.ListSubscriptionsResponse>(
service, METHODID_LIST_SUBSCRIPTIONS)))
.addMethod(
getDeleteSubscriptionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.DeleteSubscriptionRequest, com.google.protobuf.Empty>(
service, METHODID_DELETE_SUBSCRIPTION)))
.addMethod(
getModifyAckDeadlineMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ModifyAckDeadlineRequest, com.google.protobuf.Empty>(
service, METHODID_MODIFY_ACK_DEADLINE)))
.addMethod(
getAcknowledgeMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.AcknowledgeRequest, com.google.protobuf.Empty>(
service, METHODID_ACKNOWLEDGE)))
.addMethod(
getPullMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.PullRequest, com.google.pubsub.v1.PullResponse>(
service, METHODID_PULL)))
.addMethod(
getStreamingPullMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.google.pubsub.v1.StreamingPullRequest,
com.google.pubsub.v1.StreamingPullResponse>(service, METHODID_STREAMING_PULL)))
.addMethod(
getModifyPushConfigMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ModifyPushConfigRequest, com.google.protobuf.Empty>(
service, METHODID_MODIFY_PUSH_CONFIG)))
.addMethod(
getGetSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.GetSnapshotRequest, com.google.pubsub.v1.Snapshot>(
service, METHODID_GET_SNAPSHOT)))
.addMethod(
getListSnapshotsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ListSnapshotsRequest,
com.google.pubsub.v1.ListSnapshotsResponse>(service, METHODID_LIST_SNAPSHOTS)))
.addMethod(
getCreateSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.CreateSnapshotRequest, com.google.pubsub.v1.Snapshot>(
service, METHODID_CREATE_SNAPSHOT)))
.addMethod(
getUpdateSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.UpdateSnapshotRequest, com.google.pubsub.v1.Snapshot>(
service, METHODID_UPDATE_SNAPSHOT)))
.addMethod(
getDeleteSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.DeleteSnapshotRequest, com.google.protobuf.Empty>(
service, METHODID_DELETE_SNAPSHOT)))
.addMethod(
getSeekMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.SeekRequest, com.google.pubsub.v1.SeekResponse>(
service, METHODID_SEEK)))
.build();
}
private abstract static class SubscriberBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
SubscriberBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.pubsub.v1.PubsubProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Subscriber");
}
}
private static final class SubscriberFileDescriptorSupplier
extends SubscriberBaseDescriptorSupplier {
SubscriberFileDescriptorSupplier() {}
}
private static final class SubscriberMethodDescriptorSupplier
extends SubscriberBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
SubscriberMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (SubscriberGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SubscriberFileDescriptorSupplier())
.addMethod(getCreateSubscriptionMethod())
.addMethod(getGetSubscriptionMethod())
.addMethod(getUpdateSubscriptionMethod())
.addMethod(getListSubscriptionsMethod())
.addMethod(getDeleteSubscriptionMethod())
.addMethod(getModifyAckDeadlineMethod())
.addMethod(getAcknowledgeMethod())
.addMethod(getPullMethod())
.addMethod(getStreamingPullMethod())
.addMethod(getModifyPushConfigMethod())
.addMethod(getGetSnapshotMethod())
.addMethod(getListSnapshotsMethod())
.addMethod(getCreateSnapshotMethod())
.addMethod(getUpdateSnapshotMethod())
.addMethod(getDeleteSnapshotMethod())
.addMethod(getSeekMethod())
.build();
}
}
}
return result;
}
}