diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java deleted file mode 100644 index ab612d2c5..000000000 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java +++ /dev/null @@ -1,1377 +0,0 @@ -/* - * 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; - -/** - * - * - *
- * Service for doing schema-related operations. - *- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/pubsub/v1/schema.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class SchemaServiceGrpc { - - private SchemaServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.SchemaService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.CreateSchemaRequest, com.google.pubsub.v1.Schema> - getCreateSchemaMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSchema", - requestType = com.google.pubsub.v1.CreateSchemaRequest.class, - responseType = com.google.pubsub.v1.Schema.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.CreateSchemaRequest, com.google.pubsub.v1.Schema> - getCreateSchemaMethod() { - io.grpc.MethodDescriptor
- * Service for doing schema-related operations. - *- */ - public interface AsyncService { - - /** - * - * - *
- * Creates a schema. - *- */ - default void createSchema( - com.google.pubsub.v1.CreateSchemaRequest request, - io.grpc.stub.StreamObserver
- * Gets a schema. - *- */ - default void getSchema( - com.google.pubsub.v1.GetSchemaRequest request, - io.grpc.stub.StreamObserver
- * Lists schemas in a project. - *- */ - default void listSchemas( - com.google.pubsub.v1.ListSchemasRequest request, - io.grpc.stub.StreamObserver
- * Lists all schema revisions for the named schema. - *- */ - default void listSchemaRevisions( - com.google.pubsub.v1.ListSchemaRevisionsRequest request, - io.grpc.stub.StreamObserver
- * Commits a new schema revision to an existing schema. - *- */ - default void commitSchema( - com.google.pubsub.v1.CommitSchemaRequest request, - io.grpc.stub.StreamObserver
- * Creates a new schema revision that is a copy of the provided revision_id. - *- */ - default void rollbackSchema( - com.google.pubsub.v1.RollbackSchemaRequest request, - io.grpc.stub.StreamObserver
- * Deletes a specific schema revision. - *- */ - default void deleteSchemaRevision( - com.google.pubsub.v1.DeleteSchemaRevisionRequest request, - io.grpc.stub.StreamObserver
- * Deletes a schema. - *- */ - default void deleteSchema( - com.google.pubsub.v1.DeleteSchemaRequest request, - io.grpc.stub.StreamObserver
- * Validates a schema. - *- */ - default void validateSchema( - com.google.pubsub.v1.ValidateSchemaRequest request, - io.grpc.stub.StreamObserver
- * Validates a message against a schema. - *- */ - default void validateMessage( - com.google.pubsub.v1.ValidateMessageRequest request, - io.grpc.stub.StreamObserver
- * Service for doing schema-related operations. - *- */ - public abstract static class SchemaServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return SchemaServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service SchemaService. - * - *
- * Service for doing schema-related operations. - *- */ - public static final class SchemaServiceStub - extends io.grpc.stub.AbstractAsyncStub
- * Creates a schema. - *- */ - public void createSchema( - com.google.pubsub.v1.CreateSchemaRequest request, - io.grpc.stub.StreamObserver
- * Gets a schema. - *- */ - public void getSchema( - com.google.pubsub.v1.GetSchemaRequest request, - io.grpc.stub.StreamObserver
- * Lists schemas in a project. - *- */ - public void listSchemas( - com.google.pubsub.v1.ListSchemasRequest request, - io.grpc.stub.StreamObserver
- * Lists all schema revisions for the named schema. - *- */ - public void listSchemaRevisions( - com.google.pubsub.v1.ListSchemaRevisionsRequest request, - io.grpc.stub.StreamObserver
- * Commits a new schema revision to an existing schema. - *- */ - public void commitSchema( - com.google.pubsub.v1.CommitSchemaRequest request, - io.grpc.stub.StreamObserver
- * Creates a new schema revision that is a copy of the provided revision_id. - *- */ - public void rollbackSchema( - com.google.pubsub.v1.RollbackSchemaRequest request, - io.grpc.stub.StreamObserver
- * Deletes a specific schema revision. - *- */ - public void deleteSchemaRevision( - com.google.pubsub.v1.DeleteSchemaRevisionRequest request, - io.grpc.stub.StreamObserver
- * Deletes a schema. - *- */ - public void deleteSchema( - com.google.pubsub.v1.DeleteSchemaRequest request, - io.grpc.stub.StreamObserver
- * Validates a schema. - *- */ - public void validateSchema( - com.google.pubsub.v1.ValidateSchemaRequest request, - io.grpc.stub.StreamObserver
- * Validates a message against a schema. - *- */ - public void validateMessage( - com.google.pubsub.v1.ValidateMessageRequest request, - io.grpc.stub.StreamObserver
- * Service for doing schema-related operations. - *- */ - public static final class SchemaServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub
- * Creates a schema. - *- */ - public com.google.pubsub.v1.Schema createSchema( - com.google.pubsub.v1.CreateSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Gets a schema. - *- */ - public com.google.pubsub.v1.Schema getSchema(com.google.pubsub.v1.GetSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists schemas in a project. - *- */ - public com.google.pubsub.v1.ListSchemasResponse listSchemas( - com.google.pubsub.v1.ListSchemasRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSchemasMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists all schema revisions for the named schema. - *- */ - public com.google.pubsub.v1.ListSchemaRevisionsResponse listSchemaRevisions( - com.google.pubsub.v1.ListSchemaRevisionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSchemaRevisionsMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Commits a new schema revision to an existing schema. - *- */ - public com.google.pubsub.v1.Schema commitSchema( - com.google.pubsub.v1.CommitSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCommitSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Creates a new schema revision that is a copy of the provided revision_id. - *- */ - public com.google.pubsub.v1.Schema rollbackSchema( - com.google.pubsub.v1.RollbackSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRollbackSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Deletes a specific schema revision. - *- */ - public com.google.pubsub.v1.Schema deleteSchemaRevision( - com.google.pubsub.v1.DeleteSchemaRevisionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSchemaRevisionMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Deletes a schema. - *- */ - public com.google.protobuf.Empty deleteSchema( - com.google.pubsub.v1.DeleteSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Validates a schema. - *- */ - public com.google.pubsub.v1.ValidateSchemaResponse validateSchema( - com.google.pubsub.v1.ValidateSchemaRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getValidateSchemaMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Validates a message against a schema. - *- */ - public com.google.pubsub.v1.ValidateMessageResponse validateMessage( - com.google.pubsub.v1.ValidateMessageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getValidateMessageMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service SchemaService. - * - *
- * Service for doing schema-related operations. - *- */ - public static final class SchemaServiceFutureStub - extends io.grpc.stub.AbstractFutureStub
- * Creates a schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Gets a schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Lists schemas in a project. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ListSchemasResponse> - listSchemas(com.google.pubsub.v1.ListSchemasRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSchemasMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Lists all schema revisions for the named schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ListSchemaRevisionsResponse> - listSchemaRevisions(com.google.pubsub.v1.ListSchemaRevisionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSchemaRevisionsMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Commits a new schema revision to an existing schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Creates a new schema revision that is a copy of the provided revision_id. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Deletes a specific schema revision. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Deletes a schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Validates a schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ValidateSchemaResponse> - validateSchema(com.google.pubsub.v1.ValidateSchemaRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getValidateSchemaMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Validates a message against a schema. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ValidateMessageResponse> - validateMessage(com.google.pubsub.v1.ValidateMessageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getValidateMessageMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_SCHEMA = 0; - private static final int METHODID_GET_SCHEMA = 1; - private static final int METHODID_LIST_SCHEMAS = 2; - private static final int METHODID_LIST_SCHEMA_REVISIONS = 3; - private static final int METHODID_COMMIT_SCHEMA = 4; - private static final int METHODID_ROLLBACK_SCHEMA = 5; - private static final int METHODID_DELETE_SCHEMA_REVISION = 6; - private static final int METHODID_DELETE_SCHEMA = 7; - private static final int METHODID_VALIDATE_SCHEMA = 8; - private static final int METHODID_VALIDATE_MESSAGE = 9; - - private static final class MethodHandlers
See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name + *
See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name * constraints. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -490,7 +490,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem * will have a `name` made using the given `parent` and `schema_id`. * @param schemaId The ID to use for the schema, which will become the final component of the * schema's resource name. - *
See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name + *
See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name * constraints. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java b/owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java similarity index 99% rename from google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java rename to owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java index 67d08bb63..06e321094 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java +++ b/owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.pubsub.v1.stub.SchemaServiceStubSettings; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java similarity index 79% rename from google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java rename to owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 8f1229cd7..dbee623f3 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/owl-bot-staging/v1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -48,9 +48,6 @@ import com.google.pubsub.v1.ModifyAckDeadlineRequest; import com.google.pubsub.v1.ModifyPushConfigRequest; import com.google.pubsub.v1.ProjectName; -import com.google.pubsub.v1.ProjectSnapshotName; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PullRequest; import com.google.pubsub.v1.PullResponse; import com.google.pubsub.v1.PushConfig; @@ -149,7 +146,7 @@ * *
UpdateSubscription
Updates an existing subscription. Note that certain properties of a subscription, such as its topic, are not modifiable.
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.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*UpdateSnapshot
Updates 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.
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.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*For pull subscriptions, this value is used as the initial value for the ack deadline. To * override this value for a given message, call `ModifyAckDeadline` with the corresponding @@ -666,12 +663,12 @@ public final Subscription createSubscription( * @param topic Required. The name of the topic from which this subscription is receiving * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. - * @param pushConfig If push delivery is used with this subscription, this field is used to - * configure it. - * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits - * for the subscriber to acknowledge receipt before resending the message. In the interval - * after the message is delivered and before it is acknowledged, it is considered to be - * _outstanding_. During that time period, the message will not be redelivered (on a + * @param pushConfig Optional. If push delivery is used with this subscription, this field is used + * to configure it. + * @param ackDeadlineSeconds Optional. The approximate amount of time (on a best-effort basis) + * Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In + * the interval after the message is delivered and before it is acknowledged, it is considered + * to be _outstanding_. During that time period, the message will not be redelivered (on a * best-effort basis). *
For pull subscriptions, this value is used as the initial value for the ack deadline. To * override this value for a given message, call `ModifyAckDeadline` with the corresponding @@ -736,12 +733,12 @@ public final Subscription createSubscription( * @param topic Required. The name of the topic from which this subscription is receiving * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. - * @param pushConfig If push delivery is used with this subscription, this field is used to - * configure it. - * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits - * for the subscriber to acknowledge receipt before resending the message. In the interval - * after the message is delivered and before it is acknowledged, it is considered to be - * _outstanding_. During that time period, the message will not be redelivered (on a + * @param pushConfig Optional. If push delivery is used with this subscription, this field is used + * to configure it. + * @param ackDeadlineSeconds Optional. The approximate amount of time (on a best-effort basis) + * Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In + * the interval after the message is delivered and before it is acknowledged, it is considered + * to be _outstanding_. During that time period, the message will not be redelivered (on a * best-effort basis). *
For pull subscriptions, this value is used as the initial value for the ack deadline. To * override this value for a given message, call `ModifyAckDeadline` with the corresponding @@ -806,12 +803,12 @@ public final Subscription createSubscription( * @param topic Required. The name of the topic from which this subscription is receiving * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. - * @param pushConfig If push delivery is used with this subscription, this field is used to - * configure it. - * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits - * for the subscriber to acknowledge receipt before resending the message. In the interval - * after the message is delivered and before it is acknowledged, it is considered to be - * _outstanding_. During that time period, the message will not be redelivered (on a + * @param pushConfig Optional. If push delivery is used with this subscription, this field is used + * to configure it. + * @param ackDeadlineSeconds Optional. The approximate amount of time (on a best-effort basis) + * Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In + * the interval after the message is delivered and before it is acknowledged, it is considered + * to be _outstanding_. During that time period, the message will not be redelivered (on a * best-effort basis). *
For pull subscriptions, this value is used as the initial value for the ack deadline. To * override this value for a given message, call `ModifyAckDeadline` with the corresponding @@ -890,216 +887,6 @@ public final Subscription createSubscription(Subscription request) { return createSubscriptionCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a subscription to a given topic. See the <a - * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name - * rules</a>. If the subscription already exists, returns `ALREADY_EXISTS`. If the - * corresponding topic doesn't exist, returns `NOT_FOUND`. - * - *
If the name is not provided in the request, the server will assign a random name for this - * subscription on the same project as the topic, conforming to the [resource name - * format](https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is - * populated in the returned Subscription object. Note that for REST API requests, you must - * specify a name in the request. - * - *
Sample code: - * - *
- * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
- * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
- * PushConfig pushConfig = PushConfig.newBuilder().build();
- * int ackDeadlineSeconds = 0;
- * Subscription response = subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
- * }
- *
- *
- * @param name Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a
- * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores
- * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3
- * and 255 characters in length, and it must not start with `"goog"`.
- * @param topic Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
- * `_deleted-topic_` if the topic has been deleted.
- * @param pushConfig If push delivery is used with this subscription, this field is used to
- * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
- * messages using API methods.
- * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
- * for the subscriber to acknowledge receipt before resending the message. In the interval
- * after the message is delivered and before it is acknowledged, it is considered to be
- * <i>outstanding</i>. During that time period, the message will not be
- * redelivered (on a best-effort basis).
- * For pull subscriptions, this value is used as the initial value for the ack deadline. To - * override this value for a given message, call `ModifyAckDeadline` with the corresponding - * `ack_id` if using non-streaming pull or send the `ack_id` in a - * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline - * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds - * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. - *
For push delivery, this value is also used to set the request timeout for the call to - * the push endpoint. - *
If the subscriber never acknowledges the message, the Pub/Sub system will eventually - * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} - * instead. - */ - @Deprecated - public final Subscription createSubscription( - ProjectSubscriptionName name, - ProjectTopicName topic, - PushConfig pushConfig, - int ackDeadlineSeconds) { - Subscription request = - Subscription.newBuilder() - .setName(name == null ? null : name.toString()) - .setTopic(topic == null ? null : topic.toString()) - .setPushConfig(pushConfig) - .setAckDeadlineSeconds(ackDeadlineSeconds) - .build(); - return createSubscription(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns - * `NOT_FOUND`. - * - *
If the name is not provided in the request, the server will assign a random name for this - * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * String topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString(); - * PushConfig pushConfig = PushConfig.newBuilder().build(); - * int ackDeadlineSeconds = 2135351438; - * Subscription response = - * subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds); - * } - * }- * - * @param name Required. The name of the subscription. It must have the format - * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a - * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores - * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 - * and 255 characters in length, and it must not start with `"goog"`. - * @param topic Required. The name of the topic from which this subscription is receiving - * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be - * `_deleted-topic_` if the topic has been deleted. - * @param pushConfig If push delivery is used with this subscription, this field is used to - * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack - * messages using API methods. - * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits - * for the subscriber to acknowledge receipt before resending the message. In the interval - * after the message is delivered and before it is acknowledged, it is considered to be - * <i>outstanding</i>. During that time period, the message will not be - * redelivered (on a best-effort basis). - *
For pull subscriptions, this value is used as the initial value for the ack deadline. To - * override this value for a given message, call `ModifyAckDeadline` with the corresponding - * `ack_id` if using non-streaming pull or send the `ack_id` in a - * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline - * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds - * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. - *
For push delivery, this value is also used to set the request timeout for the call to - * the push endpoint. - *
If the subscriber never acknowledges the message, the Pub/Sub system will eventually - * redeliver the message. - * @deprecated Use {@link #createSubscription(SubscriptionName, String, PushConfig, int)} instead. - */ - @Deprecated - public final Subscription createSubscription( - ProjectSubscriptionName name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { - Subscription request = - Subscription.newBuilder() - .setName(name == null ? null : name.toString()) - .setTopic(topic) - .setPushConfig(pushConfig) - .setAckDeadlineSeconds(ackDeadlineSeconds) - .build(); - return createSubscription(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). If the subscription already - * exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns - * `NOT_FOUND`. - * - *
If the name is not provided in the request, the server will assign a random name for this - * subscription on the same project as the topic, conforming to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated name is populated in - * the returned Subscription object. Note that for REST API requests, you must specify a name in - * the request. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName name = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * TopicName topic = TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]"); - * PushConfig pushConfig = PushConfig.newBuilder().build(); - * int ackDeadlineSeconds = 2135351438; - * Subscription response = - * subscriptionAdminClient.createSubscription(name, topic, pushConfig, ackDeadlineSeconds); - * } - * }- * - * @param name Required. The name of the subscription. It must have the format - * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a - * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores - * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 - * and 255 characters in length, and it must not start with `"goog"`. - * @param topic Required. The name of the topic from which this subscription is receiving - * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be - * `_deleted-topic_` if the topic has been deleted. - * @param pushConfig If push delivery is used with this subscription, this field is used to - * configure it. An empty `pushConfig` signifies that the subscriber will pull and ack - * messages using API methods. - * @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits - * for the subscriber to acknowledge receipt before resending the message. In the interval - * after the message is delivered and before it is acknowledged, it is considered to be - * <i>outstanding</i>. During that time period, the message will not be - * redelivered (on a best-effort basis). - *
For pull subscriptions, this value is used as the initial value for the ack deadline. To - * override this value for a given message, call `ModifyAckDeadline` with the corresponding - * `ack_id` if using non-streaming pull or send the `ack_id` in a - * `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline - * you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds - * (10 minutes). If this parameter is 0, a default value of 10 seconds is used. - *
For push delivery, this value is also used to set the request timeout for the call to - * the push endpoint. - *
If the subscriber never acknowledges the message, the Pub/Sub system will eventually - * redeliver the message. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #createSubscription(SubscriptionName, TopicName, PushConfig, int)} - * instead. - */ - @Deprecated - public final Subscription createSubscription( - ProjectSubscriptionName name, - TopicName topic, - PushConfig pushConfig, - int ackDeadlineSeconds) { - Subscription request = - Subscription.newBuilder() - .setName(name == null ? null : name.toString()) - .setTopic(topic == null ? null : topic.toString()) - .setPushConfig(pushConfig) - .setAckDeadlineSeconds(ackDeadlineSeconds) - .build(); - return createSubscription(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a subscription to a given topic. See the [resource name rules] @@ -1239,33 +1026,6 @@ public final Subscription getSubscription(GetSubscriptionRequest request) { return getSubscriptionCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the configuration details of a subscription. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * Subscription response = subscriptionAdminClient.getSubscription(subscription); - * } - * }- * - * @param subscription Required. The name of the subscription to get. Format is - * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #getSubscription(SubscriptionName)} instead. - */ - @Deprecated - public final Subscription getSubscription(ProjectSubscriptionName subscription) { - GetSubscriptionRequest request = - GetSubscriptionRequest.newBuilder() - .setSubscription(subscription == null ? null : subscription.toString()) - .build(); - return getSubscription(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the configuration details of a subscription. @@ -1296,8 +1056,8 @@ public final UnaryCallable
Sample code: * @@ -1330,8 +1090,8 @@ public final Subscription updateSubscription(Subscription subscription, FieldMas // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an existing subscription. Note that certain properties of a subscription, such as its - * topic, are not modifiable. + * 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. * *
Sample code: * @@ -1360,8 +1120,8 @@ public final Subscription updateSubscription(UpdateSubscriptionRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an existing subscription. Note that certain properties of a subscription, such as its - * topic, are not modifiable. + * 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. * *
Sample code: * @@ -1650,36 +1410,6 @@ public final void deleteSubscription(DeleteSubscriptionRequest request) { deleteSubscriptionCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing subscription. All messages retained in the subscription are immediately - * dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is - * deleted, a new one may be created with the same name, but the new one has no association with - * the old subscription or its topic unless the same topic is specified. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * subscriptionAdminClient.deleteSubscription(subscription); - * } - * }- * - * @param subscription Required. The subscription to delete. Format is - * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #deleteSubscription(SubscriptionName)} instead. - */ - @Deprecated - public final void deleteSubscription(ProjectSubscriptionName subscription) { - DeleteSubscriptionRequest request = - DeleteSubscriptionRequest.newBuilder() - .setSubscription(subscription == null ? null : subscription.toString()) - .build(); - deleteSubscription(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an existing subscription. All messages retained in the subscription are immediately @@ -1742,8 +1472,8 @@ public final UnaryCallable
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * List- * - * @param subscription Required. The name of the subscription. Format is - * `projects/{project}/subscriptions/{sub}`. - * @param ackIds Required. List of acknowledgment IDs. - * @param ackDeadlineSeconds Required. The new ack deadline with respect to the time this request - * was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will - * expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might - * immediately make the message available for delivery to another subscriber client. This - * typically results in an increase in the rate of message redeliveries (that is, duplicates). - * The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is - * 600 seconds (10 minutes). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #modifyAckDeadline(SubscriptionName, ListackIds = new ArrayList<>(); - * int ackDeadlineSeconds = 2135351438; - * subscriptionAdminClient.modifyAckDeadline(subscription, ackIds, ackDeadlineSeconds); - * } - * }
Acknowledging a message whose ack deadline has expired may succeed, but such a message may - * be redelivered later. Acknowledging a message more than once will not result in an error. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * List- * - * @param subscription Required. The subscription whose message is being acknowledged. Format is - * `projects/{project}/subscriptions/{sub}`. - * @param ackIds Required. The acknowledgment ID for the messages being acknowledged that was - * returned by the Pub/Sub system in the `Pull` response. Must not be empty. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #acknowledge(SubscriptionName, ListackIds = new ArrayList<>(); - * subscriptionAdminClient.acknowledge(subscription, ackIds); - * } - * }
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * int maxMessages = 496131527; - * PullResponse response = subscriptionAdminClient.pull(subscription, maxMessages); - * } - * }- * - * @param subscription Required. The subscription from which messages should be pulled. Format is - * `projects/{project}/subscriptions/{sub}`. - * @param maxMessages Required. The maximum number of messages to return for this request. Must be - * a positive integer. The Pub/Sub system may return fewer than the number specified. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #pull(SubscriptionName, int)} instead. - */ - @Deprecated - public final PullResponse pull(ProjectSubscriptionName subscription, int maxMessages) { - PullRequest request = - PullRequest.newBuilder() - .setSubscription(subscription == null ? null : subscription.toString()) - .setMaxMessages(maxMessages) - .build(); - return pull(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many - * concurrent pull requests pending for the given subscription. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * boolean returnImmediately = true; - * int maxMessages = 496131527; - * PullResponse response = - * subscriptionAdminClient.pull(subscription, returnImmediately, maxMessages); - * } - * }- * - * @param subscription Required. The subscription from which messages should be pulled. Format is - * `projects/{project}/subscriptions/{sub}`. - * @param returnImmediately Optional. If this field set to true, the system will respond - * immediately even if it there are no messages available to return in the `Pull` response. - * Otherwise, the system may wait (for a bounded amount of time) until at least one message is - * available, rather than returning no messages. Warning: setting this field to `true` is - * discouraged because it adversely impacts the performance of `Pull` operations. We recommend - * that users do not set this field. - * @param maxMessages Required. The maximum number of messages to return for this request. Must be - * a positive integer. The Pub/Sub system may return fewer than the number specified. + * @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 - * @deprecated Use {@link #pull(SubscriptionName, boolean, int)} instead. */ - @Deprecated - final PullResponse pull( - ProjectSubscriptionName subscription, boolean returnImmediately, int maxMessages) { - PullRequest request = - PullRequest.newBuilder() - .setSubscription(subscription == null ? null : subscription.toString()) - .setReturnImmediately(returnImmediately) - .setMaxMessages(maxMessages) - .build(); - return pull(request); + public final PullResponse pull(PullRequest request) { + return pullCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -2529,44 +2107,6 @@ public final void modifyPushConfig(ModifyPushConfigRequest request) { modifyPushConfigCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Modifies the `PushConfig` for a specified subscription. - * - *
This may be used to change a push subscription to a pull one (signified by an empty - * `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push - * subscription. Messages will accumulate for delivery continuously through the call regardless of - * changes to the `PushConfig`. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * PushConfig pushConfig = PushConfig.newBuilder().build(); - * subscriptionAdminClient.modifyPushConfig(subscription, pushConfig); - * } - * }- * - * @param subscription Required. The name of the subscription. Format is - * `projects/{project}/subscriptions/{sub}`. - * @param pushConfig Required. The push configuration for future deliveries. - *
An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages - * from the given subscription and allow messages to be pulled and acknowledged - effectively - * pausing the subscription if `Pull` or `StreamingPull` is not called. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use {@link #modifyPushConfig(SubscriptionName, PushConfig)} instead. - */ - @Deprecated - public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { - ModifyPushConfigRequest request = - ModifyPushConfigRequest.newBuilder() - .setSubscription(subscription == null ? null : subscription.toString()) - .setPushConfig(pushConfig) - .build(); - modifyPushConfig(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Modifies the `PushConfig` for a specified subscription. @@ -2695,36 +2235,6 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) { return getSnapshotCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the configuration details of a snapshot. Snapshots are used in <a - * href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> operations, which - * allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment - * state of messages in an existing subscription to the state captured by a snapshot. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); - * Snapshot response = subscriptionAdminClient.getSnapshot(snapshot); - * } - * }- * - * @param snapshot Required. The name of the snapshot to get. Format is - * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use Use {@link #getSnapshot(SnapshotName)} instead. - */ - @Deprecated - public final Snapshot getSnapshot(ProjectSnapshotName snapshot) { - GetSnapshotRequest request = - GetSnapshotRequest.newBuilder() - .setSnapshot(snapshot == null ? null : snapshot.toString()) - .build(); - return getSnapshot(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the configuration details of a snapshot. Snapshots are used in @@ -3186,157 +2696,6 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) { return createSnapshotCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a snapshot from the requested subscription. Snapshots are used in - * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to - * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of - * messages in an existing subscription to the state captured by a snapshot. If the snapshot - * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns - * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would - * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the - * `Snapshot.expire_time` field. If the name is not provided in the request, the server will - * assign a random name for this snapshot on the same project as the subscription, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription); - * } - * }- * - * @param name Required. User-provided name for this snapshot. If the name is not provided in the - * request, the server will assign a random name for this snapshot on the same project as the - * subscription. Note that for REST API requests, you must specify a name. See the <a - * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name - * rules</a>. Format is `projects/{project}/snapshots/{snap}`. - * @param subscription Required. The subscription whose backlog the snapshot retains. - * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the - * subscription. More precisely, this is defined as the messages in the subscription's backlog - * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as - * well as: (b) Any messages published to the subscription's topic following the successful - * completion of the CreateSnapshot request. Format is - * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use Use {@link #createSnapshot(SnapshotName, SubscriptionName)} instead. - */ - @Deprecated - public final Snapshot createSnapshot( - ProjectSnapshotName name, ProjectSubscriptionName subscription) { - CreateSnapshotRequest request = - CreateSnapshotRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setSubscription(subscription == null ? null : subscription.toString()) - .build(); - return createSnapshot(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a snapshot from the requested subscription. Snapshots are used in - * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to - * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of - * messages in an existing subscription to the state captured by a snapshot. If the snapshot - * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns - * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would - * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the - * `Snapshot.expire_time` field. If the name is not provided in the request, the server will - * assign a random name for this snapshot on the same project as the subscription, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * String name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString(); - * ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]"); - * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription); - * } - * }- * - * @param name Required. User-provided name for this snapshot. If the name is not provided in the - * request, the server will assign a random name for this snapshot on the same project as the - * subscription. Note that for REST API requests, you must specify a name. See the <a - * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name - * rules</a>. Format is `projects/{project}/snapshots/{snap}`. - * @param subscription Required. The subscription whose backlog the snapshot retains. - * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the - * subscription. More precisely, this is defined as the messages in the subscription's backlog - * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as - * well as: (b) Any messages published to the subscription's topic following the successful - * completion of the CreateSnapshot request. Format is - * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use Use {@link #createSnapshot(String, SubscriptionName)} instead. - */ - @Deprecated - public final Snapshot createSnapshot(String name, ProjectSubscriptionName subscription) { - CreateSnapshotRequest request = - CreateSnapshotRequest.newBuilder() - .setName(name) - .setSubscription(subscription == null ? null : subscription.toString()) - .build(); - return createSnapshot(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a snapshot from the requested subscription. Snapshots are used in - * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to - * manage message acknowledgments in bulk. That is, you can set the acknowledgment state of - * messages in an existing subscription to the state captured by a snapshot. If the snapshot - * already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns - * `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would - * expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the - * `Snapshot.expire_time` field. If the name is not provided in the request, the server will - * assign a random name for this snapshot on the same project as the subscription, conforming to - * the [resource name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The - * generated name is populated in the returned Snapshot object. Note that for REST API requests, - * you must specify a name in the request. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSnapshotName name = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); - * String subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString(); - * Snapshot response = subscriptionAdminClient.createSnapshot(name, subscription); - * } - * }- * - * @param name Required. User-provided name for this snapshot. If the name is not provided in the - * request, the server will assign a random name for this snapshot on the same project as the - * subscription. Note that for REST API requests, you must specify a name. See the <a - * href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource name - * rules</a>. Format is `projects/{project}/snapshots/{snap}`. - * @param subscription Required. The subscription whose backlog the snapshot retains. - * Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the - * subscription. More precisely, this is defined as the messages in the subscription's backlog - * that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as - * well as: (b) Any messages published to the subscription's topic following the successful - * completion of the CreateSnapshot request. Format is - * `projects/{project}/subscriptions/{sub}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use Use {@link #createSnapshot(SnapshotName, String)} instead. - */ - @Deprecated - public final Snapshot createSnapshot(ProjectSnapshotName name, String subscription) { - CreateSnapshotRequest request = - CreateSnapshotRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setSubscription(subscription) - .build(); - return createSnapshot(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a snapshot from the requested subscription. Snapshots are used in @@ -3380,9 +2739,9 @@ public final UnaryCallable
Sample code: @@ -3413,9 +2772,9 @@ public final Snapshot updateSnapshot(Snapshot snapshot, FieldMask updateMask) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates 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 + * 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. * *
Sample code: @@ -3445,9 +2804,9 @@ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates 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 + * 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. * *
Sample code: @@ -3579,39 +2938,6 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) { deleteSnapshotCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes an existing snapshot. Snapshots are used in [Seek] - * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage - * message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in - * an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all - * messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new - * one may be created with the same name, but the new one has no association with the old snapshot - * or its subscription, unless the same subscription is specified. - * - *
Sample code: - * - *
{@code - * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - * ProjectSnapshotName snapshot = ProjectSnapshotName.of("[PROJECT]", "[SNAPSHOT]"); - * subscriptionAdminClient.deleteSnapshot(snapshot); - * } - * }- * - * @param snapshot Required. The name of the snapshot to delete. Format is - * `projects/{project}/snapshots/{snap}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated Use Use {@link #deleteSnapshot(SnapshotName)} instead. - */ - @Deprecated - public final void deleteSnapshot(ProjectSnapshotName snapshot) { - DeleteSnapshotRequest request = - DeleteSnapshotRequest.newBuilder() - .setSnapshot(snapshot == null ? null : snapshot.toString()) - .build(); - deleteSnapshot(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes an existing snapshot. Snapshots are used in [Seek] @@ -3743,37 +3069,6 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Sets the access control policy on the specified resource. Replaces any existing policy. - * - *
Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED - * - *
Sample code: - * - *
- * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * Policy policy = Policy.newBuilder().build();
- * Policy response = subscriptionAdminClient.setIamPolicy(formattedResource, policy);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy is being specified. See the
- * operation documentation for the appropriate value for this field.
- * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
- * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
- * Platform services (such as Projects) might reject them.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead.
- */
- @Deprecated
- public final Policy setIamPolicy(String resource, Policy policy) {
- SetIamPolicyRequest request =
- SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
- return setIamPolicy(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on the specified resource. Replacesany existing policy.
@@ -3835,31 +3130,6 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
return getIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Gets the access control policy for a resource. Returns an empty policy if the resource exists
- * and does not have a policy set.
- *
- * Sample code: - * - *
- * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * Policy response = subscriptionAdminClient.getIamPolicy(formattedResource);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead.
- */
- @Deprecated
- public final Policy getIamPolicy(String resource) {
- GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
- return getIamPolicy(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for a resource. Returns an empty policyif the resource exists
@@ -3923,44 +3193,6 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return testIamPermissionsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that a caller has on the specified resource. If the resource does not
- * exist, this will return an empty set of permissions, not a NOT_FOUND error.
- *
- * Note: This operation is designed to be used for building permission-aware UIs and - * command-line tools, not for authorization checking. This operation may "fail open" without - * warning. - * - *
Sample code: - * - *
- * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = subscriptionAdminClient.testIamPermissions(formattedResource, permissions);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @param permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead.
- */
- @Deprecated
- public final TestIamPermissionsResponse testIamPermissions(
- String resource, ListUpdateTopic
Updates an existing topic. Note that certain properties of a topic are not modifiable.
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * ProjectTopicName name = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
- * Topic response = topicAdminClient.createTopic(name);
- * }
- *
- *
- * @param name Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only
- * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
- * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in
- * length, and it must not start with `"goog"`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #createTopic(TopicName)} instead.
- */
- @Deprecated
- public final Topic createTopic(ProjectTopicName name) {
- Topic request = Topic.newBuilder().setName(name == null ? null : name.toString()).build();
- return createTopic(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates the given topic with the given name. See the [resource name rules]
@@ -565,7 +535,8 @@ public final UnaryCallableSample code: * @@ -597,7 +568,8 @@ public final Topic updateTopic(Topic topic, FieldMask updateMask) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an existing topic. Note that certain properties of a topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update mask. Note that + * certain properties of a topic are not modifiable. * *
Sample code: * @@ -626,7 +598,8 @@ public final Topic updateTopic(UpdateTopicRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an existing topic. Note that certain properties of a topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update mask. Note that + * certain properties of a topic are not modifiable. * *
Sample code: * @@ -827,31 +800,6 @@ public final Topic getTopic(String topic) { return getTopic(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the configuration of a topic. - * - *
Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
- * Topic response = topicAdminClient.getTopic(topic);
- * }
- *
- *
- * @param topic Required. The name of the topic to get. Format is
- * `projects/{project}/topics/{topic}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #getTopic(TopicName)} instead.
- */
- @Deprecated
- public final Topic getTopic(ProjectTopicName topic) {
- GetTopicRequest request =
- GetTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build();
- return getTopic(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the configuration of a topic.
@@ -1131,35 +1079,6 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t
return listTopicSubscriptions(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists the names of the subscriptions on this topic.
- *
- * Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
- * for (ProjectSubscriptionName element : topicAdminClient.listTopicSubscriptions(topic).iterateAllAsProjectSubscriptionName()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param topic Required. The name of the topic that subscriptions are attached to. Format is
- * `projects/{project}/topics/{topic}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #listTopicSubscriptions(TopicName)} instead.
- */
- @Deprecated
- public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) {
- ListTopicSubscriptionsRequest request =
- ListTopicSubscriptionsRequest.newBuilder()
- .setTopic(topic == null ? null : topic.toString())
- .build();
- return listTopicSubscriptions(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the names of the attached subscriptions on this topic.
@@ -1510,34 +1429,6 @@ public final void deleteTopic(String topic) {
deleteTopic(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a
- * topic is deleted, a new topic may be created with the same name; this is an entirely new topic
- * with none of the old configuration or subscriptions. Existing subscriptions to this topic are
- * not deleted, but their `topic` field is set to `_deleted-topic_`.
- *
- * Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * ProjectTopicName topic = ProjectTopicName.of("[PROJECT]", "[TOPIC]");
- * topicAdminClient.deleteTopic(topic);
- * }
- *
- *
- * @param topic Required. Name of the topic to delete. Format is
- * `projects/{project}/topics/{topic}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #deleteTopic(TopicName)} instead.
- */
- @Deprecated
- public final void deleteTopic(ProjectTopicName topic) {
- DeleteTopicRequest request =
- DeleteTopicRequest.newBuilder().setTopic(topic == null ? null : topic.toString()).build();
- deleteTopic(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a
@@ -1692,37 +1583,6 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
return setIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Sets the access control policy on the specified resource. Replaces any existing policy.
- *
- * Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED - * - *
Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * Policy policy = Policy.newBuilder().build();
- * Policy response = topicAdminClient.setIamPolicy(formattedResource, policy);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy is being specified. See the
- * operation documentation for the appropriate value for this field.
- * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
- * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
- * Platform services (such as Projects) might reject them.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #setIamPolicy(SetIamPolicyRequest)} instead.
- */
- @Deprecated
- public final Policy setIamPolicy(String resource, Policy policy) {
- SetIamPolicyRequest request =
- SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
- return setIamPolicy(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on the specified resource. Replacesany existing policy.
@@ -1784,31 +1644,6 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
return getIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Gets the access control policy for a resource. Returns an empty policy if the resource exists
- * and does not have a policy set.
- *
- * Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * Policy response = topicAdminClient.getIamPolicy(formattedResource);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #getIamPolicy(GetIamPolicyRequest)} instead.
- */
- @Deprecated
- public final Policy getIamPolicy(String resource) {
- GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
- return getIamPolicy(request);
- }
-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for a resource. Returns an empty policyif the resource exists
@@ -1872,44 +1707,6 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return testIamPermissionsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that a caller has on the specified resource. If the resource does not
- * exist, this will return an empty set of permissions, not a NOT_FOUND error.
- *
- * Note: This operation is designed to be used for building permission-aware UIs and - * command-line tools, not for authorization checking. This operation may "fail open" without - * warning. - * - *
Sample code: - * - *
- * try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
- * String formattedResource = ProjectTopicName.format("[PROJECT]", "[TOPIC]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = topicAdminClient.testIamPermissions(formattedResource, permissions);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @param permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- * @deprecated Use {@link #testIamPermissions(TestIamPermissionsRequest)} instead.
- */
- @Deprecated
- public final TestIamPermissionsResponse testIamPermissions(
- String resource, List* The service that an application uses to manipulate topics, and to send * messages to a topic. @@ -36,423 +19,330 @@ private PublisherGrpc() {} public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.Publisher"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic> - getCreateTopicMethod; + private static volatile io.grpc.MethodDescriptorgetCreateTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CreateTopic", requestType = com.google.pubsub.v1.Topic.class, responseType = com.google.pubsub.v1.Topic.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor - getCreateTopicMethod() { - io.grpc.MethodDescriptor - getCreateTopicMethod; + public static io.grpc.MethodDescriptor getCreateTopicMethod() { + io.grpc.MethodDescriptor getCreateTopicMethod; if ((getCreateTopicMethod = PublisherGrpc.getCreateTopicMethod) == null) { synchronized (PublisherGrpc.class) { if ((getCreateTopicMethod = PublisherGrpc.getCreateTopicMethod) == null) { - PublisherGrpc.getCreateTopicMethod = - getCreateTopicMethod = - io.grpc.MethodDescriptor - . newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTopic")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.Topic.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.Topic.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("CreateTopic")) - .build(); + PublisherGrpc.getCreateTopicMethod = getCreateTopicMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTopic")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Topic.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Topic.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("CreateTopic")) + .build(); } } } return getCreateTopicMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.UpdateTopicRequest, com.google.pubsub.v1.Topic> - getUpdateTopicMethod; + private static volatile io.grpc.MethodDescriptor getUpdateTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "UpdateTopic", requestType = com.google.pubsub.v1.UpdateTopicRequest.class, responseType = com.google.pubsub.v1.Topic.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.UpdateTopicRequest, com.google.pubsub.v1.Topic> - getUpdateTopicMethod() { - io.grpc.MethodDescriptor - getUpdateTopicMethod; + public static io.grpc.MethodDescriptor getUpdateTopicMethod() { + io.grpc.MethodDescriptor getUpdateTopicMethod; if ((getUpdateTopicMethod = PublisherGrpc.getUpdateTopicMethod) == null) { synchronized (PublisherGrpc.class) { if ((getUpdateTopicMethod = PublisherGrpc.getUpdateTopicMethod) == null) { - PublisherGrpc.getUpdateTopicMethod = - getUpdateTopicMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTopic")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.UpdateTopicRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.Topic.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("UpdateTopic")) - .build(); + PublisherGrpc.getUpdateTopicMethod = getUpdateTopicMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTopic")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.UpdateTopicRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Topic.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("UpdateTopic")) + .build(); } } } return getUpdateTopicMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.PublishRequest, com.google.pubsub.v1.PublishResponse> - getPublishMethod; + private static volatile io.grpc.MethodDescriptor getPublishMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Publish", requestType = com.google.pubsub.v1.PublishRequest.class, responseType = com.google.pubsub.v1.PublishResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.PublishRequest, com.google.pubsub.v1.PublishResponse> - getPublishMethod() { - io.grpc.MethodDescriptor< - com.google.pubsub.v1.PublishRequest, com.google.pubsub.v1.PublishResponse> - getPublishMethod; + public static io.grpc.MethodDescriptor getPublishMethod() { + io.grpc.MethodDescriptor getPublishMethod; if ((getPublishMethod = PublisherGrpc.getPublishMethod) == null) { synchronized (PublisherGrpc.class) { if ((getPublishMethod = PublisherGrpc.getPublishMethod) == null) { - PublisherGrpc.getPublishMethod = - getPublishMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Publish")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.PublishRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.PublishResponse.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("Publish")) - .build(); + PublisherGrpc.getPublishMethod = getPublishMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Publish")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.PublishRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.PublishResponse.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("Publish")) + .build(); } } } return getPublishMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.GetTopicRequest, com.google.pubsub.v1.Topic> - getGetTopicMethod; + private static volatile io.grpc.MethodDescriptor getGetTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetTopic", requestType = com.google.pubsub.v1.GetTopicRequest.class, responseType = com.google.pubsub.v1.Topic.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.GetTopicRequest, com.google.pubsub.v1.Topic> - getGetTopicMethod() { - io.grpc.MethodDescriptor - getGetTopicMethod; + public static io.grpc.MethodDescriptor getGetTopicMethod() { + io.grpc.MethodDescriptor getGetTopicMethod; if ((getGetTopicMethod = PublisherGrpc.getGetTopicMethod) == null) { synchronized (PublisherGrpc.class) { if ((getGetTopicMethod = PublisherGrpc.getGetTopicMethod) == null) { - PublisherGrpc.getGetTopicMethod = - getGetTopicMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopic")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.GetTopicRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.Topic.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("GetTopic")) - .build(); + PublisherGrpc.getGetTopicMethod = getGetTopicMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopic")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.GetTopicRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Topic.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("GetTopic")) + .build(); } } } return getGetTopicMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicsRequest, com.google.pubsub.v1.ListTopicsResponse> - getListTopicsMethod; + private static volatile io.grpc.MethodDescriptor getListTopicsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ListTopics", requestType = com.google.pubsub.v1.ListTopicsRequest.class, responseType = com.google.pubsub.v1.ListTopicsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicsRequest, com.google.pubsub.v1.ListTopicsResponse> - getListTopicsMethod() { - io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicsRequest, com.google.pubsub.v1.ListTopicsResponse> - getListTopicsMethod; + public static io.grpc.MethodDescriptor getListTopicsMethod() { + io.grpc.MethodDescriptor getListTopicsMethod; if ((getListTopicsMethod = PublisherGrpc.getListTopicsMethod) == null) { synchronized (PublisherGrpc.class) { if ((getListTopicsMethod = PublisherGrpc.getListTopicsMethod) == null) { - PublisherGrpc.getListTopicsMethod = - getListTopicsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopics")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicsResponse.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("ListTopics")) - .build(); + PublisherGrpc.getListTopicsMethod = getListTopicsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopics")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("ListTopics")) + .build(); } } } return getListTopicsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSubscriptionsRequest, - com.google.pubsub.v1.ListTopicSubscriptionsResponse> - getListTopicSubscriptionsMethod; + private static volatile io.grpc.MethodDescriptor getListTopicSubscriptionsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ListTopicSubscriptions", requestType = com.google.pubsub.v1.ListTopicSubscriptionsRequest.class, responseType = com.google.pubsub.v1.ListTopicSubscriptionsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSubscriptionsRequest, - com.google.pubsub.v1.ListTopicSubscriptionsResponse> - getListTopicSubscriptionsMethod() { - io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSubscriptionsRequest, - com.google.pubsub.v1.ListTopicSubscriptionsResponse> - getListTopicSubscriptionsMethod; + public static io.grpc.MethodDescriptor getListTopicSubscriptionsMethod() { + io.grpc.MethodDescriptor getListTopicSubscriptionsMethod; if ((getListTopicSubscriptionsMethod = PublisherGrpc.getListTopicSubscriptionsMethod) == null) { synchronized (PublisherGrpc.class) { - if ((getListTopicSubscriptionsMethod = PublisherGrpc.getListTopicSubscriptionsMethod) - == null) { - PublisherGrpc.getListTopicSubscriptionsMethod = - getListTopicSubscriptionsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListTopicSubscriptions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicSubscriptionsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicSubscriptionsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PublisherMethodDescriptorSupplier("ListTopicSubscriptions")) - .build(); + if ((getListTopicSubscriptionsMethod = PublisherGrpc.getListTopicSubscriptionsMethod) == null) { + PublisherGrpc.getListTopicSubscriptionsMethod = getListTopicSubscriptionsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopicSubscriptions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicSubscriptionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicSubscriptionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("ListTopicSubscriptions")) + .build(); } } } return getListTopicSubscriptionsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSnapshotsRequest, - com.google.pubsub.v1.ListTopicSnapshotsResponse> - getListTopicSnapshotsMethod; + private static volatile io.grpc.MethodDescriptor getListTopicSnapshotsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ListTopicSnapshots", requestType = com.google.pubsub.v1.ListTopicSnapshotsRequest.class, responseType = com.google.pubsub.v1.ListTopicSnapshotsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSnapshotsRequest, - com.google.pubsub.v1.ListTopicSnapshotsResponse> - getListTopicSnapshotsMethod() { - io.grpc.MethodDescriptor< - com.google.pubsub.v1.ListTopicSnapshotsRequest, - com.google.pubsub.v1.ListTopicSnapshotsResponse> - getListTopicSnapshotsMethod; + public static io.grpc.MethodDescriptor getListTopicSnapshotsMethod() { + io.grpc.MethodDescriptor getListTopicSnapshotsMethod; if ((getListTopicSnapshotsMethod = PublisherGrpc.getListTopicSnapshotsMethod) == null) { synchronized (PublisherGrpc.class) { if ((getListTopicSnapshotsMethod = PublisherGrpc.getListTopicSnapshotsMethod) == null) { - PublisherGrpc.getListTopicSnapshotsMethod = - getListTopicSnapshotsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopicSnapshots")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicSnapshotsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance())) - .setSchemaDescriptor( - new PublisherMethodDescriptorSupplier("ListTopicSnapshots")) - .build(); + PublisherGrpc.getListTopicSnapshotsMethod = getListTopicSnapshotsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopicSnapshots")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicSnapshotsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("ListTopicSnapshots")) + .build(); } } } return getListTopicSnapshotsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.DeleteTopicRequest, com.google.protobuf.Empty> - getDeleteTopicMethod; + private static volatile io.grpc.MethodDescriptor getDeleteTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DeleteTopic", requestType = com.google.pubsub.v1.DeleteTopicRequest.class, responseType = com.google.protobuf.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.pubsub.v1.DeleteTopicRequest, com.google.protobuf.Empty> - getDeleteTopicMethod() { - io.grpc.MethodDescriptor - getDeleteTopicMethod; + public static io.grpc.MethodDescriptor getDeleteTopicMethod() { + io.grpc.MethodDescriptor getDeleteTopicMethod; if ((getDeleteTopicMethod = PublisherGrpc.getDeleteTopicMethod) == null) { synchronized (PublisherGrpc.class) { if ((getDeleteTopicMethod = PublisherGrpc.getDeleteTopicMethod) == null) { - PublisherGrpc.getDeleteTopicMethod = - getDeleteTopicMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTopic")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.pubsub.v1.DeleteTopicRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("DeleteTopic")) - .build(); + PublisherGrpc.getDeleteTopicMethod = getDeleteTopicMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTopic")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DeleteTopicRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("DeleteTopic")) + .build(); } } } return getDeleteTopicMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.pubsub.v1.DetachSubscriptionRequest, - com.google.pubsub.v1.DetachSubscriptionResponse> - getDetachSubscriptionMethod; + private static volatile io.grpc.MethodDescriptor 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; + public static io.grpc.MethodDescriptor getDetachSubscriptionMethod() { + io.grpc.MethodDescriptor 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(); + 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 */ + /** + * 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 = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublisherStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PublisherStub(channel, callOptions); + } + }; return PublisherStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public static PublisherBlockingStub newBlockingStub(io.grpc.Channel channel) { + public static PublisherBlockingStub newBlockingStub( + io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public PublisherBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublisherBlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public PublisherBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PublisherBlockingStub(channel, callOptions); + } + }; return PublisherBlockingStub.newStub(factory, channel); } - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PublisherFutureStub newFutureStub(io.grpc.Channel channel) { + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static PublisherFutureStub newFutureStub( + io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public PublisherFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublisherFutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public PublisherFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PublisherFutureStub(channel, callOptions); + } + }; return PublisherFutureStub.newStub(factory, channel); } /** - * - * * * The service that an application uses to manipulate topics, and to send * messages to a topic. @@ -461,93 +351,69 @@ public PublisherFutureStub newStub( public interface AsyncService { /** - * - * ** Creates the given topic with the given name. See the [resource name rules] * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). **/ - default void createTopic( - com.google.pubsub.v1.Topic request, + default void createTopic(com.google.pubsub.v1.Topic request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateTopicMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTopicMethod(), responseObserver); } /** - * - * * - * Updates an existing topic. Note that certain properties of a - * topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update + * mask. Note that certain properties of a topic are not modifiable. **/ - default void updateTopic( - com.google.pubsub.v1.UpdateTopicRequest request, + default void updateTopic(com.google.pubsub.v1.UpdateTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateTopicMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateTopicMethod(), responseObserver); } /** - * - * * * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic * does not exist. **/ - default void publish( - com.google.pubsub.v1.PublishRequest request, + default void publish(com.google.pubsub.v1.PublishRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublishMethod(), responseObserver); } /** - * - * * * Gets the configuration of a topic. **/ - default void getTopic( - com.google.pubsub.v1.GetTopicRequest request, + default void getTopic(com.google.pubsub.v1.GetTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopicMethod(), responseObserver); } /** - * - * * * Lists matching topics. **/ - default void listTopics( - com.google.pubsub.v1.ListTopicsRequest request, + default void listTopics(com.google.pubsub.v1.ListTopicsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopicsMethod(), responseObserver); } /** - * - * * * Lists the names of the attached subscriptions on this topic. **/ - default void listTopicSubscriptions( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request, - io.grpc.stub.StreamObserver- responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListTopicSubscriptionsMethod(), responseObserver); + default void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopicSubscriptionsMethod(), responseObserver); } /** - * - * * * Lists the names of the snapshots on this topic. Snapshots are used in * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, @@ -556,17 +422,12 @@ default void listTopicSubscriptions( * state captured by a snapshot. **/ - default void listTopicSnapshots( - com.google.pubsub.v1.ListTopicSnapshotsRequest request, - io.grpc.stub.StreamObserver- responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListTopicSnapshotsMethod(), responseObserver); + default void listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopicSnapshotsMethod(), responseObserver); } /** - * - * * * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic * does not exist. After a topic is deleted, a new topic may be created with @@ -575,16 +436,12 @@ default void listTopicSnapshots( * not deleted, but their `topic` field is set to `_deleted-topic_`. **/ - default void deleteTopic( - com.google.pubsub.v1.DeleteTopicRequest request, + default void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteTopicMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteTopicMethod(), responseObserver); } /** - * - * * * Detaches a subscription from this topic. All messages retained in the * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests @@ -592,146 +449,117 @@ default void deleteTopic( * subscription, pushes to the endpoint will stop. **/ - default void detachSubscription( - com.google.pubsub.v1.DetachSubscriptionRequest request, - io.grpc.stub.StreamObserver- responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDetachSubscriptionMethod(), responseObserver); + default void detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDetachSubscriptionMethod(), responseObserver); } } /** * Base class for the server implementation of the service Publisher. - * * * The service that an application uses to manipulate topics, and to send * messages to a topic. **/ - public abstract static class PublisherImplBase implements io.grpc.BindableService, AsyncService { + public static abstract class PublisherImplBase + implements io.grpc.BindableService, AsyncService { - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return PublisherGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Publisher. - * ** The service that an application uses to manipulate topics, and to send * messages to a topic. **/ - public static final class PublisherStub extends io.grpc.stub.AbstractAsyncStub{ - private PublisherStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class PublisherStub + extends io.grpc.stub.AbstractAsyncStub { + private PublisherStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected PublisherStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected PublisherStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherStub(channel, callOptions); } /** - * - * * * Creates the given topic with the given name. See the [resource name rules] * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). **/ - public void createTopic( - com.google.pubsub.v1.Topic request, + public void createTopic(com.google.pubsub.v1.Topic request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateTopicMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getCreateTopicMethod(), getCallOptions()), request, responseObserver); } /** - * - * * - * Updates an existing topic. Note that certain properties of a - * topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update + * mask. Note that certain properties of a topic are not modifiable. **/ - public void updateTopic( - com.google.pubsub.v1.UpdateTopicRequest request, + public void updateTopic(com.google.pubsub.v1.UpdateTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateTopicMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getUpdateTopicMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic * does not exist. **/ - public void publish( - com.google.pubsub.v1.PublishRequest request, + public void publish(com.google.pubsub.v1.PublishRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPublishMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Gets the configuration of a topic. **/ - public void getTopic( - com.google.pubsub.v1.GetTopicRequest request, + public void getTopic(com.google.pubsub.v1.GetTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetTopicMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Lists matching topics. **/ - public void listTopics( - com.google.pubsub.v1.ListTopicsRequest request, + public void listTopics(com.google.pubsub.v1.ListTopicsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getListTopicsMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Lists the names of the attached subscriptions on this topic. **/ - public void listTopicSubscriptions( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request, - io.grpc.stub.StreamObserver- responseObserver) { + public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopicSubscriptionsMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListTopicSubscriptionsMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Lists the names of the snapshots on this topic. Snapshots are used in * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, @@ -740,19 +568,13 @@ public void listTopicSubscriptions( * state captured by a snapshot. **/ - public void listTopicSnapshots( - com.google.pubsub.v1.ListTopicSnapshotsRequest request, - io.grpc.stub.StreamObserver- responseObserver) { + public void listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopicSnapshotsMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListTopicSnapshotsMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic * does not exist. After a topic is deleted, a new topic may be created with @@ -761,18 +583,13 @@ public void listTopicSnapshots( * not deleted, but their `topic` field is set to `_deleted-topic_`. **/ - public void deleteTopic( - com.google.pubsub.v1.DeleteTopicRequest request, + public void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteTopicMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getDeleteTopicMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Detaches a subscription from this topic. All messages retained in the * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests @@ -780,20 +597,15 @@ public void deleteTopic( * subscription, pushes to the endpoint will stop. **/ - public void detachSubscription( - com.google.pubsub.v1.DetachSubscriptionRequest request, - io.grpc.stub.StreamObserver- responseObserver) { + public void detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Publisher. - * * * The service that an application uses to manipulate topics, and to send * messages to a topic. @@ -801,7 +613,8 @@ public void detachSubscription( */ public static final class PublisherBlockingStub extends io.grpc.stub.AbstractBlockingStub{ - private PublisherBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private PublisherBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -812,8 +625,6 @@ protected PublisherBlockingStub build( } /** - * - * * * Creates the given topic with the given name. See the [resource name rules] * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). @@ -825,11 +636,9 @@ public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request } /** - * - * *- * Updates an existing topic. Note that certain properties of a - * topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update + * mask. Note that certain properties of a topic are not modifiable. **/ public com.google.pubsub.v1.Topic updateTopic(com.google.pubsub.v1.UpdateTopicRequest request) { @@ -838,22 +647,17 @@ public com.google.pubsub.v1.Topic updateTopic(com.google.pubsub.v1.UpdateTopicRe } /** - * - * ** Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic * does not exist. **/ - public com.google.pubsub.v1.PublishResponse publish( - com.google.pubsub.v1.PublishRequest request) { + public com.google.pubsub.v1.PublishResponse publish(com.google.pubsub.v1.PublishRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPublishMethod(), getCallOptions(), request); } /** - * - * ** Gets the configuration of a topic. *@@ -864,34 +668,26 @@ public com.google.pubsub.v1.Topic getTopic(com.google.pubsub.v1.GetTopicRequest } /** - * - * ** Lists matching topics. **/ - public com.google.pubsub.v1.ListTopicsResponse listTopics( - com.google.pubsub.v1.ListTopicsRequest request) { + public com.google.pubsub.v1.ListTopicsResponse listTopics(com.google.pubsub.v1.ListTopicsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListTopicsMethod(), getCallOptions(), request); } /** - * - * ** Lists the names of the attached subscriptions on this topic. **/ - public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { + public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListTopicSubscriptionsMethod(), getCallOptions(), request); } /** - * - * ** Lists the names of the snapshots on this topic. Snapshots are used in * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, @@ -900,15 +696,12 @@ public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscription * state captured by a snapshot. **/ - public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots( - com.google.pubsub.v1.ListTopicSnapshotsRequest request) { + public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListTopicSnapshotsMethod(), getCallOptions(), request); } /** - * - * ** Deletes the topic with the given name. Returns `NOT_FOUND` if the topic * does not exist. After a topic is deleted, a new topic may be created with @@ -923,8 +716,6 @@ public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicReq } /** - * - * ** Detaches a subscription from this topic. All messages retained in the * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests @@ -932,8 +723,7 @@ public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicReq * subscription, pushes to the endpoint will stop. **/ - public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( - com.google.pubsub.v1.DetachSubscriptionRequest request) { + public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDetachSubscriptionMethod(), getCallOptions(), request); } @@ -941,7 +731,6 @@ public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Publisher. - * ** The service that an application uses to manipulate topics, and to send * messages to a topic. @@ -949,60 +738,54 @@ public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( */ public static final class PublisherFutureStub extends io.grpc.stub.AbstractFutureStub*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ListTopicsResponse> - listTopics(com.google.pubsub.v1.ListTopicsRequest request) { + public com.google.common.util.concurrent.ListenableFuture{ - private PublisherFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private PublisherFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected PublisherFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected PublisherFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherFutureStub(channel, callOptions); } /** - * - * * * Creates the given topic with the given name. See the [resource name rules] * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). **/ - public com.google.common.util.concurrent.ListenableFuture- createTopic(com.google.pubsub.v1.Topic request) { + public com.google.common.util.concurrent.ListenableFuture createTopic( + com.google.pubsub.v1.Topic request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateTopicMethod(), getCallOptions()), request); } /** - * - * * - * Updates an existing topic. Note that certain properties of a - * topic are not modifiable. + * Updates an existing topic by updating the fields specified in the update + * mask. Note that certain properties of a topic are not modifiable. **/ - public com.google.common.util.concurrent.ListenableFuture- updateTopic(com.google.pubsub.v1.UpdateTopicRequest request) { + public com.google.common.util.concurrent.ListenableFuture updateTopic( + com.google.pubsub.v1.UpdateTopicRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getUpdateTopicMethod(), getCallOptions()), request); } /** - * - * * * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic * does not exist. **/ - public com.google.common.util.concurrent.ListenableFuture- publish(com.google.pubsub.v1.PublishRequest request) { + public com.google.common.util.concurrent.ListenableFuture publish( + com.google.pubsub.v1.PublishRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPublishMethod(), getCallOptions()), request); } /** - * - * * * Gets the configuration of a topic. *@@ -1014,36 +797,28 @@ public com.google.common.util.concurrent.ListenableFuture* Lists matching topics. * listTopics( + com.google.pubsub.v1.ListTopicsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListTopicsMethod(), getCallOptions()), request); } /** - * - * * * Lists the names of the attached subscriptions on this topic. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ListTopicSubscriptionsResponse> - listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { + public com.google.common.util.concurrent.ListenableFuturelistTopicSubscriptions( + com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListTopicSubscriptionsMethod(), getCallOptions()), request); } /** - * - * * * Lists the names of the snapshots on this topic. Snapshots are used in * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, @@ -1052,16 +827,13 @@ public com.google.common.util.concurrent.ListenableFuture*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.ListTopicSnapshotsResponse> - listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request) { + public com.google.common.util.concurrent.ListenableFuture listTopicSnapshots( + com.google.pubsub.v1.ListTopicSnapshotsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListTopicSnapshotsMethod(), getCallOptions()), request); } /** - * - * * * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic * does not exist. After a topic is deleted, a new topic may be created with @@ -1070,15 +842,13 @@ public com.google.common.util.concurrent.ListenableFuture*/ - public com.google.common.util.concurrent.ListenableFuture - deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request) { + public com.google.common.util.concurrent.ListenableFuture deleteTopic( + com.google.pubsub.v1.DeleteTopicRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteTopicMethod(), getCallOptions()), request); } /** - * - * * * Detaches a subscription from this topic. All messages retained in the * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests @@ -1086,9 +856,8 @@ public com.google.common.util.concurrent.ListenableFuture*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.pubsub.v1.DetachSubscriptionResponse> - detachSubscription(com.google.pubsub.v1.DetachSubscriptionRequest request) { + public com.google.common.util.concurrent.ListenableFuture detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDetachSubscriptionMethod(), getCallOptions()), request); } @@ -1104,11 +873,11 @@ public com.google.common.util.concurrent.ListenableFuture - implements io.grpc.stub.ServerCalls.UnaryMethod , - io.grpc.stub.ServerCalls.ServerStreamingMethod , - io.grpc.stub.ServerCalls.ClientStreamingMethod , - io.grpc.stub.ServerCalls.BidiStreamingMethod { + 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; @@ -1122,53 +891,40 @@ private static final class MethodHandlers public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_CREATE_TOPIC: - serviceImpl.createTopic( - (com.google.pubsub.v1.Topic) request, + serviceImpl.createTopic((com.google.pubsub.v1.Topic) request, (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_UPDATE_TOPIC: - serviceImpl.updateTopic( - (com.google.pubsub.v1.UpdateTopicRequest) request, + serviceImpl.updateTopic((com.google.pubsub.v1.UpdateTopicRequest) request, (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_PUBLISH: - serviceImpl.publish( - (com.google.pubsub.v1.PublishRequest) request, + serviceImpl.publish((com.google.pubsub.v1.PublishRequest) request, (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_GET_TOPIC: - serviceImpl.getTopic( - (com.google.pubsub.v1.GetTopicRequest) request, + serviceImpl.getTopic((com.google.pubsub.v1.GetTopicRequest) request, (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_LIST_TOPICS: - serviceImpl.listTopics( - (com.google.pubsub.v1.ListTopicsRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.listTopics((com.google.pubsub.v1.ListTopicsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_LIST_TOPIC_SUBSCRIPTIONS: - serviceImpl.listTopicSubscriptions( - (com.google.pubsub.v1.ListTopicSubscriptionsRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.listTopicSubscriptions((com.google.pubsub.v1.ListTopicSubscriptionsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_LIST_TOPIC_SNAPSHOTS: - serviceImpl.listTopicSnapshots( - (com.google.pubsub.v1.ListTopicSnapshotsRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.listTopicSnapshots((com.google.pubsub.v1.ListTopicSnapshotsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_DELETE_TOPIC: - serviceImpl.deleteTopic( - (com.google.pubsub.v1.DeleteTopicRequest) request, + serviceImpl.deleteTopic((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); + serviceImpl.detachSubscription((com.google.pubsub.v1.DetachSubscriptionRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; default: throw new AssertionError(); @@ -1189,67 +945,73 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCreateTopicMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers ( - service, METHODID_CREATE_TOPIC))) + getCreateTopicMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.Topic, + com.google.pubsub.v1.Topic>( + service, METHODID_CREATE_TOPIC))) .addMethod( - getUpdateTopicMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.UpdateTopicRequest, com.google.pubsub.v1.Topic>( - service, METHODID_UPDATE_TOPIC))) + getUpdateTopicMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.UpdateTopicRequest, + com.google.pubsub.v1.Topic>( + service, METHODID_UPDATE_TOPIC))) .addMethod( - getPublishMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.PublishRequest, com.google.pubsub.v1.PublishResponse>( - service, METHODID_PUBLISH))) + getPublishMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.PublishRequest, + com.google.pubsub.v1.PublishResponse>( + service, METHODID_PUBLISH))) .addMethod( - getGetTopicMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.GetTopicRequest, com.google.pubsub.v1.Topic>( - service, METHODID_GET_TOPIC))) + getGetTopicMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.GetTopicRequest, + com.google.pubsub.v1.Topic>( + service, METHODID_GET_TOPIC))) .addMethod( - getListTopicsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.ListTopicsRequest, - com.google.pubsub.v1.ListTopicsResponse>(service, METHODID_LIST_TOPICS))) + getListTopicsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.ListTopicsRequest, + com.google.pubsub.v1.ListTopicsResponse>( + service, METHODID_LIST_TOPICS))) .addMethod( - getListTopicSubscriptionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.ListTopicSubscriptionsRequest, - com.google.pubsub.v1.ListTopicSubscriptionsResponse>( - service, METHODID_LIST_TOPIC_SUBSCRIPTIONS))) + getListTopicSubscriptionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.ListTopicSubscriptionsRequest, + com.google.pubsub.v1.ListTopicSubscriptionsResponse>( + service, METHODID_LIST_TOPIC_SUBSCRIPTIONS))) .addMethod( - getListTopicSnapshotsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.ListTopicSnapshotsRequest, - com.google.pubsub.v1.ListTopicSnapshotsResponse>( - service, METHODID_LIST_TOPIC_SNAPSHOTS))) + getListTopicSnapshotsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.ListTopicSnapshotsRequest, + com.google.pubsub.v1.ListTopicSnapshotsResponse>( + service, METHODID_LIST_TOPIC_SNAPSHOTS))) .addMethod( - getDeleteTopicMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.DeleteTopicRequest, com.google.protobuf.Empty>( - service, METHODID_DELETE_TOPIC))) + getDeleteTopicMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.DeleteTopicRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_TOPIC))) .addMethod( - getDetachSubscriptionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.pubsub.v1.DetachSubscriptionRequest, - com.google.pubsub.v1.DetachSubscriptionResponse>( - service, METHODID_DETACH_SUBSCRIPTION))) + getDetachSubscriptionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.DetachSubscriptionRequest, + com.google.pubsub.v1.DetachSubscriptionResponse>( + service, METHODID_DETACH_SUBSCRIPTION))) .build(); } - private abstract static class PublisherBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private static abstract class PublisherBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PublisherBaseDescriptorSupplier() {} @java.lang.Override @@ -1291,20 +1053,18 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (PublisherGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PublisherFileDescriptorSupplier()) - .addMethod(getCreateTopicMethod()) - .addMethod(getUpdateTopicMethod()) - .addMethod(getPublishMethod()) - .addMethod(getGetTopicMethod()) - .addMethod(getListTopicsMethod()) - .addMethod(getListTopicSubscriptionsMethod()) - .addMethod(getListTopicSnapshotsMethod()) - .addMethod(getDeleteTopicMethod()) - .addMethod(getDetachSubscriptionMethod()) - .build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PublisherFileDescriptorSupplier()) + .addMethod(getCreateTopicMethod()) + .addMethod(getUpdateTopicMethod()) + .addMethod(getPublishMethod()) + .addMethod(getGetTopicMethod()) + .addMethod(getListTopicsMethod()) + .addMethod(getListTopicSubscriptionsMethod()) + .addMethod(getListTopicSnapshotsMethod()) + .addMethod(getDeleteTopicMethod()) + .addMethod(getDetachSubscriptionMethod()) + .build(); } } } diff --git a/owl-bot-staging/v1/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java b/owl-bot-staging/v1/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java new file mode 100644 index 000000000..331f67936 --- /dev/null +++ b/owl-bot-staging/v1/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java @@ -0,0 +1,1097 @@ +package com.google.pubsub.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * Service for doing schema-related operations. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/pubsub/v1/schema.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SchemaServiceGrpc { + + private SchemaServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.pubsub.v1.SchemaService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptorgetCreateSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSchema", + requestType = com.google.pubsub.v1.CreateSchemaRequest.class, + responseType = com.google.pubsub.v1.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateSchemaMethod() { + io.grpc.MethodDescriptor getCreateSchemaMethod; + if ((getCreateSchemaMethod = SchemaServiceGrpc.getCreateSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getCreateSchemaMethod = SchemaServiceGrpc.getCreateSchemaMethod) == null) { + SchemaServiceGrpc.getCreateSchemaMethod = getCreateSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.CreateSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("CreateSchema")) + .build(); + } + } + } + return getCreateSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSchema", + requestType = com.google.pubsub.v1.GetSchemaRequest.class, + responseType = com.google.pubsub.v1.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSchemaMethod() { + io.grpc.MethodDescriptor getGetSchemaMethod; + if ((getGetSchemaMethod = SchemaServiceGrpc.getGetSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getGetSchemaMethod = SchemaServiceGrpc.getGetSchemaMethod) == null) { + SchemaServiceGrpc.getGetSchemaMethod = getGetSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.GetSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("GetSchema")) + .build(); + } + } + } + return getGetSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSchemasMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSchemas", + requestType = com.google.pubsub.v1.ListSchemasRequest.class, + responseType = com.google.pubsub.v1.ListSchemasResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSchemasMethod() { + io.grpc.MethodDescriptor getListSchemasMethod; + if ((getListSchemasMethod = SchemaServiceGrpc.getListSchemasMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getListSchemasMethod = SchemaServiceGrpc.getListSchemasMethod) == null) { + SchemaServiceGrpc.getListSchemasMethod = getListSchemasMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSchemas")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListSchemasRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListSchemasResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ListSchemas")) + .build(); + } + } + } + return getListSchemasMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSchemaRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSchemaRevisions", + requestType = com.google.pubsub.v1.ListSchemaRevisionsRequest.class, + responseType = com.google.pubsub.v1.ListSchemaRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSchemaRevisionsMethod() { + io.grpc.MethodDescriptor getListSchemaRevisionsMethod; + if ((getListSchemaRevisionsMethod = SchemaServiceGrpc.getListSchemaRevisionsMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getListSchemaRevisionsMethod = SchemaServiceGrpc.getListSchemaRevisionsMethod) == null) { + SchemaServiceGrpc.getListSchemaRevisionsMethod = getListSchemaRevisionsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSchemaRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListSchemaRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ListSchemaRevisionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ListSchemaRevisions")) + .build(); + } + } + } + return getListSchemaRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCommitSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CommitSchema", + requestType = com.google.pubsub.v1.CommitSchemaRequest.class, + responseType = com.google.pubsub.v1.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCommitSchemaMethod() { + io.grpc.MethodDescriptor getCommitSchemaMethod; + if ((getCommitSchemaMethod = SchemaServiceGrpc.getCommitSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getCommitSchemaMethod = SchemaServiceGrpc.getCommitSchemaMethod) == null) { + SchemaServiceGrpc.getCommitSchemaMethod = getCommitSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CommitSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.CommitSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("CommitSchema")) + .build(); + } + } + } + return getCommitSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getRollbackSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollbackSchema", + requestType = com.google.pubsub.v1.RollbackSchemaRequest.class, + responseType = com.google.pubsub.v1.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRollbackSchemaMethod() { + io.grpc.MethodDescriptor getRollbackSchemaMethod; + if ((getRollbackSchemaMethod = SchemaServiceGrpc.getRollbackSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getRollbackSchemaMethod = SchemaServiceGrpc.getRollbackSchemaMethod) == null) { + SchemaServiceGrpc.getRollbackSchemaMethod = getRollbackSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.RollbackSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("RollbackSchema")) + .build(); + } + } + } + return getRollbackSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSchemaRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSchemaRevision", + requestType = com.google.pubsub.v1.DeleteSchemaRevisionRequest.class, + responseType = com.google.pubsub.v1.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSchemaRevisionMethod() { + io.grpc.MethodDescriptor getDeleteSchemaRevisionMethod; + if ((getDeleteSchemaRevisionMethod = SchemaServiceGrpc.getDeleteSchemaRevisionMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getDeleteSchemaRevisionMethod = SchemaServiceGrpc.getDeleteSchemaRevisionMethod) == null) { + SchemaServiceGrpc.getDeleteSchemaRevisionMethod = getDeleteSchemaRevisionMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSchemaRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DeleteSchemaRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("DeleteSchemaRevision")) + .build(); + } + } + } + return getDeleteSchemaRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSchema", + requestType = com.google.pubsub.v1.DeleteSchemaRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSchemaMethod() { + io.grpc.MethodDescriptor getDeleteSchemaMethod; + if ((getDeleteSchemaMethod = SchemaServiceGrpc.getDeleteSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getDeleteSchemaMethod = SchemaServiceGrpc.getDeleteSchemaMethod) == null) { + SchemaServiceGrpc.getDeleteSchemaMethod = getDeleteSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.DeleteSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("DeleteSchema")) + .build(); + } + } + } + return getDeleteSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidateSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateSchema", + requestType = com.google.pubsub.v1.ValidateSchemaRequest.class, + responseType = com.google.pubsub.v1.ValidateSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidateSchemaMethod() { + io.grpc.MethodDescriptor getValidateSchemaMethod; + if ((getValidateSchemaMethod = SchemaServiceGrpc.getValidateSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getValidateSchemaMethod = SchemaServiceGrpc.getValidateSchemaMethod) == null) { + SchemaServiceGrpc.getValidateSchemaMethod = getValidateSchemaMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ValidateSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ValidateSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ValidateSchema")) + .build(); + } + } + } + return getValidateSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidateMessageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateMessage", + requestType = com.google.pubsub.v1.ValidateMessageRequest.class, + responseType = com.google.pubsub.v1.ValidateMessageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidateMessageMethod() { + io.grpc.MethodDescriptor getValidateMessageMethod; + if ((getValidateMessageMethod = SchemaServiceGrpc.getValidateMessageMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getValidateMessageMethod = SchemaServiceGrpc.getValidateMessageMethod) == null) { + SchemaServiceGrpc.getValidateMessageMethod = getValidateMessageMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateMessage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ValidateMessageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.ValidateMessageResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ValidateMessage")) + .build(); + } + } + } + return getValidateMessageMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SchemaServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public SchemaServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + }; + return SchemaServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SchemaServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public SchemaServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + }; + return SchemaServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SchemaServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public SchemaServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + }; + return SchemaServiceFutureStub.newStub(factory, channel); + } + + /** + * + * Service for doing schema-related operations. + *+ */ + public interface AsyncService { + + /** + *+ * Creates a schema. + *+ */ + default void createSchema(com.google.pubsub.v1.CreateSchemaRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSchemaMethod(), responseObserver); + } + + /** + * + * Gets a schema. + *+ */ + default void getSchema(com.google.pubsub.v1.GetSchemaRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSchemaMethod(), responseObserver); + } + + /** + * + * Lists schemas in a project. + *+ */ + default void listSchemas(com.google.pubsub.v1.ListSchemasRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSchemasMethod(), responseObserver); + } + + /** + * + * Lists all schema revisions for the named schema. + *+ */ + default void listSchemaRevisions(com.google.pubsub.v1.ListSchemaRevisionsRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSchemaRevisionsMethod(), responseObserver); + } + + /** + * + * Commits a new schema revision to an existing schema. + *+ */ + default void commitSchema(com.google.pubsub.v1.CommitSchemaRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCommitSchemaMethod(), responseObserver); + } + + /** + * + * Creates a new schema revision that is a copy of the provided revision_id. + *+ */ + default void rollbackSchema(com.google.pubsub.v1.RollbackSchemaRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackSchemaMethod(), responseObserver); + } + + /** + * + * Deletes a specific schema revision. + *+ */ + default void deleteSchemaRevision(com.google.pubsub.v1.DeleteSchemaRevisionRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSchemaRevisionMethod(), responseObserver); + } + + /** + * + * Deletes a schema. + *+ */ + default void deleteSchema(com.google.pubsub.v1.DeleteSchemaRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSchemaMethod(), responseObserver); + } + + /** + *