diff --git a/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java index 6a09dc7801a4..663fbfbbeca6 100644 --- a/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ b/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java @@ -254,6 +254,43 @@ com.google.pubsub.v1.ListTopicSubscriptionsResponse> getListTopicSubscriptionsMe return getListTopicSubscriptionsMethod; } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListTopicSnapshotsMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_LIST_TOPIC_SNAPSHOTS = getListTopicSnapshotsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getListTopicSnapshotsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getListTopicSnapshotsMethod() { + return getListTopicSnapshotsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getListTopicSnapshotsMethodHelper() { + 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( + "google.pubsub.v1.Publisher", "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; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getDeleteTopicMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_DELETE_TOPIC = getDeleteTopicMethodHelper(); @@ -324,7 +361,8 @@ public static abstract class PublisherImplBase implements io.grpc.BindableServic /** *
-     * Creates the given topic with the given name.
+     * Creates the given topic with the given name. See the
+     * <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
      * 
*/ public void createTopic(com.google.pubsub.v1.Topic request, @@ -334,12 +372,8 @@ public void createTopic(com.google.pubsub.v1.Topic request, /** *
-     * Updates an existing topic. Note that certain properties of a topic are not
-     * modifiable.  Options settings follow the style guide:
-     * NOTE:  The style guide requires body: "topic" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing topic. Note that certain properties of a
+     * topic are not modifiable.
      * 
*/ public void updateTopic(com.google.pubsub.v1.UpdateTopicRequest request, @@ -381,7 +415,7 @@ public void listTopics(com.google.pubsub.v1.ListTopicsRequest request, /** *
-     * Lists the name of the subscriptions for this topic.
+     * Lists the names of the subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, @@ -389,6 +423,19 @@ public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRe asyncUnimplementedUnaryCall(getListTopicSubscriptionsMethodHelper(), responseObserver); } + /** + *
+     * Lists the names of the snapshots on this topic.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public void listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListTopicSnapshotsMethodHelper(), responseObserver); + } + /** *
      * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
@@ -447,6 +494,13 @@ public void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request,
                 com.google.pubsub.v1.ListTopicSubscriptionsRequest,
                 com.google.pubsub.v1.ListTopicSubscriptionsResponse>(
                   this, METHODID_LIST_TOPIC_SUBSCRIPTIONS)))
+          .addMethod(
+            getListTopicSnapshotsMethodHelper(),
+            asyncUnaryCall(
+              new MethodHandlers<
+                com.google.pubsub.v1.ListTopicSnapshotsRequest,
+                com.google.pubsub.v1.ListTopicSnapshotsResponse>(
+                  this, METHODID_LIST_TOPIC_SNAPSHOTS)))
           .addMethod(
             getDeleteTopicMethodHelper(),
             asyncUnaryCall(
@@ -482,7 +536,8 @@ protected PublisherStub build(io.grpc.Channel channel,
 
     /**
      * 
-     * Creates the given topic with the given name.
+     * Creates the given topic with the given name. See the
+     * <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
      * 
*/ public void createTopic(com.google.pubsub.v1.Topic request, @@ -493,12 +548,8 @@ public void createTopic(com.google.pubsub.v1.Topic request, /** *
-     * Updates an existing topic. Note that certain properties of a topic are not
-     * modifiable.  Options settings follow the style guide:
-     * NOTE:  The style guide requires body: "topic" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing topic. Note that certain properties of a
+     * topic are not modifiable.
      * 
*/ public void updateTopic(com.google.pubsub.v1.UpdateTopicRequest request, @@ -544,7 +595,7 @@ public void listTopics(com.google.pubsub.v1.ListTopicsRequest request, /** *
-     * Lists the name of the subscriptions for this topic.
+     * Lists the names of the subscriptions on this topic.
      * 
*/ public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, @@ -553,6 +604,20 @@ public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRe getChannel().newCall(getListTopicSubscriptionsMethodHelper(), getCallOptions()), request, responseObserver); } + /** + *
+     * Lists the names of the snapshots on this topic.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public void listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTopicSnapshotsMethodHelper(), getCallOptions()), request, responseObserver); + } + /** *
      * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
@@ -593,7 +658,8 @@ protected PublisherBlockingStub build(io.grpc.Channel channel,
 
     /**
      * 
-     * Creates the given topic with the given name.
+     * Creates the given topic with the given name. See the
+     * <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
      * 
*/ public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request) { @@ -603,12 +669,8 @@ 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.  Options settings follow the style guide:
-     * NOTE:  The style guide requires body: "topic" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing topic. Note that certain properties of a
+     * topic are not modifiable.
      * 
*/ public com.google.pubsub.v1.Topic updateTopic(com.google.pubsub.v1.UpdateTopicRequest request) { @@ -650,7 +712,7 @@ public com.google.pubsub.v1.ListTopicsResponse listTopics(com.google.pubsub.v1.L /** *
-     * Lists the name of the subscriptions for this topic.
+     * Lists the names of the subscriptions on this topic.
      * 
*/ public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { @@ -658,6 +720,19 @@ public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscription getChannel(), getListTopicSubscriptionsMethodHelper(), getCallOptions(), request); } + /** + *
+     * Lists the names of the snapshots on this topic.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots(com.google.pubsub.v1.ListTopicSnapshotsRequest request) { + return blockingUnaryCall( + getChannel(), getListTopicSnapshotsMethodHelper(), getCallOptions(), request); + } + /** *
      * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
@@ -697,7 +772,8 @@ protected PublisherFutureStub build(io.grpc.Channel channel,
 
     /**
      * 
-     * Creates the given topic with the given name.
+     * Creates the given topic with the given name. See the
+     * <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture createTopic( @@ -708,12 +784,8 @@ public com.google.common.util.concurrent.ListenableFuture - * Updates an existing topic. Note that certain properties of a topic are not - * modifiable. Options settings follow the style guide: - * NOTE: The style guide requires body: "topic" instead of body: "*". - * Keeping the latter for internal consistency in V1, however it should be - * corrected in V2. See - * https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing topic. Note that certain properties of a + * topic are not modifiable. *
*/ public com.google.common.util.concurrent.ListenableFuture updateTopic( @@ -759,7 +831,7 @@ public com.google.common.util.concurrent.ListenableFuture - * Lists the name of the subscriptions for this topic. + * Lists the names of the subscriptions on this topic. *
*/ public com.google.common.util.concurrent.ListenableFuture listTopicSubscriptions( @@ -768,6 +840,20 @@ public com.google.common.util.concurrent.ListenableFuture + * Lists the names of the snapshots on this topic.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. + *
+ */ + public com.google.common.util.concurrent.ListenableFuture listTopicSnapshots( + com.google.pubsub.v1.ListTopicSnapshotsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTopicSnapshotsMethodHelper(), getCallOptions()), request); + } + /** *
      * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
@@ -790,7 +876,8 @@ public com.google.common.util.concurrent.ListenableFuture implements
       io.grpc.stub.ServerCalls.UnaryMethod,
@@ -833,6 +920,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
           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);
+          break;
         case METHODID_DELETE_TOPIC:
           serviceImpl.deleteTopic((com.google.pubsub.v1.DeleteTopicRequest) request,
               (io.grpc.stub.StreamObserver) responseObserver);
@@ -904,6 +995,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
               .addMethod(getGetTopicMethodHelper())
               .addMethod(getListTopicsMethodHelper())
               .addMethod(getListTopicSubscriptionsMethodHelper())
+              .addMethod(getListTopicSnapshotsMethodHelper())
               .addMethod(getDeleteTopicMethodHelper())
               .build();
         }
diff --git a/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java b/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
index 0868ccb28b75..672479db1a01 100644
--- a/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
+++ b/google-api-grpc/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java
@@ -18,7 +18,8 @@
 /**
  * 
  * The service that an application uses to manipulate subscriptions and to
- * consume messages from a subscription via the `Pull` method.
+ * consume messages from a subscription via the `Pull` method or by
+ * establishing a bi-directional stream using the `StreamingPull` method.
  * 
*/ @javax.annotation.Generated( @@ -402,6 +403,43 @@ com.google.protobuf.Empty> getModifyPushConfigMethodHelper() { return getModifyPushConfigMethod; } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetSnapshotMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_GET_SNAPSHOT = getGetSnapshotMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getGetSnapshotMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getGetSnapshotMethod() { + return getGetSnapshotMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetSnapshotMethodHelper() { + io.grpc.MethodDescriptor getGetSnapshotMethod; + if ((getGetSnapshotMethod = SubscriberGrpc.getGetSnapshotMethod) == null) { + synchronized (SubscriberGrpc.class) { + if ((getGetSnapshotMethod = SubscriberGrpc.getGetSnapshotMethod) == null) { + SubscriberGrpc.getGetSnapshotMethod = getGetSnapshotMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.pubsub.v1.Subscriber", "GetSnapshot")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.GetSnapshotRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.pubsub.v1.Snapshot.getDefaultInstance())) + .setSchemaDescriptor(new SubscriberMethodDescriptorSupplier("GetSnapshot")) + .build(); + } + } + } + return getGetSnapshotMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getListSnapshotsMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_LIST_SNAPSHOTS = getListSnapshotsMethodHelper(); @@ -613,14 +651,16 @@ public static SubscriberFutureStub newFutureStub( /** *
    * The service that an application uses to manipulate subscriptions and to
-   * consume messages from a subscription via the `Pull` method.
+   * consume messages from a subscription via the `Pull` method or by
+   * establishing a bi-directional stream using the `StreamingPull` method.
    * 
*/ public static abstract class SubscriberImplBase implements io.grpc.BindableService { /** *
-     * Creates a subscription to a given topic.
+     * Creates a subscription to a given topic. See the
+     * <a href="/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
@@ -650,10 +690,6 @@ public void getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request,
      * 
      * Updates an existing subscription. Note that certain properties of a
      * subscription, such as its topic, are not modifiable.
-     * NOTE:  The style guide requires body: "subscription" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
      * 
*/ public void updateSubscription(com.google.pubsub.v1.UpdateSubscriptionRequest request, @@ -729,17 +765,13 @@ public void pull(com.google.pubsub.v1.PullRequest request, /** *
-     * (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will
-     * respond with UNIMPLEMENTED errors unless you have been invited to test
-     * this feature. Contact cloud-pubsub@google.com with any questions.
      * Establishes a stream with the server, which sends messages down to the
      * client. The client streams acknowledgements and ack deadline modifications
      * back to the server. The server will close the stream and return the status
-     * on any error. The server may close the stream with status `OK` to reassign
-     * server-side resources, in which case, the client should re-establish the
-     * stream. `UNAVAILABLE` may also be returned in the case of a transient error
-     * (e.g., a server restart). These should also be retried by the client. Flow
-     * control can be achieved by configuring the underlying RPC channel.
+     * on any error. The server may close the stream with status `UNAVAILABLE` to
+     * reassign server-side resources, in which case, the client should
+     * re-establish the stream. Flow control can be achieved by configuring the
+     * underlying RPC channel.
      * 
*/ public io.grpc.stub.StreamObserver streamingPull( @@ -763,7 +795,23 @@ public void modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest reques /** *
-     * Lists the existing snapshots.
+     * Gets the configuration details of a snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public void getSnapshot(com.google.pubsub.v1.GetSnapshotRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetSnapshotMethodHelper(), responseObserver); + } + + /** + *
+     * Lists the existing snapshots.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public void listSnapshots(com.google.pubsub.v1.ListSnapshotsRequest request, @@ -773,15 +821,21 @@ public void listSnapshots(com.google.pubsub.v1.ListSnapshotsRequest request, /** *
-     * Creates a snapshot from the requested subscription.
+     * Creates a snapshot from the requested subscription.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * If the snapshot already exists, returns `ALREADY_EXISTS`.
      * If the requested subscription doesn't exist, returns `NOT_FOUND`.
-     * If the name is not provided in the request, the server will assign a random
+     * 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/overview#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.
+     * to the [resource name format](https://cloud.google.com/pubsub/docs/overview#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.
      * 
*/ public void createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest request, @@ -791,12 +845,11 @@ public void createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest request, /** *
-     * Updates an existing snapshot. Note that certain properties of a snapshot
-     * are not modifiable.
-     * NOTE:  The style guide requires body: "snapshot" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * Note that certain properties of a snapshot are not modifiable.
      * 
*/ public void updateSnapshot(com.google.pubsub.v1.UpdateSnapshotRequest request, @@ -806,7 +859,11 @@ public void updateSnapshot(com.google.pubsub.v1.UpdateSnapshotRequest request, /** *
-     * Removes an existing snapshot. All messages retained in the snapshot
+     * Removes an existing snapshot. <br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 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.
@@ -820,7 +877,10 @@ public void deleteSnapshot(com.google.pubsub.v1.DeleteSnapshotRequest request,
     /**
      * 
      * Seeks an existing subscription to a point in time or to a given snapshot,
-     * whichever is provided in the request.
+     * whichever is provided in the request.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public void seek(com.google.pubsub.v1.SeekRequest request, @@ -900,6 +960,13 @@ public void seek(com.google.pubsub.v1.SeekRequest request, com.google.pubsub.v1.ModifyPushConfigRequest, com.google.protobuf.Empty>( this, METHODID_MODIFY_PUSH_CONFIG))) + .addMethod( + getGetSnapshotMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.pubsub.v1.GetSnapshotRequest, + com.google.pubsub.v1.Snapshot>( + this, METHODID_GET_SNAPSHOT))) .addMethod( getListSnapshotsMethodHelper(), asyncUnaryCall( @@ -942,7 +1009,8 @@ public void seek(com.google.pubsub.v1.SeekRequest request, /** *
    * The service that an application uses to manipulate subscriptions and to
-   * consume messages from a subscription via the `Pull` method.
+   * consume messages from a subscription via the `Pull` method or by
+   * establishing a bi-directional stream using the `StreamingPull` method.
    * 
*/ public static final class SubscriberStub extends io.grpc.stub.AbstractStub { @@ -963,7 +1031,8 @@ protected SubscriberStub build(io.grpc.Channel channel, /** *
-     * Creates a subscription to a given topic.
+     * Creates a subscription to a given topic. See the
+     * <a href="/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
@@ -995,10 +1064,6 @@ public void getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request,
      * 
      * Updates an existing subscription. Note that certain properties of a
      * subscription, such as its topic, are not modifiable.
-     * NOTE:  The style guide requires body: "subscription" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
      * 
*/ public void updateSubscription(com.google.pubsub.v1.UpdateSubscriptionRequest request, @@ -1080,17 +1145,13 @@ public void pull(com.google.pubsub.v1.PullRequest request, /** *
-     * (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will
-     * respond with UNIMPLEMENTED errors unless you have been invited to test
-     * this feature. Contact cloud-pubsub@google.com with any questions.
      * Establishes a stream with the server, which sends messages down to the
      * client. The client streams acknowledgements and ack deadline modifications
      * back to the server. The server will close the stream and return the status
-     * on any error. The server may close the stream with status `OK` to reassign
-     * server-side resources, in which case, the client should re-establish the
-     * stream. `UNAVAILABLE` may also be returned in the case of a transient error
-     * (e.g., a server restart). These should also be retried by the client. Flow
-     * control can be achieved by configuring the underlying RPC channel.
+     * on any error. The server may close the stream with status `UNAVAILABLE` to
+     * reassign server-side resources, in which case, the client should
+     * re-establish the stream. Flow control can be achieved by configuring the
+     * underlying RPC channel.
      * 
*/ public io.grpc.stub.StreamObserver streamingPull( @@ -1116,7 +1177,24 @@ public void modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest reques /** *
-     * Lists the existing snapshots.
+     * Gets the configuration details of a snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public void getSnapshot(com.google.pubsub.v1.GetSnapshotRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetSnapshotMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists the existing snapshots.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public void listSnapshots(com.google.pubsub.v1.ListSnapshotsRequest request, @@ -1127,15 +1205,21 @@ public void listSnapshots(com.google.pubsub.v1.ListSnapshotsRequest request, /** *
-     * Creates a snapshot from the requested subscription.
+     * Creates a snapshot from the requested subscription.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * If the snapshot already exists, returns `ALREADY_EXISTS`.
      * If the requested subscription doesn't exist, returns `NOT_FOUND`.
-     * If the name is not provided in the request, the server will assign a random
+     * 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/overview#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.
+     * to the [resource name format](https://cloud.google.com/pubsub/docs/overview#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.
      * 
*/ public void createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest request, @@ -1146,12 +1230,11 @@ public void createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest request, /** *
-     * Updates an existing snapshot. Note that certain properties of a snapshot
-     * are not modifiable.
-     * NOTE:  The style guide requires body: "snapshot" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * Note that certain properties of a snapshot are not modifiable.
      * 
*/ public void updateSnapshot(com.google.pubsub.v1.UpdateSnapshotRequest request, @@ -1162,7 +1245,11 @@ public void updateSnapshot(com.google.pubsub.v1.UpdateSnapshotRequest request, /** *
-     * Removes an existing snapshot. All messages retained in the snapshot
+     * Removes an existing snapshot. <br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 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.
@@ -1177,7 +1264,10 @@ public void deleteSnapshot(com.google.pubsub.v1.DeleteSnapshotRequest request,
     /**
      * 
      * Seeks an existing subscription to a point in time or to a given snapshot,
-     * whichever is provided in the request.
+     * whichever is provided in the request.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public void seek(com.google.pubsub.v1.SeekRequest request, @@ -1190,7 +1280,8 @@ public void seek(com.google.pubsub.v1.SeekRequest request, /** *
    * The service that an application uses to manipulate subscriptions and to
-   * consume messages from a subscription via the `Pull` method.
+   * consume messages from a subscription via the `Pull` method or by
+   * establishing a bi-directional stream using the `StreamingPull` method.
    * 
*/ public static final class SubscriberBlockingStub extends io.grpc.stub.AbstractStub { @@ -1211,7 +1302,8 @@ protected SubscriberBlockingStub build(io.grpc.Channel channel, /** *
-     * Creates a subscription to a given topic.
+     * Creates a subscription to a given topic. See the
+     * <a href="/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
@@ -1241,10 +1333,6 @@ public com.google.pubsub.v1.Subscription getSubscription(com.google.pubsub.v1.Ge
      * 
      * Updates an existing subscription. Note that certain properties of a
      * subscription, such as its topic, are not modifiable.
-     * NOTE:  The style guide requires body: "subscription" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
      * 
*/ public com.google.pubsub.v1.Subscription updateSubscription(com.google.pubsub.v1.UpdateSubscriptionRequest request) { @@ -1334,7 +1422,23 @@ public com.google.protobuf.Empty modifyPushConfig(com.google.pubsub.v1.ModifyPus /** *
-     * Lists the existing snapshots.
+     * Gets the configuration details of a snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 
+ */ + public com.google.pubsub.v1.Snapshot getSnapshot(com.google.pubsub.v1.GetSnapshotRequest request) { + return blockingUnaryCall( + getChannel(), getGetSnapshotMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Lists the existing snapshots.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public com.google.pubsub.v1.ListSnapshotsResponse listSnapshots(com.google.pubsub.v1.ListSnapshotsRequest request) { @@ -1344,15 +1448,21 @@ public com.google.pubsub.v1.ListSnapshotsResponse listSnapshots(com.google.pubsu /** *
-     * Creates a snapshot from the requested subscription.
+     * Creates a snapshot from the requested subscription.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * If the snapshot already exists, returns `ALREADY_EXISTS`.
      * If the requested subscription doesn't exist, returns `NOT_FOUND`.
-     * If the name is not provided in the request, the server will assign a random
+     * 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/overview#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.
+     * to the [resource name format](https://cloud.google.com/pubsub/docs/overview#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.
      * 
*/ public com.google.pubsub.v1.Snapshot createSnapshot(com.google.pubsub.v1.CreateSnapshotRequest request) { @@ -1362,12 +1472,11 @@ public com.google.pubsub.v1.Snapshot createSnapshot(com.google.pubsub.v1.CreateS /** *
-     * Updates an existing snapshot. Note that certain properties of a snapshot
-     * are not modifiable.
-     * NOTE:  The style guide requires body: "snapshot" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
+     * Updates an existing snapshot.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * Note that certain properties of a snapshot are not modifiable.
      * 
*/ public com.google.pubsub.v1.Snapshot updateSnapshot(com.google.pubsub.v1.UpdateSnapshotRequest request) { @@ -1377,7 +1486,11 @@ public com.google.pubsub.v1.Snapshot updateSnapshot(com.google.pubsub.v1.UpdateS /** *
-     * Removes an existing snapshot. All messages retained in the snapshot
+     * Removes an existing snapshot. <br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
+     * 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.
@@ -1391,7 +1504,10 @@ public com.google.protobuf.Empty deleteSnapshot(com.google.pubsub.v1.DeleteSnaps
     /**
      * 
      * Seeks an existing subscription to a point in time or to a given snapshot,
-     * whichever is provided in the request.
+     * whichever is provided in the request.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public com.google.pubsub.v1.SeekResponse seek(com.google.pubsub.v1.SeekRequest request) { @@ -1403,7 +1519,8 @@ public com.google.pubsub.v1.SeekResponse seek(com.google.pubsub.v1.SeekRequest r /** *
    * The service that an application uses to manipulate subscriptions and to
-   * consume messages from a subscription via the `Pull` method.
+   * consume messages from a subscription via the `Pull` method or by
+   * establishing a bi-directional stream using the `StreamingPull` method.
    * 
*/ public static final class SubscriberFutureStub extends io.grpc.stub.AbstractStub { @@ -1424,7 +1541,8 @@ protected SubscriberFutureStub build(io.grpc.Channel channel, /** *
-     * Creates a subscription to a given topic.
+     * Creates a subscription to a given topic. See the
+     * <a href="/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
@@ -1456,10 +1574,6 @@ public com.google.common.util.concurrent.ListenableFuture
      * Updates an existing subscription. Note that certain properties of a
      * subscription, such as its topic, are not modifiable.
-     * NOTE:  The style guide requires body: "subscription" instead of body: "*".
-     * Keeping the latter for internal consistency in V1, however it should be
-     * corrected in V2.  See
-     * https://cloud.google.com/apis/design/standard_methods#update for details.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture updateSubscription( @@ -1556,7 +1670,24 @@ public com.google.common.util.concurrent.ListenableFuture - * Lists the existing snapshots. + * Gets the configuration details of a snapshot.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. + *
+ */ + public com.google.common.util.concurrent.ListenableFuture getSnapshot( + com.google.pubsub.v1.GetSnapshotRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetSnapshotMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Lists the existing snapshots.<br><br>
+     * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+     * changed in backward-incompatible ways and is not recommended for production
+     * use. It is not subject to any SLA or deprecation policy.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture listSnapshots( @@ -1567,15 +1698,21 @@ public com.google.common.util.concurrent.ListenableFuture - * Creates a snapshot from the requested subscription. + * Creates a snapshot from the requested subscription.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * If the snapshot already exists, returns `ALREADY_EXISTS`. * If the requested subscription doesn't exist, returns `NOT_FOUND`. - * If the name is not provided in the request, the server will assign a random + * 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/overview#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. + * to the [resource name format](https://cloud.google.com/pubsub/docs/overview#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. *
*/ public com.google.common.util.concurrent.ListenableFuture createSnapshot( @@ -1586,12 +1723,11 @@ public com.google.common.util.concurrent.ListenableFuture - * Updates an existing snapshot. Note that certain properties of a snapshot - * are not modifiable. - * NOTE: The style guide requires body: "snapshot" instead of body: "*". - * Keeping the latter for internal consistency in V1, however it should be - * corrected in V2. See - * https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing snapshot.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. + * Note that certain properties of a snapshot are not modifiable. *
*/ public com.google.common.util.concurrent.ListenableFuture updateSnapshot( @@ -1602,7 +1738,11 @@ public com.google.common.util.concurrent.ListenableFuture - * Removes an existing snapshot. All messages retained in the snapshot + * Removes an existing snapshot. <br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. + * 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. @@ -1617,7 +1757,10 @@ public com.google.common.util.concurrent.ListenableFuture * Seeks an existing subscription to a point in time or to a given snapshot, - * whichever is provided in the request. + * whichever is provided in the request.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. *
*/ public com.google.common.util.concurrent.ListenableFuture seek( @@ -1636,12 +1779,13 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1696,6 +1840,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.modifyPushConfig((com.google.pubsub.v1.ModifyPushConfigRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_SNAPSHOT: + serviceImpl.getSnapshot((com.google.pubsub.v1.GetSnapshotRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_SNAPSHOTS: serviceImpl.listSnapshots((com.google.pubsub.v1.ListSnapshotsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -1790,6 +1938,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getPullMethodHelper()) .addMethod(getStreamingPullMethodHelper()) .addMethod(getModifyPushConfigMethodHelper()) + .addMethod(getGetSnapshotMethodHelper()) .addMethod(getListSnapshotsMethodHelper()) .addMethod(getCreateSnapshotMethodHelper()) .addMethod(getUpdateSnapshotMethodHelper()) diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java index f6374d302c9a..2ec18ef7bb53 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java @@ -5,7 +5,10 @@ /** *
- * Request for the `CreateSnapshot` method.
+ * Request for the `CreateSnapshot` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed in
+ * backward-incompatible ways and is not recommended for production use.
+ * It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.CreateSnapshotRequest} @@ -67,6 +70,19 @@ private CreateSnapshotRequest( subscription_ = s; break; } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -84,6 +100,17 @@ private CreateSnapshotRequest( return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable @@ -91,6 +118,7 @@ private CreateSnapshotRequest( com.google.pubsub.v1.CreateSnapshotRequest.class, com.google.pubsub.v1.CreateSnapshotRequest.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -199,6 +227,98 @@ public java.lang.String getSubscription() { } } + public static final int LABELS_FIELD_NUMBER = 3; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -217,6 +337,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getSubscriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subscription_); } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 3); unknownFields.writeTo(output); } @@ -231,6 +357,16 @@ public int getSerializedSize() { if (!getSubscriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subscription_); } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, labels__); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -251,6 +387,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName()); result = result && getSubscription() .equals(other.getSubscription()); + result = result && internalGetLabels().equals( + other.internalGetLabels()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -266,6 +404,10 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getSubscription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -361,7 +503,10 @@ protected Builder newBuilderForType( } /** *
-   * Request for the `CreateSnapshot` method.
+   * Request for the `CreateSnapshot` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed in
+   * backward-incompatible ways and is not recommended for production use.
+   * It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.CreateSnapshotRequest} @@ -375,6 +520,28 @@ public static final class Builder extends return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable @@ -403,6 +570,7 @@ public Builder clear() { subscription_ = ""; + internalGetMutableLabels().clear(); return this; } @@ -425,8 +593,13 @@ public com.google.pubsub.v1.CreateSnapshotRequest build() { public com.google.pubsub.v1.CreateSnapshotRequest buildPartial() { com.google.pubsub.v1.CreateSnapshotRequest result = new com.google.pubsub.v1.CreateSnapshotRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.name_ = name_; result.subscription_ = subscription_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -476,6 +649,8 @@ public Builder mergeFrom(com.google.pubsub.v1.CreateSnapshotRequest other) { subscription_ = other.subscription_; onChanged(); } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -502,6 +677,7 @@ public Builder mergeFrom( } return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -740,6 +916,157 @@ public Builder setSubscriptionBytes( onChanged(); return this; } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * User labels.
+     * 
+ * + * map<string, string> labels = 3; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java index 8749f67aa2a9..1d7b101782d2 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java @@ -66,4 +66,58 @@ public interface CreateSnapshotRequestOrBuilder extends */ com.google.protobuf.ByteString getSubscriptionBytes(); + + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * User labels.
+   * 
+ * + * map<string, string> labels = 3; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); } diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java index 6b92fdcea2b9..9b80ba7e6861 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java @@ -5,7 +5,10 @@ /** *
- * Request for the `DeleteSnapshot` method.
+ * Request for the `DeleteSnapshot` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.DeleteSnapshotRequest} @@ -280,7 +283,10 @@ protected Builder newBuilderForType( } /** *
-   * Request for the `DeleteSnapshot` method.
+   * Request for the `DeleteSnapshot` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.DeleteSnapshotRequest} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java new file mode 100644 index 000000000000..af81a90b40e5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java @@ -0,0 +1,565 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + *
+ * Request for the GetSnapshot method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.GetSnapshotRequest} + */ +public final class GetSnapshotRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetSnapshotRequest) + GetSnapshotRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSnapshotRequest.newBuilder() to construct. + private GetSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSnapshotRequest() { + snapshot_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetSnapshotRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + snapshot_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.GetSnapshotRequest.class, com.google.pubsub.v1.GetSnapshotRequest.Builder.class); + } + + public static final int SNAPSHOT_FIELD_NUMBER = 1; + private volatile java.lang.Object snapshot_; + /** + *
+   * The name of the snapshot to get.
+   * Format is `projects/{project}/snapshots/{snap}`.
+   * 
+ * + * string snapshot = 1; + */ + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } + } + /** + *
+   * The name of the snapshot to get.
+   * Format is `projects/{project}/snapshots/{snap}`.
+   * 
+ * + * string snapshot = 1; + */ + public com.google.protobuf.ByteString + getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getSnapshotBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSnapshotBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.GetSnapshotRequest)) { + return super.equals(obj); + } + com.google.pubsub.v1.GetSnapshotRequest other = (com.google.pubsub.v1.GetSnapshotRequest) obj; + + boolean result = true; + result = result && getSnapshot() + .equals(other.getSnapshot()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getSnapshot().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.pubsub.v1.GetSnapshotRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for the GetSnapshot method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.GetSnapshotRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetSnapshotRequest) + com.google.pubsub.v1.GetSnapshotRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.GetSnapshotRequest.class, com.google.pubsub.v1.GetSnapshotRequest.Builder.class); + } + + // Construct using com.google.pubsub.v1.GetSnapshotRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + snapshot_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; + } + + public com.google.pubsub.v1.GetSnapshotRequest getDefaultInstanceForType() { + return com.google.pubsub.v1.GetSnapshotRequest.getDefaultInstance(); + } + + public com.google.pubsub.v1.GetSnapshotRequest build() { + com.google.pubsub.v1.GetSnapshotRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.pubsub.v1.GetSnapshotRequest buildPartial() { + com.google.pubsub.v1.GetSnapshotRequest result = new com.google.pubsub.v1.GetSnapshotRequest(this); + result.snapshot_ = snapshot_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.GetSnapshotRequest) { + return mergeFrom((com.google.pubsub.v1.GetSnapshotRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.GetSnapshotRequest other) { + if (other == com.google.pubsub.v1.GetSnapshotRequest.getDefaultInstance()) return this; + if (!other.getSnapshot().isEmpty()) { + snapshot_ = other.snapshot_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.GetSnapshotRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.GetSnapshotRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object snapshot_ = ""; + /** + *
+     * The name of the snapshot to get.
+     * Format is `projects/{project}/snapshots/{snap}`.
+     * 
+ * + * string snapshot = 1; + */ + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the snapshot to get.
+     * Format is `projects/{project}/snapshots/{snap}`.
+     * 
+ * + * string snapshot = 1; + */ + public com.google.protobuf.ByteString + getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the snapshot to get.
+     * Format is `projects/{project}/snapshots/{snap}`.
+     * 
+ * + * string snapshot = 1; + */ + public Builder setSnapshot( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + snapshot_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the snapshot to get.
+     * Format is `projects/{project}/snapshots/{snap}`.
+     * 
+ * + * string snapshot = 1; + */ + public Builder clearSnapshot() { + + snapshot_ = getDefaultInstance().getSnapshot(); + onChanged(); + return this; + } + /** + *
+     * The name of the snapshot to get.
+     * Format is `projects/{project}/snapshots/{snap}`.
+     * 
+ * + * string snapshot = 1; + */ + public Builder setSnapshotBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + snapshot_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetSnapshotRequest) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.GetSnapshotRequest) + private static final com.google.pubsub.v1.GetSnapshotRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.GetSnapshotRequest(); + } + + public static com.google.pubsub.v1.GetSnapshotRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GetSnapshotRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetSnapshotRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.pubsub.v1.GetSnapshotRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java new file mode 100644 index 000000000000..9de92daf1b22 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface GetSnapshotRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetSnapshotRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the snapshot to get.
+   * Format is `projects/{project}/snapshots/{snap}`.
+   * 
+ * + * string snapshot = 1; + */ + java.lang.String getSnapshot(); + /** + *
+   * The name of the snapshot to get.
+   * Format is `projects/{project}/snapshots/{snap}`.
+   * 
+ * + * string snapshot = 1; + */ + com.google.protobuf.ByteString + getSnapshotBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java index cdee470682ec..58d9416c5a20 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java @@ -5,7 +5,10 @@ /** *
- * Request for the `ListSnapshots` method.
+ * Request for the `ListSnapshots` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.ListSnapshotsRequest} @@ -373,7 +376,10 @@ protected Builder newBuilderForType( } /** *
-   * Request for the `ListSnapshots` method.
+   * Request for the `ListSnapshots` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.ListSnapshotsRequest} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java index 3b313dfe5f30..3b9331958238 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java @@ -5,7 +5,10 @@ /** *
- * Response for the `ListSnapshots` method.
+ * Response for the `ListSnapshots` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.ListSnapshotsResponse} @@ -362,7 +365,10 @@ protected Builder newBuilderForType( } /** *
-   * Response for the `ListSnapshots` method.
+   * Response for the `ListSnapshots` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.ListSnapshotsResponse} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java new file mode 100644 index 000000000000..34e695c42c1a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java @@ -0,0 +1,808 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + *
+ * Request for the `ListTopicSnapshots` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsRequest} + */ +public final class ListTopicSnapshotsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSnapshotsRequest) + ListTopicSnapshotsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListTopicSnapshotsRequest.newBuilder() to construct. + private ListTopicSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListTopicSnapshotsRequest() { + topic_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListTopicSnapshotsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + topic_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.ListTopicSnapshotsRequest.class, com.google.pubsub.v1.ListTopicSnapshotsRequest.Builder.class); + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+   * The name of the topic that snapshots are attached to.
+   * Format is `projects/{project}/topics/{topic}`.
+   * 
+ * + * string topic = 1; + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+   * The name of the topic that snapshots are attached to.
+   * Format is `projects/{project}/topics/{topic}`.
+   * 
+ * + * string topic = 1; + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * Maximum number of snapshot names to return.
+   * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+   * that this is a continuation of a prior `ListTopicSnapshots` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+   * that this is a continuation of a prior `ListTopicSnapshots` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTopicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTopicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.ListTopicSnapshotsRequest)) { + return super.equals(obj); + } + com.google.pubsub.v1.ListTopicSnapshotsRequest other = (com.google.pubsub.v1.ListTopicSnapshotsRequest) obj; + + boolean result = true; + result = result && getTopic() + .equals(other.getTopic()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && getPageToken() + .equals(other.getPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.pubsub.v1.ListTopicSnapshotsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for the `ListTopicSnapshots` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSnapshotsRequest) + com.google.pubsub.v1.ListTopicSnapshotsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.ListTopicSnapshotsRequest.class, com.google.pubsub.v1.ListTopicSnapshotsRequest.Builder.class); + } + + // Construct using com.google.pubsub.v1.ListTopicSnapshotsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + topic_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; + } + + public com.google.pubsub.v1.ListTopicSnapshotsRequest getDefaultInstanceForType() { + return com.google.pubsub.v1.ListTopicSnapshotsRequest.getDefaultInstance(); + } + + public com.google.pubsub.v1.ListTopicSnapshotsRequest build() { + com.google.pubsub.v1.ListTopicSnapshotsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.pubsub.v1.ListTopicSnapshotsRequest buildPartial() { + com.google.pubsub.v1.ListTopicSnapshotsRequest result = new com.google.pubsub.v1.ListTopicSnapshotsRequest(this); + result.topic_ = topic_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.ListTopicSnapshotsRequest) { + return mergeFrom((com.google.pubsub.v1.ListTopicSnapshotsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.ListTopicSnapshotsRequest other) { + if (other == com.google.pubsub.v1.ListTopicSnapshotsRequest.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.ListTopicSnapshotsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.ListTopicSnapshotsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+     * The name of the topic that snapshots are attached to.
+     * Format is `projects/{project}/topics/{topic}`.
+     * 
+ * + * string topic = 1; + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the topic that snapshots are attached to.
+     * Format is `projects/{project}/topics/{topic}`.
+     * 
+ * + * string topic = 1; + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the topic that snapshots are attached to.
+     * Format is `projects/{project}/topics/{topic}`.
+     * 
+ * + * string topic = 1; + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the topic that snapshots are attached to.
+     * Format is `projects/{project}/topics/{topic}`.
+     * 
+ * + * string topic = 1; + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + *
+     * The name of the topic that snapshots are attached to.
+     * Format is `projects/{project}/topics/{topic}`.
+     * 
+ * + * string topic = 1; + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Maximum number of snapshot names to return.
+     * 
+ * + * int32 page_size = 2; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Maximum number of snapshot names to return.
+     * 
+ * + * int32 page_size = 2; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of snapshot names to return.
+     * 
+ * + * int32 page_size = 2; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+     * that this is a continuation of a prior `ListTopicSnapshots` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+     * that this is a continuation of a prior `ListTopicSnapshots` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+     * that this is a continuation of a prior `ListTopicSnapshots` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+     * that this is a continuation of a prior `ListTopicSnapshots` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+     * that this is a continuation of a prior `ListTopicSnapshots` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSnapshotsRequest) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicSnapshotsRequest) + private static final com.google.pubsub.v1.ListTopicSnapshotsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicSnapshotsRequest(); + } + + public static com.google.pubsub.v1.ListTopicSnapshotsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListTopicSnapshotsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTopicSnapshotsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.pubsub.v1.ListTopicSnapshotsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java new file mode 100644 index 000000000000..ac27aa29ad3c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface ListTopicSnapshotsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSnapshotsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the topic that snapshots are attached to.
+   * Format is `projects/{project}/topics/{topic}`.
+   * 
+ * + * string topic = 1; + */ + java.lang.String getTopic(); + /** + *
+   * The name of the topic that snapshots are attached to.
+   * Format is `projects/{project}/topics/{topic}`.
+   * 
+ * + * string topic = 1; + */ + com.google.protobuf.ByteString + getTopicBytes(); + + /** + *
+   * Maximum number of snapshot names to return.
+   * 
+ * + * int32 page_size = 2; + */ + int getPageSize(); + + /** + *
+   * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+   * that this is a continuation of a prior `ListTopicSnapshots` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + */ + java.lang.String getPageToken(); + /** + *
+   * The value returned by the last `ListTopicSnapshotsResponse`; indicates
+   * that this is a continuation of a prior `ListTopicSnapshots` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java new file mode 100644 index 000000000000..dd21ac979ab2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java @@ -0,0 +1,799 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + *
+ * Response for the `ListTopicSnapshots` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsResponse} + */ +public final class ListTopicSnapshotsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSnapshotsResponse) + ListTopicSnapshotsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListTopicSnapshotsResponse.newBuilder() to construct. + private ListTopicSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListTopicSnapshotsResponse() { + snapshots_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListTopicSnapshotsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + snapshots_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + snapshots_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + snapshots_ = snapshots_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.ListTopicSnapshotsResponse.class, com.google.pubsub.v1.ListTopicSnapshotsResponse.Builder.class); + } + + private int bitField0_; + public static final int SNAPSHOTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList snapshots_; + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + public com.google.protobuf.ProtocolStringList + getSnapshotsList() { + return snapshots_; + } + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + public int getSnapshotsCount() { + return snapshots_.size(); + } + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + public java.lang.String getSnapshots(int index) { + return snapshots_.get(index); + } + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + public com.google.protobuf.ByteString + getSnapshotsBytes(int index) { + return snapshots_.getByteString(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If not empty, indicates that there may be more snapshots that match
+   * the request; this value should be passed in a new
+   * `ListTopicSnapshotsRequest` to get more snapshots.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If not empty, indicates that there may be more snapshots that match
+   * the request; this value should be passed in a new
+   * `ListTopicSnapshotsRequest` to get more snapshots.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < snapshots_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshots_.getRaw(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < snapshots_.size(); i++) { + dataSize += computeStringSizeNoTag(snapshots_.getRaw(i)); + } + size += dataSize; + size += 1 * getSnapshotsList().size(); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.ListTopicSnapshotsResponse)) { + return super.equals(obj); + } + com.google.pubsub.v1.ListTopicSnapshotsResponse other = (com.google.pubsub.v1.ListTopicSnapshotsResponse) obj; + + boolean result = true; + result = result && getSnapshotsList() + .equals(other.getSnapshotsList()); + result = result && getNextPageToken() + .equals(other.getNextPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSnapshotsCount() > 0) { + hash = (37 * hash) + SNAPSHOTS_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.pubsub.v1.ListTopicSnapshotsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for the `ListTopicSnapshots` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSnapshotsResponse) + com.google.pubsub.v1.ListTopicSnapshotsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.ListTopicSnapshotsResponse.class, com.google.pubsub.v1.ListTopicSnapshotsResponse.Builder.class); + } + + // Construct using com.google.pubsub.v1.ListTopicSnapshotsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + snapshots_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; + } + + public com.google.pubsub.v1.ListTopicSnapshotsResponse getDefaultInstanceForType() { + return com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance(); + } + + public com.google.pubsub.v1.ListTopicSnapshotsResponse build() { + com.google.pubsub.v1.ListTopicSnapshotsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.pubsub.v1.ListTopicSnapshotsResponse buildPartial() { + com.google.pubsub.v1.ListTopicSnapshotsResponse result = new com.google.pubsub.v1.ListTopicSnapshotsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + snapshots_ = snapshots_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.snapshots_ = snapshots_; + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.ListTopicSnapshotsResponse) { + return mergeFrom((com.google.pubsub.v1.ListTopicSnapshotsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.ListTopicSnapshotsResponse other) { + if (other == com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance()) return this; + if (!other.snapshots_.isEmpty()) { + if (snapshots_.isEmpty()) { + snapshots_ = other.snapshots_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSnapshotsIsMutable(); + snapshots_.addAll(other.snapshots_); + } + onChanged(); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.ListTopicSnapshotsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.ListTopicSnapshotsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList snapshots_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSnapshotsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + snapshots_ = new com.google.protobuf.LazyStringArrayList(snapshots_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public com.google.protobuf.ProtocolStringList + getSnapshotsList() { + return snapshots_.getUnmodifiableView(); + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public int getSnapshotsCount() { + return snapshots_.size(); + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public java.lang.String getSnapshots(int index) { + return snapshots_.get(index); + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public com.google.protobuf.ByteString + getSnapshotsBytes(int index) { + return snapshots_.getByteString(index); + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public Builder setSnapshots( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnapshotsIsMutable(); + snapshots_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public Builder addSnapshots( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnapshotsIsMutable(); + snapshots_.add(value); + onChanged(); + return this; + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public Builder addAllSnapshots( + java.lang.Iterable values) { + ensureSnapshotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, snapshots_); + onChanged(); + return this; + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public Builder clearSnapshots() { + snapshots_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The names of the snapshots that match the request.
+     * 
+ * + * repeated string snapshots = 1; + */ + public Builder addSnapshotsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSnapshotsIsMutable(); + snapshots_.add(value); + onChanged(); + return this; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If not empty, indicates that there may be more snapshots that match
+     * the request; this value should be passed in a new
+     * `ListTopicSnapshotsRequest` to get more snapshots.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If not empty, indicates that there may be more snapshots that match
+     * the request; this value should be passed in a new
+     * `ListTopicSnapshotsRequest` to get more snapshots.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If not empty, indicates that there may be more snapshots that match
+     * the request; this value should be passed in a new
+     * `ListTopicSnapshotsRequest` to get more snapshots.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If not empty, indicates that there may be more snapshots that match
+     * the request; this value should be passed in a new
+     * `ListTopicSnapshotsRequest` to get more snapshots.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If not empty, indicates that there may be more snapshots that match
+     * the request; this value should be passed in a new
+     * `ListTopicSnapshotsRequest` to get more snapshots.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSnapshotsResponse) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicSnapshotsResponse) + private static final com.google.pubsub.v1.ListTopicSnapshotsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicSnapshotsResponse(); + } + + public static com.google.pubsub.v1.ListTopicSnapshotsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListTopicSnapshotsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTopicSnapshotsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.pubsub.v1.ListTopicSnapshotsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java new file mode 100644 index 000000000000..d06df36ea5d7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface ListTopicSnapshotsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSnapshotsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + java.util.List + getSnapshotsList(); + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + int getSnapshotsCount(); + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + java.lang.String getSnapshots(int index); + /** + *
+   * The names of the snapshots that match the request.
+   * 
+ * + * repeated string snapshots = 1; + */ + com.google.protobuf.ByteString + getSnapshotsBytes(int index); + + /** + *
+   * If not empty, indicates that there may be more snapshots that match
+   * the request; this value should be passed in a new
+   * `ListTopicSnapshotsRequest` to get more snapshots.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + *
+   * If not empty, indicates that there may be more snapshots that match
+   * the request; this value should be passed in a new
+   * `ListTopicSnapshotsRequest` to get more snapshots.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java new file mode 100644 index 000000000000..d64fc6fe4c6f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java @@ -0,0 +1,678 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} + */ +public final class MessageStoragePolicy extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.MessageStoragePolicy) + MessageStoragePolicyOrBuilder { +private static final long serialVersionUID = 0L; + // Use MessageStoragePolicy.newBuilder() to construct. + private MessageStoragePolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MessageStoragePolicy() { + allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MessageStoragePolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + allowedPersistenceRegions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedPersistenceRegions_.add(s); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + allowedPersistenceRegions_ = allowedPersistenceRegions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageStoragePolicy.class, com.google.pubsub.v1.MessageStoragePolicy.Builder.class); + } + + public static final int ALLOWED_PERSISTENCE_REGIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList allowedPersistenceRegions_; + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public com.google.protobuf.ProtocolStringList + getAllowedPersistenceRegionsList() { + return allowedPersistenceRegions_; + } + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public int getAllowedPersistenceRegionsCount() { + return allowedPersistenceRegions_.size(); + } + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public java.lang.String getAllowedPersistenceRegions(int index) { + return allowedPersistenceRegions_.get(index); + } + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public com.google.protobuf.ByteString + getAllowedPersistenceRegionsBytes(int index) { + return allowedPersistenceRegions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < allowedPersistenceRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedPersistenceRegions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < allowedPersistenceRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedPersistenceRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedPersistenceRegionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.MessageStoragePolicy)) { + return super.equals(obj); + } + com.google.pubsub.v1.MessageStoragePolicy other = (com.google.pubsub.v1.MessageStoragePolicy) obj; + + boolean result = true; + result = result && getAllowedPersistenceRegionsList() + .equals(other.getAllowedPersistenceRegionsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAllowedPersistenceRegionsCount() > 0) { + hash = (37 * hash) + ALLOWED_PERSISTENCE_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedPersistenceRegionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.pubsub.v1.MessageStoragePolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.MessageStoragePolicy) + com.google.pubsub.v1.MessageStoragePolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageStoragePolicy.class, com.google.pubsub.v1.MessageStoragePolicy.Builder.class); + } + + // Construct using com.google.pubsub.v1.MessageStoragePolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; + } + + public com.google.pubsub.v1.MessageStoragePolicy getDefaultInstanceForType() { + return com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance(); + } + + public com.google.pubsub.v1.MessageStoragePolicy build() { + com.google.pubsub.v1.MessageStoragePolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.pubsub.v1.MessageStoragePolicy buildPartial() { + com.google.pubsub.v1.MessageStoragePolicy result = new com.google.pubsub.v1.MessageStoragePolicy(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + allowedPersistenceRegions_ = allowedPersistenceRegions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedPersistenceRegions_ = allowedPersistenceRegions_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.MessageStoragePolicy) { + return mergeFrom((com.google.pubsub.v1.MessageStoragePolicy)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.MessageStoragePolicy other) { + if (other == com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance()) return this; + if (!other.allowedPersistenceRegions_.isEmpty()) { + if (allowedPersistenceRegions_.isEmpty()) { + allowedPersistenceRegions_ = other.allowedPersistenceRegions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedPersistenceRegionsIsMutable(); + allowedPersistenceRegions_.addAll(other.allowedPersistenceRegions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.MessageStoragePolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.MessageStoragePolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAllowedPersistenceRegionsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + allowedPersistenceRegions_ = new com.google.protobuf.LazyStringArrayList(allowedPersistenceRegions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public com.google.protobuf.ProtocolStringList + getAllowedPersistenceRegionsList() { + return allowedPersistenceRegions_.getUnmodifiableView(); + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public int getAllowedPersistenceRegionsCount() { + return allowedPersistenceRegions_.size(); + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public java.lang.String getAllowedPersistenceRegions(int index) { + return allowedPersistenceRegions_.get(index); + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public com.google.protobuf.ByteString + getAllowedPersistenceRegionsBytes(int index) { + return allowedPersistenceRegions_.getByteString(index); + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public Builder setAllowedPersistenceRegions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedPersistenceRegionsIsMutable(); + allowedPersistenceRegions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public Builder addAllowedPersistenceRegions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedPersistenceRegionsIsMutable(); + allowedPersistenceRegions_.add(value); + onChanged(); + return this; + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public Builder addAllAllowedPersistenceRegions( + java.lang.Iterable values) { + ensureAllowedPersistenceRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allowedPersistenceRegions_); + onChanged(); + return this; + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public Builder clearAllowedPersistenceRegions() { + allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The list of GCP regions where messages that are published to the topic may
+     * be persisted in storage. Messages published by publishers running in
+     * non-allowed GCP regions (or running outside of GCP altogether) will be
+     * routed for storage in one of the allowed regions. An empty list indicates a
+     * misconfiguration at the project or organization level, which will result in
+     * all Publish operations failing.
+     * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + public Builder addAllowedPersistenceRegionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedPersistenceRegionsIsMutable(); + allowedPersistenceRegions_.add(value); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.MessageStoragePolicy) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.MessageStoragePolicy) + private static final com.google.pubsub.v1.MessageStoragePolicy DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.MessageStoragePolicy(); + } + + public static com.google.pubsub.v1.MessageStoragePolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MessageStoragePolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MessageStoragePolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.pubsub.v1.MessageStoragePolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java new file mode 100644 index 000000000000..fb6b2f8bded9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicyOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface MessageStoragePolicyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.MessageStoragePolicy) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + java.util.List + getAllowedPersistenceRegionsList(); + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + int getAllowedPersistenceRegionsCount(); + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + java.lang.String getAllowedPersistenceRegions(int index); + /** + *
+   * The list of GCP regions where messages that are published to the topic may
+   * be persisted in storage. Messages published by publishers running in
+   * non-allowed GCP regions (or running outside of GCP altogether) will be
+   * routed for storage in one of the allowed regions. An empty list indicates a
+   * misconfiguration at the project or organization level, which will result in
+   * all Publish operations failing.
+   * 
+ * + * repeated string allowed_persistence_regions = 1; + */ + com.google.protobuf.ByteString + getAllowedPersistenceRegionsBytes(int index); +} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java index f448e439183c..009e0e2979b4 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java @@ -149,7 +149,7 @@ public java.lang.String getSubscription() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. *
* * .google.pubsub.v1.PushConfig push_config = 2; @@ -163,7 +163,7 @@ public boolean hasPushConfig() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. *
* * .google.pubsub.v1.PushConfig push_config = 2; @@ -177,7 +177,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. *
* * .google.pubsub.v1.PushConfig push_config = 2; @@ -606,7 +606,7 @@ public Builder setSubscriptionBytes( * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -620,7 +620,7 @@ public boolean hasPushConfig() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -638,7 +638,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -662,7 +662,7 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -684,7 +684,7 @@ public Builder setPushConfig( * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -710,7 +710,7 @@ public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -732,7 +732,7 @@ public Builder clearPushConfig() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -748,7 +748,7 @@ public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -767,7 +767,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java index 411fdae60771..b66687d50aa6 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java @@ -33,7 +33,7 @@ public interface ModifyPushConfigRequestOrBuilder extends * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -45,7 +45,7 @@ public interface ModifyPushConfigRequestOrBuilder extends * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; @@ -57,7 +57,7 @@ public interface ModifyPushConfigRequestOrBuilder extends * 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` is not called. + * the subscription if `Pull` or `StreamingPull` is not called. * * * .google.pubsub.v1.PushConfig push_config = 2; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 707fe8b41799..31cbf40afb8b 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -14,6 +14,11 @@ public static void registerAllExtensions( registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Topic_descriptor; static final @@ -74,6 +79,16 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; static final @@ -169,6 +184,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor; static final @@ -184,6 +204,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_Snapshot_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor; static final @@ -223,172 +248,191 @@ public static void registerAllExtensions( "\036google/protobuf/duration.proto\032\033google/" + "protobuf/empty.proto\032 google/protobuf/fi" + "eld_mask.proto\032\037google/protobuf/timestam" + - "p.proto\"y\n\005Topic\022\014\n\004name\030\001 \001(\t\0223\n\006labels" + - "\030\002 \003(\0132#.google.pubsub.v1.Topic.LabelsEn" + - "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + - "\030\002 \001(\t:\0028\001\"\333\001\n\rPubsubMessage\022\014\n\004data\030\001 \001" + - "(\014\022C\n\nattributes\030\002 \003(\0132/.google.pubsub.v" + - "1.PubsubMessage.AttributesEntry\022\022\n\nmessa" + - "ge_id\030\003 \001(\t\0220\n\014publish_time\030\004 \001(\0132\032.goog" + - "le.protobuf.Timestamp\0321\n\017AttributesEntry" + - "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\017GetT" + - "opicRequest\022\r\n\005topic\030\001 \001(\t\"m\n\022UpdateTopi" + - "cRequest\022&\n\005topic\030\001 \001(\0132\027.google.pubsub." + - "v1.Topic\022/\n\013update_mask\030\002 \001(\0132\032.google.p" + - "rotobuf.FieldMask\"R\n\016PublishRequest\022\r\n\005t" + - "opic\030\001 \001(\t\0221\n\010messages\030\002 \003(\0132\037.google.pu" + - "bsub.v1.PubsubMessage\"&\n\017PublishResponse" + - "\022\023\n\013message_ids\030\001 \003(\t\"K\n\021ListTopicsReque" + - "st\022\017\n\007project\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022" + - "\n\npage_token\030\003 \001(\t\"V\n\022ListTopicsResponse" + - "\022\'\n\006topics\030\001 \003(\0132\027.google.pubsub.v1.Topi" + - "c\022\027\n\017next_page_token\030\002 \001(\t\"U\n\035ListTopicS" + - "ubscriptionsRequest\022\r\n\005topic\030\001 \001(\t\022\021\n\tpa" + - "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"P\n\036Lis" + - "tTopicSubscriptionsResponse\022\025\n\rsubscript" + - "ions\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t\"#\n\022D" + - "eleteTopicRequest\022\r\n\005topic\030\001 \001(\t\"\305\002\n\014Sub" + - "scription\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030\002 \001(\t\0221" + - "\n\013push_config\030\004 \001(\0132\034.google.pubsub.v1.P" + - "ushConfig\022\034\n\024ack_deadline_seconds\030\005 \001(\005\022" + - "\035\n\025retain_acked_messages\030\007 \001(\010\022=\n\032messag" + - "e_retention_duration\030\010 \001(\0132\031.google.prot" + - "obuf.Duration\022:\n\006labels\030\t \003(\0132*.google.p" + - "ubsub.v1.Subscription.LabelsEntry\032-\n\013Lab" + - "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + - "\"\230\001\n\nPushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@" + - "\n\nattributes\030\002 \003(\0132,.google.pubsub.v1.Pu" + - "shConfig.AttributesEntry\0321\n\017AttributesEn" + - "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"S\n\017R" + - "eceivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007messag" + - "e\030\002 \001(\0132\037.google.pubsub.v1.PubsubMessage" + - "\".\n\026GetSubscriptionRequest\022\024\n\014subscripti" + - "on\030\001 \001(\t\"\202\001\n\031UpdateSubscriptionRequest\0224" + - "\n\014subscription\030\001 \001(\0132\036.google.pubsub.v1." + - "Subscription\022/\n\013update_mask\030\002 \001(\0132\032.goog" + - "le.protobuf.FieldMask\"R\n\030ListSubscriptio" + - "nsRequest\022\017\n\007project\030\001 \001(\t\022\021\n\tpage_size\030" + - "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031ListSubscri" + - "ptionsResponse\0225\n\rsubscriptions\030\001 \003(\0132\036." + - "google.pubsub.v1.Subscription\022\027\n\017next_pa" + - "ge_token\030\002 \001(\t\"1\n\031DeleteSubscriptionRequ" + - "est\022\024\n\014subscription\030\001 \001(\t\"b\n\027ModifyPushC" + - "onfigRequest\022\024\n\014subscription\030\001 \001(\t\0221\n\013pu" + - "sh_config\030\002 \001(\0132\034.google.pubsub.v1.PushC" + - "onfig\"U\n\013PullRequest\022\024\n\014subscription\030\001 \001" + - "(\t\022\032\n\022return_immediately\030\002 \001(\010\022\024\n\014max_me" + - "ssages\030\003 \001(\005\"L\n\014PullResponse\022<\n\021received" + - "_messages\030\001 \003(\0132!.google.pubsub.v1.Recei" + - "vedMessage\"_\n\030ModifyAckDeadlineRequest\022\024" + - "\n\014subscription\030\001 \001(\t\022\017\n\007ack_ids\030\004 \003(\t\022\034\n" + - "\024ack_deadline_seconds\030\003 \001(\005\";\n\022Acknowled" + - "geRequest\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack_i" + - "ds\030\002 \003(\t\"\244\001\n\024StreamingPullRequest\022\024\n\014sub" + - "scription\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027modi" + - "fy_deadline_seconds\030\003 \003(\005\022\037\n\027modify_dead" + - "line_ack_ids\030\004 \003(\t\022#\n\033stream_ack_deadlin" + - "e_seconds\030\005 \001(\005\"U\n\025StreamingPullResponse" + - "\022<\n\021received_messages\030\001 \003(\0132!.google.pub" + - "sub.v1.ReceivedMessage\";\n\025CreateSnapshot" + - "Request\022\014\n\004name\030\001 \001(\t\022\024\n\014subscription\030\002 " + - "\001(\t\"v\n\025UpdateSnapshotRequest\022,\n\010snapshot" + - "\030\001 \001(\0132\032.google.pubsub.v1.Snapshot\022/\n\013up" + - "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + - "ask\"\277\001\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030" + - "\002 \001(\t\022/\n\013expire_time\030\003 \001(\0132\032.google.prot" + - "obuf.Timestamp\0226\n\006labels\030\004 \003(\0132&.google." + - "pubsub.v1.Snapshot.LabelsEntry\032-\n\013Labels" + - "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"N\n" + - "\024ListSnapshotsRequest\022\017\n\007project\030\001 \001(\t\022\021" + - "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n" + - "\025ListSnapshotsResponse\022-\n\tsnapshots\030\001 \003(" + - "\0132\032.google.pubsub.v1.Snapshot\022\027\n\017next_pa" + - "ge_token\030\002 \001(\t\")\n\025DeleteSnapshotRequest\022" + - "\020\n\010snapshot\030\001 \001(\t\"m\n\013SeekRequest\022\024\n\014subs" + - "cription\030\001 \001(\t\022*\n\004time\030\002 \001(\0132\032.google.pr" + - "otobuf.TimestampH\000\022\022\n\010snapshot\030\003 \001(\tH\000B\010" + - "\n\006target\"\016\n\014SeekResponse2\367\020\n\nSubscriber\022" + - "\206\001\n\022CreateSubscription\022\036.google.pubsub.v" + - "1.Subscription\032\036.google.pubsub.v1.Subscr" + - "iption\"0\202\323\344\223\002*\032%/v1/{name=projects/*/sub" + - "scriptions/*}:\001*\022\222\001\n\017GetSubscription\022(.g" + - "oogle.pubsub.v1.GetSubscriptionRequest\032\036" + - ".google.pubsub.v1.Subscription\"5\202\323\344\223\002/\022-" + - "/v1/{subscription=projects/*/subscriptio" + - "ns/*}\022\240\001\n\022UpdateSubscription\022+.google.pu" + - "bsub.v1.UpdateSubscriptionRequest\032\036.goog" + - "le.pubsub.v1.Subscription\"=\202\323\344\223\002722/v1/{" + - "subscription.name=projects/*/subscriptio" + - "ns/*}:\001*\022\234\001\n\021ListSubscriptions\022*.google." + - "pubsub.v1.ListSubscriptionsRequest\032+.goo" + - "gle.pubsub.v1.ListSubscriptionsResponse\"" + - ".\202\323\344\223\002(\022&/v1/{project=projects/*}/subscr" + - "iptions\022\220\001\n\022DeleteSubscription\022+.google." + - "pubsub.v1.DeleteSubscriptionRequest\032\026.go" + - "ogle.protobuf.Empty\"5\202\323\344\223\002/*-/v1/{subscr" + - "iption=projects/*/subscriptions/*}\022\243\001\n\021M" + - "odifyAckDeadline\022*.google.pubsub.v1.Modi" + - "fyAckDeadlineRequest\032\026.google.protobuf.E" + - "mpty\"J\202\323\344\223\002D\"?/v1/{subscription=projects" + - "/*/subscriptions/*}:modifyAckDeadline:\001*" + - "\022\221\001\n\013Acknowledge\022$.google.pubsub.v1.Ackn" + - "owledgeRequest\032\026.google.protobuf.Empty\"D" + - "\202\323\344\223\002>\"9/v1/{subscription=projects/*/sub" + - "scriptions/*}:acknowledge:\001*\022\204\001\n\004Pull\022\035." + - "google.pubsub.v1.PullRequest\032\036.google.pu" + - "bsub.v1.PullResponse\"=\202\323\344\223\0027\"2/v1/{subsc" + - "ription=projects/*/subscriptions/*}:pull" + - ":\001*\022d\n\rStreamingPull\022&.google.pubsub.v1." + - "StreamingPullRequest\032\'.google.pubsub.v1." + - "StreamingPullResponse(\0010\001\022\240\001\n\020ModifyPush" + - "Config\022).google.pubsub.v1.ModifyPushConf" + - "igRequest\032\026.google.protobuf.Empty\"I\202\323\344\223\002" + - "C\">/v1/{subscription=projects/*/subscrip" + - "tions/*}:modifyPushConfig:\001*\022\214\001\n\rListSna" + - "pshots\022&.google.pubsub.v1.ListSnapshotsR" + - "equest\032\'.google.pubsub.v1.ListSnapshotsR" + - "esponse\"*\202\323\344\223\002$\022\"/v1/{project=projects/*" + - "}/snapshots\022\203\001\n\016CreateSnapshot\022\'.google." + - "pubsub.v1.CreateSnapshotRequest\032\032.google" + - ".pubsub.v1.Snapshot\",\202\323\344\223\002&\032!/v1/{name=p" + - "rojects/*/snapshots/*}:\001*\022\214\001\n\016UpdateSnap" + - "shot\022\'.google.pubsub.v1.UpdateSnapshotRe" + - "quest\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223\002" + - "/2*/v1/{snapshot.name=projects/*/snapsho" + - "ts/*}:\001*\022\200\001\n\016DeleteSnapshot\022\'.google.pub" + - "sub.v1.DeleteSnapshotRequest\032\026.google.pr" + - "otobuf.Empty\"-\202\323\344\223\002\'*%/v1/{snapshot=proj" + - "ects/*/snapshots/*}\022\204\001\n\004Seek\022\035.google.pu" + - "bsub.v1.SeekRequest\032\036.google.pubsub.v1.S" + - "eekResponse\"=\202\323\344\223\0027\"2/v1/{subscription=p" + - "rojects/*/subscriptions/*}:seek:\001*2\232\007\n\tP" + - "ublisher\022j\n\013CreateTopic\022\027.google.pubsub." + - "v1.Topic\032\027.google.pubsub.v1.Topic\")\202\323\344\223\002" + - "#\032\036/v1/{name=projects/*/topics/*}:\001*\022}\n\013" + - "UpdateTopic\022$.google.pubsub.v1.UpdateTop" + - "icRequest\032\027.google.pubsub.v1.Topic\"/\202\323\344\223" + - "\002)2$/v1/{topic.name=projects/*/topics/*}" + - ":\001*\022\202\001\n\007Publish\022 .google.pubsub.v1.Publi" + - "shRequest\032!.google.pubsub.v1.PublishResp" + - "onse\"2\202\323\344\223\002,\"\'/v1/{topic=projects/*/topi" + - "cs/*}:publish:\001*\022o\n\010GetTopic\022!.google.pu" + - "bsub.v1.GetTopicRequest\032\027.google.pubsub." + - "v1.Topic\"\'\202\323\344\223\002!\022\037/v1/{topic=projects/*/" + - "topics/*}\022\200\001\n\nListTopics\022#.google.pubsub" + - ".v1.ListTopicsRequest\032$.google.pubsub.v1" + - ".ListTopicsResponse\"\'\202\323\344\223\002!\022\037/v1/{projec" + - "t=projects/*}/topics\022\262\001\n\026ListTopicSubscr" + - "iptions\022/.google.pubsub.v1.ListTopicSubs" + - "criptionsRequest\0320.google.pubsub.v1.List" + - "TopicSubscriptionsResponse\"5\202\323\344\223\002/\022-/v1/" + - "{topic=projects/*/topics/*}/subscription" + - "s\022t\n\013DeleteTopic\022$.google.pubsub.v1.Dele" + - "teTopicRequest\032\026.google.protobuf.Empty\"\'" + - "\202\323\344\223\002!*\037/v1/{topic=projects/*/topics/*}B" + - "\222\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z" + - "6google.golang.org/genproto/googleapis/p" + - "ubsub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub" + - ".V1\312\002\026Google\\Cloud\\PubSub\\V1b\006proto3" + "p.proto\";\n\024MessageStoragePolicy\022#\n\033allow" + + "ed_persistence_regions\030\001 \003(\t\"\301\001\n\005Topic\022\014" + + "\n\004name\030\001 \001(\t\0223\n\006labels\030\002 \003(\0132#.google.pu" + + "bsub.v1.Topic.LabelsEntry\022F\n\026message_sto" + + "rage_policy\030\003 \001(\0132&.google.pubsub.v1.Mes" + + "sageStoragePolicy\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\333\001\n\rPubsubMessa" + + "ge\022\014\n\004data\030\001 \001(\014\022C\n\nattributes\030\002 \003(\0132/.g" + + "oogle.pubsub.v1.PubsubMessage.Attributes" + + "Entry\022\022\n\nmessage_id\030\003 \001(\t\0220\n\014publish_tim" + + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\0321\n\017A" + + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\" \n\017GetTopicRequest\022\r\n\005topic\030\001 \001(\t" + + "\"m\n\022UpdateTopicRequest\022&\n\005topic\030\001 \001(\0132\027." + + "google.pubsub.v1.Topic\022/\n\013update_mask\030\002 " + + "\001(\0132\032.google.protobuf.FieldMask\"R\n\016Publi" + + "shRequest\022\r\n\005topic\030\001 \001(\t\0221\n\010messages\030\002 \003" + + "(\0132\037.google.pubsub.v1.PubsubMessage\"&\n\017P" + + "ublishResponse\022\023\n\013message_ids\030\001 \003(\t\"K\n\021L" + + "istTopicsRequest\022\017\n\007project\030\001 \001(\t\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"V\n\022List" + + "TopicsResponse\022\'\n\006topics\030\001 \003(\0132\027.google." + + "pubsub.v1.Topic\022\027\n\017next_page_token\030\002 \001(\t" + + "\"U\n\035ListTopicSubscriptionsRequest\022\r\n\005top" + + "ic\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\"P\n\036ListTopicSubscriptionsRespons" + + "e\022\025\n\rsubscriptions\030\001 \003(\t\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"Q\n\031ListTopicSnapshotsRequest\022\r" + + "\n\005topic\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" + + "_token\030\003 \001(\t\"H\n\032ListTopicSnapshotsRespon" + + "se\022\021\n\tsnapshots\030\001 \003(\t\022\027\n\017next_page_token" + + "\030\002 \001(\t\"#\n\022DeleteTopicRequest\022\r\n\005topic\030\001 " + + "\001(\t\"\305\002\n\014Subscription\022\014\n\004name\030\001 \001(\t\022\r\n\005to" + + "pic\030\002 \001(\t\0221\n\013push_config\030\004 \001(\0132\034.google." + + "pubsub.v1.PushConfig\022\034\n\024ack_deadline_sec" + + "onds\030\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(" + + "\010\022=\n\032message_retention_duration\030\010 \001(\0132\031." + + "google.protobuf.Duration\022:\n\006labels\030\t \003(\013" + + "2*.google.pubsub.v1.Subscription.LabelsE" + + "ntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\230\001\n\nPushConfig\022\025\n\rpush_endpo" + + "int\030\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.google.p" + + "ubsub.v1.PushConfig.AttributesEntry\0321\n\017A" + + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"S\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(" + + "\t\0220\n\007message\030\002 \001(\0132\037.google.pubsub.v1.Pu" + + "bsubMessage\".\n\026GetSubscriptionRequest\022\024\n" + + "\014subscription\030\001 \001(\t\"\202\001\n\031UpdateSubscripti" + + "onRequest\0224\n\014subscription\030\001 \001(\0132\036.google" + + ".pubsub.v1.Subscription\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\"R\n\030List" + + "SubscriptionsRequest\022\017\n\007project\030\001 \001(\t\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\031" + + "ListSubscriptionsResponse\0225\n\rsubscriptio" + + "ns\030\001 \003(\0132\036.google.pubsub.v1.Subscription" + + "\022\027\n\017next_page_token\030\002 \001(\t\"1\n\031DeleteSubsc" + + "riptionRequest\022\024\n\014subscription\030\001 \001(\t\"b\n\027" + + "ModifyPushConfigRequest\022\024\n\014subscription\030" + + "\001 \001(\t\0221\n\013push_config\030\002 \001(\0132\034.google.pubs" + + "ub.v1.PushConfig\"U\n\013PullRequest\022\024\n\014subsc" + + "ription\030\001 \001(\t\022\032\n\022return_immediately\030\002 \001(" + + "\010\022\024\n\014max_messages\030\003 \001(\005\"L\n\014PullResponse\022" + + "<\n\021received_messages\030\001 \003(\0132!.google.pubs" + + "ub.v1.ReceivedMessage\"_\n\030ModifyAckDeadli" + + "neRequest\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack_i" + + "ds\030\004 \003(\t\022\034\n\024ack_deadline_seconds\030\003 \001(\005\";" + + "\n\022AcknowledgeRequest\022\024\n\014subscription\030\001 \001" + + "(\t\022\017\n\007ack_ids\030\002 \003(\t\"\244\001\n\024StreamingPullReq" + + "uest\022\024\n\014subscription\030\001 \001(\t\022\017\n\007ack_ids\030\002 " + + "\003(\t\022\037\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n\027" + + "modify_deadline_ack_ids\030\004 \003(\t\022#\n\033stream_" + + "ack_deadline_seconds\030\005 \001(\005\"U\n\025StreamingP" + + "ullResponse\022<\n\021received_messages\030\001 \003(\0132!" + + ".google.pubsub.v1.ReceivedMessage\"\257\001\n\025Cr" + + "eateSnapshotRequest\022\014\n\004name\030\001 \001(\t\022\024\n\014sub" + + "scription\030\002 \001(\t\022C\n\006labels\030\003 \003(\01323.google" + + ".pubsub.v1.CreateSnapshotRequest.LabelsE" + + "ntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"v\n\025UpdateSnapshotRequest\022,\n\010" + + "snapshot\030\001 \001(\0132\032.google.pubsub.v1.Snapsh" + + "ot\022/\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMask\"\277\001\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022\r" + + "\n\005topic\030\002 \001(\t\022/\n\013expire_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\0226\n\006labels\030\004 \003(\0132&" + + ".google.pubsub.v1.Snapshot.LabelsEntry\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"&\n\022GetSnapshotRequest\022\020\n\010snapshot\030" + + "\001 \001(\t\"N\n\024ListSnapshotsRequest\022\017\n\007project" + + "\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapsh" + + "ots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n" + + "\017next_page_token\030\002 \001(\t\")\n\025DeleteSnapshot" + + "Request\022\020\n\010snapshot\030\001 \001(\t\"m\n\013SeekRequest" + + "\022\024\n\014subscription\030\001 \001(\t\022*\n\004time\030\002 \001(\0132\032.g" + + "oogle.protobuf.TimestampH\000\022\022\n\010snapshot\030\003" + + " \001(\tH\000B\010\n\006target\"\016\n\014SeekResponse2\277\010\n\tPub" + + "lisher\022j\n\013CreateTopic\022\027.google.pubsub.v1" + + ".Topic\032\027.google.pubsub.v1.Topic\")\202\323\344\223\002#\032" + + "\036/v1/{name=projects/*/topics/*}:\001*\022}\n\013Up" + + "dateTopic\022$.google.pubsub.v1.UpdateTopic" + + "Request\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002)" + + "2$/v1/{topic.name=projects/*/topics/*}:\001" + + "*\022\202\001\n\007Publish\022 .google.pubsub.v1.Publish" + + "Request\032!.google.pubsub.v1.PublishRespon" + + "se\"2\202\323\344\223\002,\"\'/v1/{topic=projects/*/topics" + + "/*}:publish:\001*\022o\n\010GetTopic\022!.google.pubs" + + "ub.v1.GetTopicRequest\032\027.google.pubsub.v1" + + ".Topic\"\'\202\323\344\223\002!\022\037/v1/{topic=projects/*/to" + + "pics/*}\022\200\001\n\nListTopics\022#.google.pubsub.v" + + "1.ListTopicsRequest\032$.google.pubsub.v1.L" + + "istTopicsResponse\"\'\202\323\344\223\002!\022\037/v1/{project=" + + "projects/*}/topics\022\262\001\n\026ListTopicSubscrip" + + "tions\022/.google.pubsub.v1.ListTopicSubscr" + + "iptionsRequest\0320.google.pubsub.v1.ListTo" + + "picSubscriptionsResponse\"5\202\323\344\223\002/\022-/v1/{t" + + "opic=projects/*/topics/*}/subscriptions\022" + + "\242\001\n\022ListTopicSnapshots\022+.google.pubsub.v" + + "1.ListTopicSnapshotsRequest\032,.google.pub" + + "sub.v1.ListTopicSnapshotsResponse\"1\202\323\344\223\002" + + "+\022)/v1/{topic=projects/*/topics/*}/snaps" + + "hots\022t\n\013DeleteTopic\022$.google.pubsub.v1.D" + + "eleteTopicRequest\032\026.google.protobuf.Empt" + + "y\"\'\202\323\344\223\002!*\037/v1/{topic=projects/*/topics/" + + "*}2\367\021\n\nSubscriber\022\206\001\n\022CreateSubscription" + + "\022\036.google.pubsub.v1.Subscription\032\036.googl" + + "e.pubsub.v1.Subscription\"0\202\323\344\223\002*\032%/v1/{n" + + "ame=projects/*/subscriptions/*}:\001*\022\222\001\n\017G" + + "etSubscription\022(.google.pubsub.v1.GetSub" + + "scriptionRequest\032\036.google.pubsub.v1.Subs" + + "cription\"5\202\323\344\223\002/\022-/v1/{subscription=proj" + + "ects/*/subscriptions/*}\022\240\001\n\022UpdateSubscr" + + "iption\022+.google.pubsub.v1.UpdateSubscrip" + + "tionRequest\032\036.google.pubsub.v1.Subscript" + + "ion\"=\202\323\344\223\002722/v1/{subscription.name=proj" + + "ects/*/subscriptions/*}:\001*\022\234\001\n\021ListSubsc" + + "riptions\022*.google.pubsub.v1.ListSubscrip" + + "tionsRequest\032+.google.pubsub.v1.ListSubs" + + "criptionsResponse\".\202\323\344\223\002(\022&/v1/{project=" + + "projects/*}/subscriptions\022\220\001\n\022DeleteSubs" + + "cription\022+.google.pubsub.v1.DeleteSubscr" + + "iptionRequest\032\026.google.protobuf.Empty\"5\202" + + "\323\344\223\002/*-/v1/{subscription=projects/*/subs" + + "criptions/*}\022\243\001\n\021ModifyAckDeadline\022*.goo" + + "gle.pubsub.v1.ModifyAckDeadlineRequest\032\026" + + ".google.protobuf.Empty\"J\202\323\344\223\002D\"?/v1/{sub" + + "scription=projects/*/subscriptions/*}:mo" + + "difyAckDeadline:\001*\022\221\001\n\013Acknowledge\022$.goo" + + "gle.pubsub.v1.AcknowledgeRequest\032\026.googl" + + "e.protobuf.Empty\"D\202\323\344\223\002>\"9/v1/{subscript" + + "ion=projects/*/subscriptions/*}:acknowle" + + "dge:\001*\022\204\001\n\004Pull\022\035.google.pubsub.v1.PullR" + + "equest\032\036.google.pubsub.v1.PullResponse\"=" + + "\202\323\344\223\0027\"2/v1/{subscription=projects/*/sub" + + "scriptions/*}:pull:\001*\022d\n\rStreamingPull\022&" + + ".google.pubsub.v1.StreamingPullRequest\032\'" + + ".google.pubsub.v1.StreamingPullResponse(" + + "\0010\001\022\240\001\n\020ModifyPushConfig\022).google.pubsub" + + ".v1.ModifyPushConfigRequest\032\026.google.pro" + + "tobuf.Empty\"I\202\323\344\223\002C\">/v1/{subscription=p" + + "rojects/*/subscriptions/*}:modifyPushCon" + + "fig:\001*\022~\n\013GetSnapshot\022$.google.pubsub.v1" + + ".GetSnapshotRequest\032\032.google.pubsub.v1.S" + + "napshot\"-\202\323\344\223\002\'\022%/v1/{snapshot=projects/" + + "*/snapshots/*}\022\214\001\n\rListSnapshots\022&.googl" + + "e.pubsub.v1.ListSnapshotsRequest\032\'.googl" + + "e.pubsub.v1.ListSnapshotsResponse\"*\202\323\344\223\002" + + "$\022\"/v1/{project=projects/*}/snapshots\022\203\001" + + "\n\016CreateSnapshot\022\'.google.pubsub.v1.Crea" + + "teSnapshotRequest\032\032.google.pubsub.v1.Sna" + + "pshot\",\202\323\344\223\002&\032!/v1/{name=projects/*/snap" + + "shots/*}:\001*\022\214\001\n\016UpdateSnapshot\022\'.google." + + "pubsub.v1.UpdateSnapshotRequest\032\032.google" + + ".pubsub.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapsh" + + "ot.name=projects/*/snapshots/*}:\001*\022\200\001\n\016D" + + "eleteSnapshot\022\'.google.pubsub.v1.DeleteS" + + "napshotRequest\032\026.google.protobuf.Empty\"-" + + "\202\323\344\223\002\'*%/v1/{snapshot=projects/*/snapsho" + + "ts/*}\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRe" + + "quest\032\036.google.pubsub.v1.SeekResponse\"=\202" + + "\323\344\223\0027\"2/v1/{subscription=projects/*/subs" + + "criptions/*}:seek:\001*B\222\001\n\024com.google.pubs" + + "ub.v1B\013PubsubProtoP\001Z6google.golang.org/" + + "genproto/googleapis/pubsub/v1;pubsub\370\001\001\252" + + "\002\026Google.Cloud.PubSub.V1\312\002\026Google\\Cloud\\" + + "PubSub\\V1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -407,12 +451,18 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }, assigner); - internal_static_google_pubsub_v1_Topic_descriptor = + internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor, + new java.lang.String[] { "AllowedPersistenceRegions", }); + internal_static_google_pubsub_v1_Topic_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_pubsub_v1_Topic_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Topic_descriptor, - new java.lang.String[] { "Name", "Labels", }); + new java.lang.String[] { "Name", "Labels", "MessageStoragePolicy", }); internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor = internal_static_google_pubsub_v1_Topic_descriptor.getNestedTypes().get(0); internal_static_google_pubsub_v1_Topic_LabelsEntry_fieldAccessorTable = new @@ -420,7 +470,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_PubsubMessage_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PubsubMessage_descriptor, @@ -432,61 +482,73 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_GetTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetTopicRequest_descriptor, new java.lang.String[] { "Topic", }); internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor, new java.lang.String[] { "Topic", "UpdateMask", }); internal_static_google_pubsub_v1_PublishRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PublishRequest_descriptor, new java.lang.String[] { "Topic", "Messages", }); internal_static_google_pubsub_v1_PublishResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PublishResponse_descriptor, new java.lang.String[] { "MessageIds", }); internal_static_google_pubsub_v1_ListTopicsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsResponse_descriptor, new java.lang.String[] { "Topics", "NextPageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor, new java.lang.String[] { "Topic", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor, new java.lang.String[] { "Subscriptions", "NextPageToken", }); + internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor, + new java.lang.String[] { "Topic", "PageSize", "PageToken", }); + internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor, + new java.lang.String[] { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(13); internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor, new java.lang.String[] { "Topic", }); internal_static_google_pubsub_v1_Subscription_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(14); internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_descriptor, @@ -498,7 +560,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(15); internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_descriptor, @@ -510,97 +572,103 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(16); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, new java.lang.String[] { "AckId", "Message", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(17); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(18); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(19); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(20); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, new java.lang.String[] { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(21); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, new java.lang.String[] { "Subscription", "PushConfig", }); internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, new java.lang.String[] { "Subscription", "ReturnImmediately", "MaxMessages", }); internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, new java.lang.String[] { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, new java.lang.String[] { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, new java.lang.String[] { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(27); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, new java.lang.String[] { "Subscription", "AckIds", "ModifyDeadlineSeconds", "ModifyDeadlineAckIds", "StreamAckDeadlineSeconds", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, new java.lang.String[] { "ReceivedMessages", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, - new java.lang.String[] { "Name", "Subscription", }); + new java.lang.String[] { "Name", "Subscription", "Labels", }); + internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor = + internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, new java.lang.String[] { "Snapshot", "UpdateMask", }); internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(31); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, @@ -611,32 +679,38 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, + new java.lang.String[] { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(33); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(34); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, new java.lang.String[] { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(35); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, new java.lang.String[] { "Snapshot", }); internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(36); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, new java.lang.String[] { "Subscription", "Time", "Snapshot", "Target", }); internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(37); internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekResponse_descriptor, diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java index 9d12081522f7..215cb26b748d 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java @@ -5,7 +5,10 @@ /** *
- * Request for the `Seek` method.
+ * Request for the `Seek` method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.SeekRequest} @@ -499,7 +502,10 @@ protected Builder newBuilderForType( } /** *
-   * Request for the `Seek` method.
+   * Request for the `Seek` method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.SeekRequest} diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java index 65f04e684884..a42368346be5 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java @@ -5,7 +5,10 @@ /** *
- * A snapshot resource.
+ * A snapshot resource.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.Snapshot} @@ -225,7 +228,8 @@ public java.lang.String getTopic() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -243,7 +247,8 @@ public boolean hasExpireTime() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -261,7 +266,8 @@ public com.google.protobuf.Timestamp getExpireTime() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -562,7 +568,10 @@ protected Builder newBuilderForType( } /** *
-   * A snapshot resource.
+   * A snapshot resource.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.Snapshot} @@ -940,7 +949,8 @@ public Builder setTopicBytes( * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -958,7 +968,8 @@ public boolean hasExpireTime() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -980,7 +991,8 @@ public com.google.protobuf.Timestamp getExpireTime() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1008,7 +1020,8 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1034,7 +1047,8 @@ public Builder setExpireTime( * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1064,7 +1078,8 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1090,7 +1105,8 @@ public Builder clearExpireTime() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1110,7 +1126,8 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -1133,7 +1150,8 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java index 36b1b1de618c..9de6c0aaed64 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java @@ -53,7 +53,8 @@ public interface SnapshotOrBuilder extends * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -69,7 +70,8 @@ public interface SnapshotOrBuilder extends * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; @@ -85,7 +87,8 @@ public interface SnapshotOrBuilder extends * For example, consider a subscription whose oldest unacked message is 3 days * old. If a snapshot is created from this subscription, the snapshot -- which * will always capture this 3-day-old backlog as long as the snapshot - * exists -- will expire in 4 days. + * exists -- will expire in 4 days. The service will refuse to create a + * snapshot that would expire in less than 1 hour after creation. * * * .google.protobuf.Timestamp expire_time = 3; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java index fad189d8082b..7436899a3ef8 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java @@ -305,7 +305,8 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * 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 - * pull. + * 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. @@ -328,7 +329,10 @@ public int getAckDeadlineSeconds() { * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` - * window. + * window.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * bool retain_acked_messages = 7; @@ -346,7 +350,10 @@ public boolean getRetainAckedMessages() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -361,7 +368,10 @@ public boolean hasMessageRetentionDuration() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -376,7 +386,10 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1329,7 +1342,8 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * 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 - * pull. + * 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. @@ -1354,7 +1368,8 @@ public int getAckDeadlineSeconds() { * 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 - * pull. + * 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. @@ -1382,7 +1397,8 @@ public Builder setAckDeadlineSeconds(int value) { * 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 - * pull. + * 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. @@ -1407,7 +1423,10 @@ public Builder clearAckDeadlineSeconds() { * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` - * window. + * window.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * bool retain_acked_messages = 7; @@ -1420,7 +1439,10 @@ public boolean getRetainAckedMessages() { * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` - * window. + * window.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * bool retain_acked_messages = 7; @@ -1436,7 +1458,10 @@ public Builder setRetainAckedMessages(boolean value) { * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` - * window. + * window.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * bool retain_acked_messages = 7; @@ -1458,7 +1483,10 @@ public Builder clearRetainAckedMessages() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1473,7 +1501,10 @@ public boolean hasMessageRetentionDuration() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1492,7 +1523,10 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1517,7 +1551,10 @@ public Builder setMessageRetentionDuration(com.google.protobuf.Duration value) { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1540,7 +1577,10 @@ public Builder setMessageRetentionDuration( * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1567,7 +1607,10 @@ public Builder mergeMessageRetentionDuration(com.google.protobuf.Duration value) * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1590,7 +1633,10 @@ public Builder clearMessageRetentionDuration() { * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1607,7 +1653,10 @@ public com.google.protobuf.Duration.Builder getMessageRetentionDurationBuilder() * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -1627,7 +1676,10 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 2b792b047690..b8e0610cb781 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -100,7 +100,8 @@ public interface SubscriptionOrBuilder extends * 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 - * pull. + * 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. @@ -119,7 +120,10 @@ public interface SubscriptionOrBuilder extends * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` - * window. + * window.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * bool retain_acked_messages = 7; @@ -133,7 +137,10 @@ public interface SubscriptionOrBuilder extends * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -146,7 +153,10 @@ public interface SubscriptionOrBuilder extends * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; @@ -159,7 +169,10 @@ public interface SubscriptionOrBuilder extends * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - * minutes. + * minutes.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be + * changed in backward-incompatible ways and is not recommended for production + * use. It is not subject to any SLA or deprecation policy. * * * .google.protobuf.Duration message_retention_duration = 8; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java index 6ebdc7c1d2e5..ebc74337892d 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java @@ -73,6 +73,19 @@ private Topic( labels__.getKey(), labels__.getValue()); break; } + case 26: { + com.google.pubsub.v1.MessageStoragePolicy.Builder subBuilder = null; + if (messageStoragePolicy_ != null) { + subBuilder = messageStoragePolicy_.toBuilder(); + } + messageStoragePolicy_ = input.readMessage(com.google.pubsub.v1.MessageStoragePolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(messageStoragePolicy_); + messageStoragePolicy_ = subBuilder.buildPartial(); + } + + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -253,6 +266,54 @@ public java.lang.String getLabelsOrThrow( return map.get(key); } + public static final int MESSAGE_STORAGE_POLICY_FIELD_NUMBER = 3; + private com.google.pubsub.v1.MessageStoragePolicy messageStoragePolicy_; + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public boolean hasMessageStoragePolicy() { + return messageStoragePolicy_ != null; + } + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { + return messageStoragePolicy_ == null ? com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance() : messageStoragePolicy_; + } + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder() { + return getMessageStoragePolicy(); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -274,6 +335,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + if (messageStoragePolicy_ != null) { + output.writeMessage(3, getMessageStoragePolicy()); + } unknownFields.writeTo(output); } @@ -295,6 +359,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, labels__); } + if (messageStoragePolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMessageStoragePolicy()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -315,6 +383,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName()); result = result && internalGetLabels().equals( other.internalGetLabels()); + result = result && (hasMessageStoragePolicy() == other.hasMessageStoragePolicy()); + if (hasMessageStoragePolicy()) { + result = result && getMessageStoragePolicy() + .equals(other.getMessageStoragePolicy()); + } result = result && unknownFields.equals(other.unknownFields); return result; } @@ -332,6 +405,10 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + if (hasMessageStoragePolicy()) { + hash = (37 * hash) + MESSAGE_STORAGE_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getMessageStoragePolicy().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -490,6 +567,12 @@ public Builder clear() { name_ = ""; internalGetMutableLabels().clear(); + if (messageStoragePolicyBuilder_ == null) { + messageStoragePolicy_ = null; + } else { + messageStoragePolicy_ = null; + messageStoragePolicyBuilder_ = null; + } return this; } @@ -517,6 +600,11 @@ public com.google.pubsub.v1.Topic buildPartial() { result.name_ = name_; result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); + if (messageStoragePolicyBuilder_ == null) { + result.messageStoragePolicy_ = messageStoragePolicy_; + } else { + result.messageStoragePolicy_ = messageStoragePolicyBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -565,6 +653,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Topic other) { } internalGetMutableLabels().mergeFrom( other.internalGetLabels()); + if (other.hasMessageStoragePolicy()) { + mergeMessageStoragePolicy(other.getMessageStoragePolicy()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -857,6 +948,204 @@ public Builder putAllLabels( .putAll(values); return this; } + + private com.google.pubsub.v1.MessageStoragePolicy messageStoragePolicy_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder> messageStoragePolicyBuilder_; + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public boolean hasMessageStoragePolicy() { + return messageStoragePolicyBuilder_ != null || messageStoragePolicy_ != null; + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { + if (messageStoragePolicyBuilder_ == null) { + return messageStoragePolicy_ == null ? com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance() : messageStoragePolicy_; + } else { + return messageStoragePolicyBuilder_.getMessage(); + } + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public Builder setMessageStoragePolicy(com.google.pubsub.v1.MessageStoragePolicy value) { + if (messageStoragePolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + messageStoragePolicy_ = value; + onChanged(); + } else { + messageStoragePolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public Builder setMessageStoragePolicy( + com.google.pubsub.v1.MessageStoragePolicy.Builder builderForValue) { + if (messageStoragePolicyBuilder_ == null) { + messageStoragePolicy_ = builderForValue.build(); + onChanged(); + } else { + messageStoragePolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public Builder mergeMessageStoragePolicy(com.google.pubsub.v1.MessageStoragePolicy value) { + if (messageStoragePolicyBuilder_ == null) { + if (messageStoragePolicy_ != null) { + messageStoragePolicy_ = + com.google.pubsub.v1.MessageStoragePolicy.newBuilder(messageStoragePolicy_).mergeFrom(value).buildPartial(); + } else { + messageStoragePolicy_ = value; + } + onChanged(); + } else { + messageStoragePolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public Builder clearMessageStoragePolicy() { + if (messageStoragePolicyBuilder_ == null) { + messageStoragePolicy_ = null; + onChanged(); + } else { + messageStoragePolicy_ = null; + messageStoragePolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public com.google.pubsub.v1.MessageStoragePolicy.Builder getMessageStoragePolicyBuilder() { + + onChanged(); + return getMessageStoragePolicyFieldBuilder().getBuilder(); + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder() { + if (messageStoragePolicyBuilder_ != null) { + return messageStoragePolicyBuilder_.getMessageOrBuilder(); + } else { + return messageStoragePolicy_ == null ? + com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance() : messageStoragePolicy_; + } + } + /** + *
+     * Policy constraining how messages published to the topic may be stored. It
+     * is determined when the topic is created based on the policy configured at
+     * the project level. It must not be set by the caller in the request to
+     * CreateTopic or to UpdateTopic. This field will be populated in the
+     * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+     * response, then no constraints are in effect.
+     * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder> + getMessageStoragePolicyFieldBuilder() { + if (messageStoragePolicyBuilder_ == null) { + messageStoragePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder>( + getMessageStoragePolicy(), + getParentForChildren(), + isClean()); + messageStoragePolicy_ = null; + } + return messageStoragePolicyBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java index 7ae28923e135..aea59e1bc018 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java @@ -88,4 +88,44 @@ java.lang.String getLabelsOrDefault( java.lang.String getLabelsOrThrow( java.lang.String key); + + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + boolean hasMessageStoragePolicy(); + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy(); + /** + *
+   * Policy constraining how messages published to the topic may be stored. It
+   * is determined when the topic is created based on the policy configured at
+   * the project level. It must not be set by the caller in the request to
+   * CreateTopic or to UpdateTopic. This field will be populated in the
+   * responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
+   * response, then no constraints are in effect.
+   * 
+ * + * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3; + */ + com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder(); } diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java index 865b574fe79d..8d5f14f1b325 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java @@ -5,7 +5,10 @@ /** *
- * Request for the UpdateSnapshot method.
+ * Request for the UpdateSnapshot method.<br><br>
+ * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+ * changed in backward-incompatible ways and is not recommended for production
+ * use. It is not subject to any SLA or deprecation policy.
  * 
* * Protobuf type {@code google.pubsub.v1.UpdateSnapshotRequest} @@ -107,7 +110,7 @@ private UpdateSnapshotRequest( private com.google.pubsub.v1.Snapshot snapshot_; /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -117,7 +120,7 @@ public boolean hasSnapshot() { } /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -127,7 +130,7 @@ public com.google.pubsub.v1.Snapshot getSnapshot() { } /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -346,7 +349,10 @@ protected Builder newBuilderForType( } /** *
-   * Request for the UpdateSnapshot method.
+   * Request for the UpdateSnapshot method.<br><br>
+   * <b>ALPHA:</b> This feature is part of an alpha release. This API might be
+   * changed in backward-incompatible ways and is not recommended for production
+   * use. It is not subject to any SLA or deprecation policy.
    * 
* * Protobuf type {@code google.pubsub.v1.UpdateSnapshotRequest} @@ -507,7 +513,7 @@ public Builder mergeFrom( com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder> snapshotBuilder_; /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -517,7 +523,7 @@ public boolean hasSnapshot() { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -531,7 +537,7 @@ public com.google.pubsub.v1.Snapshot getSnapshot() { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -551,7 +557,7 @@ public Builder setSnapshot(com.google.pubsub.v1.Snapshot value) { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -569,7 +575,7 @@ public Builder setSnapshot( } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -591,7 +597,7 @@ public Builder mergeSnapshot(com.google.pubsub.v1.Snapshot value) { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -609,7 +615,7 @@ public Builder clearSnapshot() { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -621,7 +627,7 @@ public com.google.pubsub.v1.Snapshot.Builder getSnapshotBuilder() { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -636,7 +642,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { } /** *
-     * The updated snpashot object.
+     * The updated snapshot object.
      * 
* * .google.pubsub.v1.Snapshot snapshot = 1; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java index 13c36c3a2f82..e80d7cda2f95 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java @@ -9,7 +9,7 @@ public interface UpdateSnapshotRequestOrBuilder extends /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -17,7 +17,7 @@ public interface UpdateSnapshotRequestOrBuilder extends boolean hasSnapshot(); /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; @@ -25,7 +25,7 @@ public interface UpdateSnapshotRequestOrBuilder extends com.google.pubsub.v1.Snapshot getSnapshot(); /** *
-   * The updated snpashot object.
+   * The updated snapshot object.
    * 
* * .google.pubsub.v1.Snapshot snapshot = 1; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java index cbe32588bc66..611de401936c 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java @@ -107,7 +107,7 @@ private UpdateTopicRequest( private com.google.pubsub.v1.Topic topic_; /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -117,7 +117,7 @@ public boolean hasTopic() { } /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -127,7 +127,7 @@ public com.google.pubsub.v1.Topic getTopic() { } /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -140,8 +140,11 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { private com.google.protobuf.FieldMask updateMask_; /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -151,8 +154,11 @@ public boolean hasUpdateMask() { } /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -162,8 +168,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { } /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -507,7 +516,7 @@ public Builder mergeFrom( com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> topicBuilder_; /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -517,7 +526,7 @@ public boolean hasTopic() { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -531,7 +540,7 @@ public com.google.pubsub.v1.Topic getTopic() { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -551,7 +560,7 @@ public Builder setTopic(com.google.pubsub.v1.Topic value) { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -569,7 +578,7 @@ public Builder setTopic( } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -591,7 +600,7 @@ public Builder mergeTopic(com.google.pubsub.v1.Topic value) { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -609,7 +618,7 @@ public Builder clearTopic() { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -621,7 +630,7 @@ public com.google.pubsub.v1.Topic.Builder getTopicBuilder() { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -636,7 +645,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { } /** *
-     * The topic to update.
+     * The updated topic object.
      * 
* * .google.pubsub.v1.Topic topic = 1; @@ -660,8 +669,11 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -671,8 +683,11 @@ public boolean hasUpdateMask() { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -686,8 +701,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -707,8 +725,11 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -726,8 +747,11 @@ public Builder setUpdateMask( } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -749,8 +773,11 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -768,8 +795,11 @@ public Builder clearUpdateMask() { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -781,8 +811,11 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -797,8 +830,11 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } /** *
-     * Indicates which fields in the provided topic to update.
-     * Must be specified and non-empty.
+     * Indicates which fields in the provided topic to update. Must be specified
+     * and non-empty. Note that if `update_mask` contains
+     * "message_storage_policy" then the new value will be determined based on the
+     * policy configured at the project or organization level. The
+     * `message_storage_policy` must not be set in the `topic` provided above.
      * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java index dfe961eaed42..a0f5b5c5e39e 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java @@ -9,7 +9,7 @@ public interface UpdateTopicRequestOrBuilder extends /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -17,7 +17,7 @@ public interface UpdateTopicRequestOrBuilder extends boolean hasTopic(); /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -25,7 +25,7 @@ public interface UpdateTopicRequestOrBuilder extends com.google.pubsub.v1.Topic getTopic(); /** *
-   * The topic to update.
+   * The updated topic object.
    * 
* * .google.pubsub.v1.Topic topic = 1; @@ -34,8 +34,11 @@ public interface UpdateTopicRequestOrBuilder extends /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -43,8 +46,11 @@ public interface UpdateTopicRequestOrBuilder extends boolean hasUpdateMask(); /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; @@ -52,8 +58,11 @@ public interface UpdateTopicRequestOrBuilder extends com.google.protobuf.FieldMask getUpdateMask(); /** *
-   * Indicates which fields in the provided topic to update.
-   * Must be specified and non-empty.
+   * Indicates which fields in the provided topic to update. Must be specified
+   * and non-empty. Note that if `update_mask` contains
+   * "message_storage_policy" then the new value will be determined based on the
+   * policy configured at the project or organization level. The
+   * `message_storage_policy` must not be set in the `topic` provided above.
    * 
* * .google.protobuf.FieldMask update_mask = 2; diff --git a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 058e0ee1776e..e70440314aee 100644 --- a/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/google-api-grpc/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,10 +31,86 @@ option java_package = "com.google.pubsub.v1"; option php_namespace = "Google\\Cloud\\PubSub\\V1"; +// The service that an application uses to manipulate topics, and to send +// messages to a topic. +service Publisher { + // Creates the given topic with the given name. See the + // resource name rules. + rpc CreateTopic(Topic) returns (Topic) { + option (google.api.http) = { + put: "/v1/{name=projects/*/topics/*}" + body: "*" + }; + } + + // Updates an existing topic. Note that certain properties of a + // topic are not modifiable. + rpc UpdateTopic(UpdateTopicRequest) returns (Topic) { + option (google.api.http) = { + patch: "/v1/{topic.name=projects/*/topics/*}" + body: "*" + }; + } + + // Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + // does not exist. The message payload must not be empty; it must contain + // either a non-empty data field, or at least one attribute. + rpc Publish(PublishRequest) returns (PublishResponse) { + option (google.api.http) = { + post: "/v1/{topic=projects/*/topics/*}:publish" + body: "*" + }; + } + + // Gets the configuration of a topic. + rpc GetTopic(GetTopicRequest) returns (Topic) { + option (google.api.http) = { + get: "/v1/{topic=projects/*/topics/*}" + }; + } + + // Lists matching topics. + rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse) { + option (google.api.http) = { + get: "/v1/{project=projects/*}/topics" + }; + } + + // Lists the names of the subscriptions on this topic. + rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { + option (google.api.http) = { + get: "/v1/{topic=projects/*/topics/*}/subscriptions" + }; + } + + // Lists the names of the snapshots on this topic.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. + rpc ListTopicSnapshots(ListTopicSnapshotsRequest) returns (ListTopicSnapshotsResponse) { + option (google.api.http) = { + get: "/v1/{topic=projects/*/topics/*}/snapshots" + }; + } + + // 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_`. + rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{topic=projects/*/topics/*}" + }; + } +} + // The service that an application uses to manipulate subscriptions and to -// consume messages from a subscription via the `Pull` method. +// consume messages from a subscription via the `Pull` method or by +// establishing a bi-directional stream using the `StreamingPull` method. service Subscriber { - // Creates a subscription to a given topic. + // Creates a subscription to a given topic. See the + // resource name rules. // If the subscription already exists, returns `ALREADY_EXISTS`. // If the corresponding topic doesn't exist, returns `NOT_FOUND`. // @@ -47,7 +123,8 @@ service Subscriber { rpc CreateSubscription(Subscription) returns (Subscription) { option (google.api.http) = { put: "/v1/{name=projects/*/subscriptions/*}" - body: "*" }; + body: "*" + }; } // Gets the configuration details of a subscription. @@ -59,10 +136,6 @@ service Subscriber { // Updates an existing subscription. Note that certain properties of a // subscription, such as its topic, are not modifiable. - // NOTE: The style guide requires body: "subscription" instead of body: "*". - // Keeping the latter for internal consistency in V1, however it should be - // corrected in V2. See - // https://cloud.google.com/apis/design/standard_methods#update for details. rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription) { option (google.api.http) = { patch: "/v1/{subscription.name=projects/*/subscriptions/*}" @@ -125,18 +198,13 @@ service Subscriber { }; } - // (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will - // respond with UNIMPLEMENTED errors unless you have been invited to test - // this feature. Contact cloud-pubsub@google.com with any questions. - // // Establishes a stream with the server, which sends messages down to the // client. The client streams acknowledgements and ack deadline modifications // back to the server. The server will close the stream and return the status - // on any error. The server may close the stream with status `OK` to reassign - // server-side resources, in which case, the client should re-establish the - // stream. `UNAVAILABLE` may also be returned in the case of a transient error - // (e.g., a server restart). These should also be retried by the client. Flow - // control can be achieved by configuring the underlying RPC channel. + // on any error. The server may close the stream with status `UNAVAILABLE` to + // reassign server-side resources, in which case, the client should + // re-establish the stream. Flow control can be achieved by configuring the + // underlying RPC channel. rpc StreamingPull(stream StreamingPullRequest) returns (stream StreamingPullResponse); // Modifies the `PushConfig` for a specified subscription. @@ -148,26 +216,45 @@ service Subscriber { rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" - body: "*" }; + body: "*" + }; } - // Lists the existing snapshots. + // Gets the configuration details of a snapshot.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v1/{snapshot=projects/*/snapshots/*}" + }; + } + + // Lists the existing snapshots.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { option (google.api.http) = { get: "/v1/{project=projects/*}/snapshots" }; } - // Creates a snapshot from the requested subscription. + // Creates a snapshot from the requested subscription.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. // If the snapshot already exists, returns `ALREADY_EXISTS`. // If the requested subscription doesn't exist, returns `NOT_FOUND`. - // - // If the name is not provided in the request, the server will assign a random + // 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/overview#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. + // to the [resource name format](https://cloud.google.com/pubsub/docs/overview#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. rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) { option (google.api.http) = { put: "/v1/{name=projects/*/snapshots/*}" @@ -175,19 +262,23 @@ service Subscriber { }; } - // Updates an existing snapshot. Note that certain properties of a snapshot - // are not modifiable. - // NOTE: The style guide requires body: "snapshot" instead of body: "*". - // Keeping the latter for internal consistency in V1, however it should be - // corrected in V2. See - // https://cloud.google.com/apis/design/standard_methods#update for details. + // Updates an existing snapshot.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. + // Note that certain properties of a snapshot are not modifiable. rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) { option (google.api.http) = { patch: "/v1/{snapshot.name=projects/*/snapshots/*}" - body: "*" }; + body: "*" + }; } - // Removes an existing snapshot. All messages retained in the snapshot + // Removes an existing snapshot.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. + // 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. @@ -198,7 +289,10 @@ service Subscriber { } // Seeks an existing subscription to a point in time or to a given snapshot, - // whichever is provided in the request. + // whichever is provided in the request.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. rpc Seek(SeekRequest) returns (SeekResponse) { option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:seek" @@ -207,70 +301,14 @@ service Subscriber { } } -// The service that an application uses to manipulate topics, and to send -// messages to a topic. -service Publisher { - // Creates the given topic with the given name. - rpc CreateTopic(Topic) returns (Topic) { - option (google.api.http) = { - put: "/v1/{name=projects/*/topics/*}" - body: "*" - }; - } - - // Updates an existing topic. Note that certain properties of a topic are not - // modifiable. Options settings follow the style guide: - // NOTE: The style guide requires body: "topic" instead of body: "*". - // Keeping the latter for internal consistency in V1, however it should be - // corrected in V2. See - // https://cloud.google.com/apis/design/standard_methods#update for details. - rpc UpdateTopic(UpdateTopicRequest) returns (Topic) { - option (google.api.http) = { - patch: "/v1/{topic.name=projects/*/topics/*}" - body: "*" }; - } - - // Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - // does not exist. The message payload must not be empty; it must contain - // either a non-empty data field, or at least one attribute. - rpc Publish(PublishRequest) returns (PublishResponse) { - option (google.api.http) = { - post: "/v1/{topic=projects/*/topics/*}:publish" - body: "*" - }; - } - - // Gets the configuration of a topic. - rpc GetTopic(GetTopicRequest) returns (Topic) { - option (google.api.http) = { - get: "/v1/{topic=projects/*/topics/*}" - }; - } - - // Lists matching topics. - rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse) { - option (google.api.http) = { - get: "/v1/{project=projects/*}/topics" - }; - } - - // Lists the name of the subscriptions for this topic. - rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { - option (google.api.http) = { - get: "/v1/{topic=projects/*/topics/*}/subscriptions" - }; - } - - // 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_`. - rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{topic=projects/*/topics/*}" - }; - } +message MessageStoragePolicy { + // The list of GCP regions where messages that are published to the topic may + // be persisted in storage. Messages published by publishers running in + // non-allowed GCP regions (or running outside of GCP altogether) will be + // routed for storage in one of the allowed regions. An empty list indicates a + // misconfiguration at the project or organization level, which will result in + // all Publish operations failing. + repeated string allowed_persistence_regions = 1; } // A topic resource. @@ -285,6 +323,14 @@ message Topic { // User labels. map labels = 2; + + // Policy constraining how messages published to the topic may be stored. It + // is determined when the topic is created based on the policy configured at + // the project level. It must not be set by the caller in the request to + // CreateTopic or to UpdateTopic. This field will be populated in the + // responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the + // response, then no constraints are in effect. + MessageStoragePolicy message_storage_policy = 3; } // A message data and its attributes. The message payload must not be empty; @@ -317,11 +363,14 @@ message GetTopicRequest { // Request for the UpdateTopic method. message UpdateTopicRequest { - // The topic to update. + // The updated topic object. Topic topic = 1; - // Indicates which fields in the provided topic to update. - // Must be specified and non-empty. + // Indicates which fields in the provided topic to update. Must be specified + // and non-empty. Note that if `update_mask` contains + // "message_storage_policy" then the new value will be determined based on the + // policy configured at the project or organization level. The + // `message_storage_policy` must not be set in the `topic` provided above. google.protobuf.FieldMask update_mask = 2; } @@ -394,6 +443,38 @@ message ListTopicSubscriptionsResponse { string next_page_token = 2; } +// Request for the `ListTopicSnapshots` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. +message ListTopicSnapshotsRequest { + // The name of the topic that snapshots are attached to. + // Format is `projects/{project}/topics/{topic}`. + string topic = 1; + + // Maximum number of snapshot names to return. + int32 page_size = 2; + + // The value returned by the last `ListTopicSnapshotsResponse`; indicates + // that this is a continuation of a prior `ListTopicSnapshots` call, and + // that the system should return the next page of data. + string page_token = 3; +} + +// Response for the `ListTopicSnapshots` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. +message ListTopicSnapshotsResponse { + // The names of the snapshots that match the request. + repeated string snapshots = 1; + + // If not empty, indicates that there may be more snapshots that match + // the request; this value should be passed in a new + // `ListTopicSnapshotsRequest` to get more snapshots. + string next_page_token = 2; +} + // Request for the `DeleteTopic` method. message DeleteTopicRequest { // Name of the topic to delete. @@ -431,7 +512,8 @@ message Subscription { // 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 - // pull. + // 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. @@ -446,7 +528,10 @@ message Subscription { // Indicates whether to retain acknowledged messages. If true, then // messages are not expunged from the subscription's backlog, even if they are // acknowledged, until they fall out of the `message_retention_duration` - // window. + // window.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. bool retain_acked_messages = 7; // How long to retain unacknowledged messages in the subscription's backlog, @@ -454,7 +539,10 @@ message Subscription { // If `retain_acked_messages` is true, then this also configures the retention // of acknowledged messages, and thus configures how far back in time a `Seek` // can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 - // minutes. + // minutes.

+ // ALPHA: This feature is part of an alpha release. This API might be + // changed in backward-incompatible ways and is not recommended for production + // use. It is not subject to any SLA or deprecation policy. google.protobuf.Duration message_retention_duration = 8; // User labels. @@ -561,7 +649,7 @@ message ModifyPushConfigRequest { // 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` is not called. + // the subscription if `Pull` or `StreamingPull` is not called. PushConfig push_config = 2; } @@ -674,7 +762,10 @@ message StreamingPullResponse { repeated ReceivedMessage received_messages = 1; } -// Request for the `CreateSnapshot` method. +// Request for the `CreateSnapshot` method.

+// ALPHA: This feature is part of an alpha release. This API might be changed in +// backward-incompatible ways and is not recommended for production use. +// It is not subject to any SLA or deprecation policy. message CreateSnapshotRequest { // Optional user-provided name for this snapshot. // If the name is not provided in the request, the server will assign a random @@ -693,11 +784,17 @@ message CreateSnapshotRequest { // successful completion of the CreateSnapshot request. // Format is `projects/{project}/subscriptions/{sub}`. string subscription = 2; + + // User labels. + map labels = 3; } -// Request for the UpdateSnapshot method. +// Request for the UpdateSnapshot method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message UpdateSnapshotRequest { - // The updated snpashot object. + // The updated snapshot object. Snapshot snapshot = 1; // Indicates which fields in the provided snapshot to update. @@ -705,7 +802,10 @@ message UpdateSnapshotRequest { google.protobuf.FieldMask update_mask = 2; } -// A snapshot resource. +// A snapshot resource.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message Snapshot { // The name of the snapshot. string name = 1; @@ -721,14 +821,28 @@ message Snapshot { // For example, consider a subscription whose oldest unacked message is 3 days // old. If a snapshot is created from this subscription, the snapshot -- which // will always capture this 3-day-old backlog as long as the snapshot - // exists -- will expire in 4 days. + // exists -- will expire in 4 days. The service will refuse to create a + // snapshot that would expire in less than 1 hour after creation. google.protobuf.Timestamp expire_time = 3; // User labels. map labels = 4; } -// Request for the `ListSnapshots` method. +// Request for the GetSnapshot method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. +message GetSnapshotRequest { + // The name of the snapshot to get. + // Format is `projects/{project}/snapshots/{snap}`. + string snapshot = 1; +} + +// Request for the `ListSnapshots` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message ListSnapshotsRequest { // The name of the cloud project that snapshots belong to. // Format is `projects/{project}`. @@ -743,7 +857,10 @@ message ListSnapshotsRequest { string page_token = 3; } -// Response for the `ListSnapshots` method. +// Response for the `ListSnapshots` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message ListSnapshotsResponse { // The resulting snapshots. repeated Snapshot snapshots = 1; @@ -753,14 +870,20 @@ message ListSnapshotsResponse { string next_page_token = 2; } -// Request for the `DeleteSnapshot` method. +// Request for the `DeleteSnapshot` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message DeleteSnapshotRequest { // The name of the snapshot to delete. // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 1; } -// Request for the `Seek` method. +// Request for the `Seek` method.

+// ALPHA: This feature is part of an alpha release. This API might be +// changed in backward-incompatible ways and is not recommended for production +// use. It is not subject to any SLA or deprecation policy. message SeekRequest { // The subscription to affect. string subscription = 1; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBox.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBox.java deleted file mode 100644 index 4415dc2c1da2..000000000000 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBox.java +++ /dev/null @@ -1,709 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto - -package com.google.cloud.videointelligence.v1p1beta1; - -/** - *
- * Normalized bounding box.
- * The normalized vertex coordinates are relative to the original image.
- * Range: [0, 1].
- * 
- * - * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox} - */ -public final class NormalizedBoundingBox extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) - NormalizedBoundingBoxOrBuilder { -private static final long serialVersionUID = 0L; - // Use NormalizedBoundingBox.newBuilder() to construct. - private NormalizedBoundingBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NormalizedBoundingBox() { - left_ = 0F; - top_ = 0F; - right_ = 0F; - bottom_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedBoundingBox( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 13: { - - left_ = input.readFloat(); - break; - } - case 21: { - - top_ = input.readFloat(); - break; - } - case 29: { - - right_ = input.readFloat(); - break; - } - case 37: { - - bottom_ = input.readFloat(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto.internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto.internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.class, com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.Builder.class); - } - - public static final int LEFT_FIELD_NUMBER = 1; - private float left_; - /** - *
-   * Left X coordinate.
-   * 
- * - * float left = 1; - */ - public float getLeft() { - return left_; - } - - public static final int TOP_FIELD_NUMBER = 2; - private float top_; - /** - *
-   * Top Y coordinate.
-   * 
- * - * float top = 2; - */ - public float getTop() { - return top_; - } - - public static final int RIGHT_FIELD_NUMBER = 3; - private float right_; - /** - *
-   * Right X coordinate.
-   * 
- * - * float right = 3; - */ - public float getRight() { - return right_; - } - - public static final int BOTTOM_FIELD_NUMBER = 4; - private float bottom_; - /** - *
-   * Bottom Y coordinate.
-   * 
- * - * float bottom = 4; - */ - public float getBottom() { - return bottom_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (left_ != 0F) { - output.writeFloat(1, left_); - } - if (top_ != 0F) { - output.writeFloat(2, top_); - } - if (right_ != 0F) { - output.writeFloat(3, right_); - } - if (bottom_ != 0F) { - output.writeFloat(4, bottom_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (left_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, left_); - } - if (top_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, top_); - } - if (right_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, right_); - } - if (bottom_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, bottom_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox)) { - return super.equals(obj); - } - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox other = (com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) obj; - - boolean result = true; - result = result && ( - java.lang.Float.floatToIntBits(getLeft()) - == java.lang.Float.floatToIntBits( - other.getLeft())); - result = result && ( - java.lang.Float.floatToIntBits(getTop()) - == java.lang.Float.floatToIntBits( - other.getTop())); - result = result && ( - java.lang.Float.floatToIntBits(getRight()) - == java.lang.Float.floatToIntBits( - other.getRight())); - result = result && ( - java.lang.Float.floatToIntBits(getBottom()) - == java.lang.Float.floatToIntBits( - other.getBottom())); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LEFT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLeft()); - hash = (37 * hash) + TOP_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTop()); - hash = (37 * hash) + RIGHT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRight()); - hash = (37 * hash) + BOTTOM_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBottom()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Normalized bounding box.
-   * The normalized vertex coordinates are relative to the original image.
-   * Range: [0, 1].
-   * 
- * - * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto.internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto.internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.class, com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.Builder.class); - } - - // Construct using com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - left_ = 0F; - - top_ = 0F; - - right_ = 0F; - - bottom_ = 0F; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto.internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor; - } - - public com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox getDefaultInstanceForType() { - return com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.getDefaultInstance(); - } - - public com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox build() { - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox buildPartial() { - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox result = new com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox(this); - result.left_ = left_; - result.top_ = top_; - result.right_ = right_; - result.bottom_ = bottom_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) { - return mergeFrom((com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox other) { - if (other == com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox.getDefaultInstance()) return this; - if (other.getLeft() != 0F) { - setLeft(other.getLeft()); - } - if (other.getTop() != 0F) { - setTop(other.getTop()); - } - if (other.getRight() != 0F) { - setRight(other.getRight()); - } - if (other.getBottom() != 0F) { - setBottom(other.getBottom()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float left_ ; - /** - *
-     * Left X coordinate.
-     * 
- * - * float left = 1; - */ - public float getLeft() { - return left_; - } - /** - *
-     * Left X coordinate.
-     * 
- * - * float left = 1; - */ - public Builder setLeft(float value) { - - left_ = value; - onChanged(); - return this; - } - /** - *
-     * Left X coordinate.
-     * 
- * - * float left = 1; - */ - public Builder clearLeft() { - - left_ = 0F; - onChanged(); - return this; - } - - private float top_ ; - /** - *
-     * Top Y coordinate.
-     * 
- * - * float top = 2; - */ - public float getTop() { - return top_; - } - /** - *
-     * Top Y coordinate.
-     * 
- * - * float top = 2; - */ - public Builder setTop(float value) { - - top_ = value; - onChanged(); - return this; - } - /** - *
-     * Top Y coordinate.
-     * 
- * - * float top = 2; - */ - public Builder clearTop() { - - top_ = 0F; - onChanged(); - return this; - } - - private float right_ ; - /** - *
-     * Right X coordinate.
-     * 
- * - * float right = 3; - */ - public float getRight() { - return right_; - } - /** - *
-     * Right X coordinate.
-     * 
- * - * float right = 3; - */ - public Builder setRight(float value) { - - right_ = value; - onChanged(); - return this; - } - /** - *
-     * Right X coordinate.
-     * 
- * - * float right = 3; - */ - public Builder clearRight() { - - right_ = 0F; - onChanged(); - return this; - } - - private float bottom_ ; - /** - *
-     * Bottom Y coordinate.
-     * 
- * - * float bottom = 4; - */ - public float getBottom() { - return bottom_; - } - /** - *
-     * Bottom Y coordinate.
-     * 
- * - * float bottom = 4; - */ - public Builder setBottom(float value) { - - bottom_ = value; - onChanged(); - return this; - } - /** - *
-     * Bottom Y coordinate.
-     * 
- * - * float bottom = 4; - */ - public Builder clearBottom() { - - bottom_ = 0F; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) - } - - // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) - private static final com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox(); - } - - public static com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NormalizedBoundingBox parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedBoundingBox(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBoxOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBoxOrBuilder.java deleted file mode 100644 index f0d9dea8a761..000000000000 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/NormalizedBoundingBoxOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto - -package com.google.cloud.videointelligence.v1p1beta1; - -public interface NormalizedBoundingBoxOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p1beta1.NormalizedBoundingBox) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Left X coordinate.
-   * 
- * - * float left = 1; - */ - float getLeft(); - - /** - *
-   * Top Y coordinate.
-   * 
- * - * float top = 2; - */ - float getTop(); - - /** - *
-   * Right X coordinate.
-   * 
- * - * float right = 3; - */ - float getRight(); - - /** - *
-   * Bottom Y coordinate.
-   * 
- * - * float bottom = 4; - */ - float getBottom(); -} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfig.java index f913dc6c3f80..85864c7ff854 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfig.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfig.java @@ -24,6 +24,7 @@ private SpeechTranscriptionConfig() { maxAlternatives_ = 0; filterProfanity_ = false; speechContexts_ = java.util.Collections.emptyList(); + enableAutomaticPunctuation_ = false; audioTracks_ = java.util.Collections.emptyList(); } @@ -83,10 +84,15 @@ private SpeechTranscriptionConfig( input.readMessage(com.google.cloud.videointelligence.v1p1beta1.SpeechContext.parser(), extensionRegistry)); break; } + case 40: { + + enableAutomaticPunctuation_ = input.readBool(); + break; + } case 48: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { audioTracks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; + mutable_bitField0_ |= 0x00000020; } audioTracks_.add(input.readInt32()); break; @@ -94,9 +100,9 @@ private SpeechTranscriptionConfig( case 50: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { audioTracks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; + mutable_bitField0_ |= 0x00000020; } while (input.getBytesUntilLimit() > 0) { audioTracks_.add(input.readInt32()); @@ -115,7 +121,7 @@ private SpeechTranscriptionConfig( if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { speechContexts_ = java.util.Collections.unmodifiableList(speechContexts_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { audioTracks_ = java.util.Collections.unmodifiableList(audioTracks_); } this.unknownFields = unknownFields.build(); @@ -273,6 +279,24 @@ public com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder getSp return speechContexts_.get(index); } + public static final int ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER = 5; + private boolean enableAutomaticPunctuation_; + /** + *
+   * *Optional* If 'true', adds punctuation to recognition result hypotheses.
+   * This feature is only available in select languages. Setting this for
+   * requests in other languages has no effect at all. The default 'false' value
+   * does not add punctuation to result hypotheses. NOTE: "This is currently
+   * offered as an experimental service, complimentary to all users. In the
+   * future this may be exclusively available as a premium feature."
+   * 
+ * + * bool enable_automatic_punctuation = 5; + */ + public boolean getEnableAutomaticPunctuation() { + return enableAutomaticPunctuation_; + } + public static final int AUDIO_TRACKS_FIELD_NUMBER = 6; private java.util.List audioTracks_; /** @@ -336,6 +360,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < speechContexts_.size(); i++) { output.writeMessage(4, speechContexts_.get(i)); } + if (enableAutomaticPunctuation_ != false) { + output.writeBool(5, enableAutomaticPunctuation_); + } if (getAudioTracksList().size() > 0) { output.writeUInt32NoTag(50); output.writeUInt32NoTag(audioTracksMemoizedSerializedSize); @@ -366,6 +393,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, speechContexts_.get(i)); } + if (enableAutomaticPunctuation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, enableAutomaticPunctuation_); + } { int dataSize = 0; for (int i = 0; i < audioTracks_.size(); i++) { @@ -404,6 +435,8 @@ public boolean equals(final java.lang.Object obj) { == other.getFilterProfanity()); result = result && getSpeechContextsList() .equals(other.getSpeechContextsList()); + result = result && (getEnableAutomaticPunctuation() + == other.getEnableAutomaticPunctuation()); result = result && getAudioTracksList() .equals(other.getAudioTracksList()); result = result && unknownFields.equals(other.unknownFields); @@ -428,6 +461,9 @@ public int hashCode() { hash = (37 * hash) + SPEECH_CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getSpeechContextsList().hashCode(); } + hash = (37 * hash) + ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableAutomaticPunctuation()); if (getAudioTracksCount() > 0) { hash = (37 * hash) + AUDIO_TRACKS_FIELD_NUMBER; hash = (53 * hash) + getAudioTracksList().hashCode(); @@ -578,8 +614,10 @@ public Builder clear() { } else { speechContextsBuilder_.clear(); } + enableAutomaticPunctuation_ = false; + audioTracks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -616,9 +654,10 @@ public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig bu } else { result.speechContexts_ = speechContextsBuilder_.build(); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + result.enableAutomaticPunctuation_ = enableAutomaticPunctuation_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { audioTracks_ = java.util.Collections.unmodifiableList(audioTracks_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } result.audioTracks_ = audioTracks_; result.bitField0_ = to_bitField0_; @@ -699,10 +738,13 @@ public Builder mergeFrom(com.google.cloud.videointelligence.v1p1beta1.SpeechTran } } } + if (other.getEnableAutomaticPunctuation() != false) { + setEnableAutomaticPunctuation(other.getEnableAutomaticPunctuation()); + } if (!other.audioTracks_.isEmpty()) { if (audioTracks_.isEmpty()) { audioTracks_ = other.audioTracks_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureAudioTracksIsMutable(); audioTracks_.addAll(other.audioTracks_); @@ -1255,11 +1297,64 @@ public com.google.cloud.videointelligence.v1p1beta1.SpeechContext.Builder addSpe return speechContextsBuilder_; } + private boolean enableAutomaticPunctuation_ ; + /** + *
+     * *Optional* If 'true', adds punctuation to recognition result hypotheses.
+     * This feature is only available in select languages. Setting this for
+     * requests in other languages has no effect at all. The default 'false' value
+     * does not add punctuation to result hypotheses. NOTE: "This is currently
+     * offered as an experimental service, complimentary to all users. In the
+     * future this may be exclusively available as a premium feature."
+     * 
+ * + * bool enable_automatic_punctuation = 5; + */ + public boolean getEnableAutomaticPunctuation() { + return enableAutomaticPunctuation_; + } + /** + *
+     * *Optional* If 'true', adds punctuation to recognition result hypotheses.
+     * This feature is only available in select languages. Setting this for
+     * requests in other languages has no effect at all. The default 'false' value
+     * does not add punctuation to result hypotheses. NOTE: "This is currently
+     * offered as an experimental service, complimentary to all users. In the
+     * future this may be exclusively available as a premium feature."
+     * 
+ * + * bool enable_automatic_punctuation = 5; + */ + public Builder setEnableAutomaticPunctuation(boolean value) { + + enableAutomaticPunctuation_ = value; + onChanged(); + return this; + } + /** + *
+     * *Optional* If 'true', adds punctuation to recognition result hypotheses.
+     * This feature is only available in select languages. Setting this for
+     * requests in other languages has no effect at all. The default 'false' value
+     * does not add punctuation to result hypotheses. NOTE: "This is currently
+     * offered as an experimental service, complimentary to all users. In the
+     * future this may be exclusively available as a premium feature."
+     * 
+ * + * bool enable_automatic_punctuation = 5; + */ + public Builder clearEnableAutomaticPunctuation() { + + enableAutomaticPunctuation_ = false; + onChanged(); + return this; + } + private java.util.List audioTracks_ = java.util.Collections.emptyList(); private void ensureAudioTracksIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { audioTracks_ = new java.util.ArrayList(audioTracks_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } } /** @@ -1351,7 +1446,7 @@ public Builder addAllAudioTracks( */ public Builder clearAudioTracks() { audioTracks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfigOrBuilder.java index 00aad1f9b826..a5caeb14da3b 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfigOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/SpeechTranscriptionConfigOrBuilder.java @@ -102,6 +102,20 @@ public interface SpeechTranscriptionConfigOrBuilder extends com.google.cloud.videointelligence.v1p1beta1.SpeechContextOrBuilder getSpeechContextsOrBuilder( int index); + /** + *
+   * *Optional* If 'true', adds punctuation to recognition result hypotheses.
+   * This feature is only available in select languages. Setting this for
+   * requests in other languages has no effect at all. The default 'false' value
+   * does not add punctuation to result hypotheses. NOTE: "This is currently
+   * offered as an experimental service, complimentary to all users. In the
+   * future this may be exclusively available as a premium feature."
+   * 
+ * + * bool enable_automatic_punctuation = 5; + */ + boolean getEnableAutomaticPunctuation(); + /** *
    * *Optional* For file formats, such as MXF or MKV, supporting multiple audio
diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgress.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgress.java
index 63d02624507a..f2504e556288 100644
--- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgress.java
+++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgress.java
@@ -120,7 +120,7 @@ private VideoAnnotationProgress(
   private volatile java.lang.Object inputUri_;
   /**
    * 
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -140,7 +140,7 @@ public java.lang.String getInputUri() { } /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -164,8 +164,8 @@ public java.lang.String getInputUri() { private int progressPercent_; /** *
-   * Approximate percentage processed thus far.
-   * Guaranteed to be 100 when fully processed.
+   * Output only. Approximate percentage processed thus far. Guaranteed to be
+   * 100 when fully processed.
    * 
* * int32 progress_percent = 2; @@ -178,7 +178,7 @@ public int getProgressPercent() { private com.google.protobuf.Timestamp startTime_; /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -188,7 +188,7 @@ public boolean hasStartTime() { } /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -198,7 +198,7 @@ public com.google.protobuf.Timestamp getStartTime() { } /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -211,7 +211,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { private com.google.protobuf.Timestamp updateTime_; /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; @@ -221,7 +221,7 @@ public boolean hasUpdateTime() { } /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; @@ -231,7 +231,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { } /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; @@ -607,7 +607,7 @@ public Builder mergeFrom( private java.lang.Object inputUri_ = ""; /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -627,7 +627,7 @@ public java.lang.String getInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -648,7 +648,7 @@ public java.lang.String getInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -666,7 +666,7 @@ public Builder setInputUri( } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -680,7 +680,7 @@ public Builder clearInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -701,8 +701,8 @@ public Builder setInputUriBytes( private int progressPercent_ ; /** *
-     * Approximate percentage processed thus far.
-     * Guaranteed to be 100 when fully processed.
+     * Output only. Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
      * 
* * int32 progress_percent = 2; @@ -712,8 +712,8 @@ public int getProgressPercent() { } /** *
-     * Approximate percentage processed thus far.
-     * Guaranteed to be 100 when fully processed.
+     * Output only. Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
      * 
* * int32 progress_percent = 2; @@ -726,8 +726,8 @@ public Builder setProgressPercent(int value) { } /** *
-     * Approximate percentage processed thus far.
-     * Guaranteed to be 100 when fully processed.
+     * Output only. Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
      * 
* * int32 progress_percent = 2; @@ -744,7 +744,7 @@ public Builder clearProgressPercent() { com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -754,7 +754,7 @@ public boolean hasStartTime() { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -768,7 +768,7 @@ public com.google.protobuf.Timestamp getStartTime() { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -788,7 +788,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -806,7 +806,7 @@ public Builder setStartTime( } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -828,7 +828,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -846,7 +846,7 @@ public Builder clearStartTime() { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -858,7 +858,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -873,7 +873,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } /** *
-     * Time when the request was received.
+     * Output only. Time when the request was received.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -897,7 +897,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -907,7 +907,7 @@ public boolean hasUpdateTime() { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -921,7 +921,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -941,7 +941,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -959,7 +959,7 @@ public Builder setUpdateTime( } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -981,7 +981,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -999,7 +999,7 @@ public Builder clearUpdateTime() { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -1011,7 +1011,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; @@ -1026,7 +1026,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { } /** *
-     * Time of the most recent update.
+     * Output only. Time of the most recent update.
      * 
* * .google.protobuf.Timestamp update_time = 4; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgressOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgressOrBuilder.java index 8dc7b90d4c27..391c2c8b9833 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgressOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationProgressOrBuilder.java @@ -9,7 +9,7 @@ public interface VideoAnnotationProgressOrBuilder extends /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -18,7 +18,7 @@ public interface VideoAnnotationProgressOrBuilder extends java.lang.String getInputUri(); /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -29,8 +29,8 @@ public interface VideoAnnotationProgressOrBuilder extends /** *
-   * Approximate percentage processed thus far.
-   * Guaranteed to be 100 when fully processed.
+   * Output only. Approximate percentage processed thus far. Guaranteed to be
+   * 100 when fully processed.
    * 
* * int32 progress_percent = 2; @@ -39,7 +39,7 @@ public interface VideoAnnotationProgressOrBuilder extends /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -47,7 +47,7 @@ public interface VideoAnnotationProgressOrBuilder extends boolean hasStartTime(); /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -55,7 +55,7 @@ public interface VideoAnnotationProgressOrBuilder extends com.google.protobuf.Timestamp getStartTime(); /** *
-   * Time when the request was received.
+   * Output only. Time when the request was received.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -64,7 +64,7 @@ public interface VideoAnnotationProgressOrBuilder extends /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; @@ -72,7 +72,7 @@ public interface VideoAnnotationProgressOrBuilder extends boolean hasUpdateTime(); /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; @@ -80,7 +80,7 @@ public interface VideoAnnotationProgressOrBuilder extends com.google.protobuf.Timestamp getUpdateTime(); /** *
-   * Time of the most recent update.
+   * Output only. Time of the most recent update.
    * 
* * .google.protobuf.Timestamp update_time = 4; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResults.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResults.java index eeb462d5d555..08c93764c75c 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResults.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResults.java @@ -180,7 +180,7 @@ private VideoAnnotationResults( private volatile java.lang.Object inputUri_; /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -200,7 +200,7 @@ public java.lang.String getInputUri() { } /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -547,8 +547,8 @@ public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionOrBuilder private com.google.rpc.Status error_; /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; @@ -558,8 +558,8 @@ public boolean hasError() { } /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; @@ -569,8 +569,8 @@ public com.google.rpc.Status getError() { } /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; @@ -1208,7 +1208,7 @@ public Builder mergeFrom( private java.lang.Object inputUri_ = ""; /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -1228,7 +1228,7 @@ public java.lang.String getInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -1249,7 +1249,7 @@ public java.lang.String getInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -1267,7 +1267,7 @@ public Builder setInputUri( } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -1281,7 +1281,7 @@ public Builder clearInputUri() { } /** *
-     * Video file location in
+     * Output only. Video file location in
      * [Google Cloud Storage](https://cloud.google.com/storage/).
      * 
* @@ -3071,8 +3071,8 @@ public com.google.cloud.videointelligence.v1p1beta1.SpeechTranscription.Builder com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3082,8 +3082,8 @@ public boolean hasError() { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3097,8 +3097,8 @@ public com.google.rpc.Status getError() { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3118,8 +3118,8 @@ public Builder setError(com.google.rpc.Status value) { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3137,8 +3137,8 @@ public Builder setError( } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3160,8 +3160,8 @@ public Builder mergeError(com.google.rpc.Status value) { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3179,8 +3179,8 @@ public Builder clearError() { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3192,8 +3192,8 @@ public com.google.rpc.Status.Builder getErrorBuilder() { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; @@ -3208,8 +3208,8 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { } /** *
-     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-     * some videos may succeed and some may fail.
+     * Output only. If set, indicates an error. Note that for a single
+     * `AnnotateVideoRequest` some videos may succeed and some may fail.
      * 
* * .google.rpc.Status error = 9; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResultsOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResultsOrBuilder.java index 92b04428a993..073b7db7137d 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResultsOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoAnnotationResultsOrBuilder.java @@ -9,7 +9,7 @@ public interface VideoAnnotationResultsOrBuilder extends /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -18,7 +18,7 @@ public interface VideoAnnotationResultsOrBuilder extends java.lang.String getInputUri(); /** *
-   * Video file location in
+   * Output only. Video file location in
    * [Google Cloud Storage](https://cloud.google.com/storage/).
    * 
* @@ -289,8 +289,8 @@ com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionOrBuilder getSpe /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; @@ -298,8 +298,8 @@ com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionOrBuilder getSpe boolean hasError(); /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; @@ -307,8 +307,8 @@ com.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionOrBuilder getSpe com.google.rpc.Status getError(); /** *
-   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
-   * some videos may succeed and some may fail.
+   * Output only. If set, indicates an error. Note that for a single
+   * `AnnotateVideoRequest` some videos may succeed and some may fail.
    * 
* * .google.rpc.Status error = 9; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContext.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContext.java index 1bb84009830b..aefe41a4c0aa 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContext.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContext.java @@ -148,8 +148,8 @@ private VideoContext( /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -160,8 +160,8 @@ public java.util.List /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -173,8 +173,8 @@ public java.util.List /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -185,8 +185,8 @@ public int getSegmentsCount() { /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -197,8 +197,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegment getSegments(int /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -804,8 +804,8 @@ private void ensureSegmentsIsMutable() { /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -820,8 +820,8 @@ public java.util.List /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -836,8 +836,8 @@ public int getSegmentsCount() { /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -852,8 +852,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegment getSegments(int /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -875,8 +875,8 @@ public Builder setSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -895,8 +895,8 @@ public Builder setSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -917,8 +917,8 @@ public Builder addSegments(com.google.cloud.videointelligence.v1p1beta1.VideoSeg /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -940,8 +940,8 @@ public Builder addSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -960,8 +960,8 @@ public Builder addSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -980,8 +980,8 @@ public Builder addSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1001,8 +1001,8 @@ public Builder addAllSegments( /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1020,8 +1020,8 @@ public Builder clearSegments() { /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1039,8 +1039,8 @@ public Builder removeSegments(int index) { /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1052,8 +1052,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegment.Builder getSegm /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1068,8 +1068,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegmentOrBuilder getSeg /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1085,8 +1085,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegmentOrBuilder getSeg /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1098,8 +1098,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegment.Builder addSegm /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -1112,8 +1112,8 @@ public com.google.cloud.videointelligence.v1p1beta1.VideoSegment.Builder addSegm /** *
      * Video segments to annotate. The segments may overlap and are not required
-     * to be contiguous or span the whole video. If unspecified, each video
-     * is treated as a single segment.
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
      * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContextOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContextOrBuilder.java index 363f7996ec7c..722c84eb55bb 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContextOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoContextOrBuilder.java @@ -10,8 +10,8 @@ public interface VideoContextOrBuilder extends /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -21,8 +21,8 @@ public interface VideoContextOrBuilder extends /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -31,8 +31,8 @@ public interface VideoContextOrBuilder extends /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -41,8 +41,8 @@ public interface VideoContextOrBuilder extends /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; @@ -52,8 +52,8 @@ public interface VideoContextOrBuilder extends /** *
    * Video segments to annotate. The segments may overlap and are not required
-   * to be contiguous or span the whole video. If unspecified, each video
-   * is treated as a single segment.
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
    * 
* * repeated .google.cloud.videointelligence.v1p1beta1.VideoSegment segments = 1; diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceProto.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceProto.java index 8c4089d2e24f..d1ac0ee061b2 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceProto.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/java/com/google/cloud/videointelligence/v1p1beta1/VideoIntelligenceServiceProto.java @@ -74,11 +74,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_videointelligence_v1p1beta1_ExplicitContentAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationResults_descriptor; static final @@ -189,71 +184,70 @@ public static void registerAllExtensions( "ce.v1p1beta1.Likelihood\"k\n\031ExplicitConte" + "ntAnnotation\022N\n\006frames\030\001 \003(\0132>.google.cl" + "oud.videointelligence.v1p1beta1.Explicit" + - "ContentFrame\"Q\n\025NormalizedBoundingBox\022\014\n" + - "\004left\030\001 \001(\002\022\013\n\003top\030\002 \001(\002\022\r\n\005right\030\003 \001(\002\022" + - "\016\n\006bottom\030\004 \001(\002\"\365\004\n\026VideoAnnotationResul" + - "ts\022\021\n\tinput_uri\030\001 \001(\t\022\\\n\031segment_label_a" + - "nnotations\030\002 \003(\01329.google.cloud.videoint" + - "elligence.v1p1beta1.LabelAnnotation\022Y\n\026s" + - "hot_label_annotations\030\003 \003(\01329.google.clo" + - "ud.videointelligence.v1p1beta1.LabelAnno" + - "tation\022Z\n\027frame_label_annotations\030\004 \003(\0132" + - "9.google.cloud.videointelligence.v1p1bet" + - "a1.LabelAnnotation\022P\n\020shot_annotations\030\006" + - " \003(\01326.google.cloud.videointelligence.v1" + - "p1beta1.VideoSegment\022`\n\023explicit_annotat" + - "ion\030\007 \001(\0132C.google.cloud.videointelligen" + - "ce.v1p1beta1.ExplicitContentAnnotation\022\\" + - "\n\025speech_transcriptions\030\013 \003(\0132=.google.c" + - "loud.videointelligence.v1p1beta1.SpeechT" + - "ranscription\022!\n\005error\030\t \001(\0132\022.google.rpc" + - ".Status\"u\n\025AnnotateVideoResponse\022\\\n\022anno" + - "tation_results\030\001 \003(\0132@.google.cloud.vide" + - "ointelligence.v1p1beta1.VideoAnnotationR" + - "esults\"\247\001\n\027VideoAnnotationProgress\022\021\n\tin" + - "put_uri\030\001 \001(\t\022\030\n\020progress_percent\030\002 \001(\005\022" + - ".\n\nstart_time\030\003 \001(\0132\032.google.protobuf.Ti" + - "mestamp\022/\n\013update_time\030\004 \001(\0132\032.google.pr" + - "otobuf.Timestamp\"w\n\025AnnotateVideoProgres" + - "s\022^\n\023annotation_progress\030\001 \003(\0132A.google." + - "cloud.videointelligence.v1p1beta1.VideoA" + - "nnotationProgress\"\316\001\n\031SpeechTranscriptio" + - "nConfig\022\025\n\rlanguage_code\030\001 \001(\t\022\030\n\020max_al" + - "ternatives\030\002 \001(\005\022\030\n\020filter_profanity\030\003 \001" + - "(\010\022P\n\017speech_contexts\030\004 \003(\01327.google.clo" + - "ud.videointelligence.v1p1beta1.SpeechCon" + - "text\022\024\n\014audio_tracks\030\006 \003(\005\" \n\rSpeechCont" + - "ext\022\017\n\007phrases\030\001 \003(\t\"s\n\023SpeechTranscript" + - "ion\022\\\n\014alternatives\030\001 \003(\0132F.google.cloud" + - ".videointelligence.v1p1beta1.SpeechRecog" + - "nitionAlternative\"\211\001\n\034SpeechRecognitionA" + - "lternative\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfid" + - "ence\030\002 \001(\002\022A\n\005words\030\003 \003(\01322.google.cloud" + - ".videointelligence.v1p1beta1.WordInfo\"t\n" + - "\010WordInfo\022-\n\nstart_time\030\001 \001(\0132\031.google.p" + - "rotobuf.Duration\022+\n\010end_time\030\002 \001(\0132\031.goo" + - "gle.protobuf.Duration\022\014\n\004word\030\003 \001(\t*\214\001\n\007" + - "Feature\022\027\n\023FEATURE_UNSPECIFIED\020\000\022\023\n\017LABE" + - "L_DETECTION\020\001\022\031\n\025SHOT_CHANGE_DETECTION\020\002" + - "\022\036\n\032EXPLICIT_CONTENT_DETECTION\020\003\022\030\n\024SPEE" + - "CH_TRANSCRIPTION\020\006*r\n\022LabelDetectionMode" + - "\022$\n LABEL_DETECTION_MODE_UNSPECIFIED\020\000\022\r" + - "\n\tSHOT_MODE\020\001\022\016\n\nFRAME_MODE\020\002\022\027\n\023SHOT_AN" + - "D_FRAME_MODE\020\003*t\n\nLikelihood\022\032\n\026LIKELIHO" + - "OD_UNSPECIFIED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010U" + - "NLIKELY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013V" + - "ERY_LIKELY\020\0052\262\001\n\030VideoIntelligenceServic" + - "e\022\225\001\n\rAnnotateVideo\022>.google.cloud.video" + - "intelligence.v1p1beta1.AnnotateVideoRequ" + - "est\032\035.google.longrunning.Operation\"%\202\323\344\223" + - "\002\037\"\032/v1p1beta1/videos:annotate:\001*B\200\002\n,co" + - "m.google.cloud.videointelligence.v1p1bet" + - "a1B\035VideoIntelligenceServiceProtoP\001ZYgoo" + - "gle.golang.org/genproto/googleapis/cloud" + - "/videointelligence/v1p1beta1;videointell" + - "igence\252\002(Google.Cloud.VideoIntelligence." + - "V1P1Beta1\312\002(Google\\Cloud\\VideoIntelligen" + - "ce\\V1p1beta1b\006proto3" + "ContentFrame\"\365\004\n\026VideoAnnotationResults\022" + + "\021\n\tinput_uri\030\001 \001(\t\022\\\n\031segment_label_anno" + + "tations\030\002 \003(\01329.google.cloud.videointell" + + "igence.v1p1beta1.LabelAnnotation\022Y\n\026shot" + + "_label_annotations\030\003 \003(\01329.google.cloud." + + "videointelligence.v1p1beta1.LabelAnnotat" + + "ion\022Z\n\027frame_label_annotations\030\004 \003(\01329.g" + + "oogle.cloud.videointelligence.v1p1beta1." + + "LabelAnnotation\022P\n\020shot_annotations\030\006 \003(" + + "\01326.google.cloud.videointelligence.v1p1b" + + "eta1.VideoSegment\022`\n\023explicit_annotation" + + "\030\007 \001(\0132C.google.cloud.videointelligence." + + "v1p1beta1.ExplicitContentAnnotation\022\\\n\025s" + + "peech_transcriptions\030\013 \003(\0132=.google.clou" + + "d.videointelligence.v1p1beta1.SpeechTran" + + "scription\022!\n\005error\030\t \001(\0132\022.google.rpc.St" + + "atus\"u\n\025AnnotateVideoResponse\022\\\n\022annotat" + + "ion_results\030\001 \003(\0132@.google.cloud.videoin" + + "telligence.v1p1beta1.VideoAnnotationResu" + + "lts\"\247\001\n\027VideoAnnotationProgress\022\021\n\tinput" + + "_uri\030\001 \001(\t\022\030\n\020progress_percent\030\002 \001(\005\022.\n\n" + + "start_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\004 \001(\0132\032.google.proto" + + "buf.Timestamp\"w\n\025AnnotateVideoProgress\022^" + + "\n\023annotation_progress\030\001 \003(\0132A.google.clo" + + "ud.videointelligence.v1p1beta1.VideoAnno" + + "tationProgress\"\364\001\n\031SpeechTranscriptionCo" + + "nfig\022\025\n\rlanguage_code\030\001 \001(\t\022\030\n\020max_alter" + + "natives\030\002 \001(\005\022\030\n\020filter_profanity\030\003 \001(\010\022" + + "P\n\017speech_contexts\030\004 \003(\01327.google.cloud." + + "videointelligence.v1p1beta1.SpeechContex" + + "t\022$\n\034enable_automatic_punctuation\030\005 \001(\010\022" + + "\024\n\014audio_tracks\030\006 \003(\005\" \n\rSpeechContext\022\017" + + "\n\007phrases\030\001 \003(\t\"s\n\023SpeechTranscription\022\\" + + "\n\014alternatives\030\001 \003(\0132F.google.cloud.vide" + + "ointelligence.v1p1beta1.SpeechRecognitio" + + "nAlternative\"\211\001\n\034SpeechRecognitionAltern" + + "ative\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfidence\030" + + "\002 \001(\002\022A\n\005words\030\003 \003(\01322.google.cloud.vide" + + "ointelligence.v1p1beta1.WordInfo\"t\n\010Word" + + "Info\022-\n\nstart_time\030\001 \001(\0132\031.google.protob" + + "uf.Duration\022+\n\010end_time\030\002 \001(\0132\031.google.p" + + "rotobuf.Duration\022\014\n\004word\030\003 \001(\t*\214\001\n\007Featu" + + "re\022\027\n\023FEATURE_UNSPECIFIED\020\000\022\023\n\017LABEL_DET" + + "ECTION\020\001\022\031\n\025SHOT_CHANGE_DETECTION\020\002\022\036\n\032E" + + "XPLICIT_CONTENT_DETECTION\020\003\022\030\n\024SPEECH_TR" + + "ANSCRIPTION\020\006*r\n\022LabelDetectionMode\022$\n L" + + "ABEL_DETECTION_MODE_UNSPECIFIED\020\000\022\r\n\tSHO" + + "T_MODE\020\001\022\016\n\nFRAME_MODE\020\002\022\027\n\023SHOT_AND_FRA" + + "ME_MODE\020\003*t\n\nLikelihood\022\032\n\026LIKELIHOOD_UN" + + "SPECIFIED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKE" + + "LY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_L" + + "IKELY\020\0052\262\001\n\030VideoIntelligenceService\022\225\001\n" + + "\rAnnotateVideo\022>.google.cloud.videointel" + + "ligence.v1p1beta1.AnnotateVideoRequest\032\035" + + ".google.longrunning.Operation\"%\202\323\344\223\002\037\"\032/" + + "v1p1beta1/videos:annotate:\001*B\200\002\n,com.goo" + + "gle.cloud.videointelligence.v1p1beta1B\035V" + + "ideoIntelligenceServiceProtoP\001ZYgoogle.g" + + "olang.org/genproto/googleapis/cloud/vide" + + "ointelligence/v1p1beta1;videointelligenc" + + "e\252\002(Google.Cloud.VideoIntelligence.V1P1B" + + "eta1\312\002(Google\\Cloud\\VideoIntelligence\\V1" + + "p1beta1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -344,62 +338,56 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_ExplicitContentAnnotation_descriptor, new java.lang.String[] { "Frames", }); - internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_videointelligence_v1p1beta1_NormalizedBoundingBox_descriptor, - new java.lang.String[] { "Left", "Top", "Right", "Bottom", }); internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationResults_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationResults_descriptor, new java.lang.String[] { "InputUri", "SegmentLabelAnnotations", "ShotLabelAnnotations", "FrameLabelAnnotations", "ShotAnnotations", "ExplicitAnnotation", "SpeechTranscriptions", "Error", }); internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoResponse_descriptor, new java.lang.String[] { "AnnotationResults", }); internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationProgress_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationProgress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_VideoAnnotationProgress_descriptor, new java.lang.String[] { "InputUri", "ProgressPercent", "StartTime", "UpdateTime", }); internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoProgress_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoProgress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoProgress_descriptor, new java.lang.String[] { "AnnotationProgress", }); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscriptionConfig_descriptor, - new java.lang.String[] { "LanguageCode", "MaxAlternatives", "FilterProfanity", "SpeechContexts", "AudioTracks", }); + new java.lang.String[] { "LanguageCode", "MaxAlternatives", "FilterProfanity", "SpeechContexts", "EnableAutomaticPunctuation", "AudioTracks", }); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechContext_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechContext_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_SpeechContext_descriptor, new java.lang.String[] { "Phrases", }); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscription_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_SpeechTranscription_descriptor, new java.lang.String[] { "Alternatives", }); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechRecognitionAlternative_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_videointelligence_v1p1beta1_SpeechRecognitionAlternative_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_SpeechRecognitionAlternative_descriptor, new java.lang.String[] { "Transcript", "Confidence", "Words", }); internal_static_google_cloud_videointelligence_v1p1beta1_WordInfo_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_videointelligence_v1p1beta1_WordInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_videointelligence_v1p1beta1_WordInfo_descriptor, diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/proto/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/proto/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto index 5eac9c456a09..24bdb8eeb879 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/proto/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p1beta1/src/main/proto/google/cloud/videointelligence/v1p1beta1/video_intelligence.proto @@ -86,8 +86,8 @@ message AnnotateVideoRequest { // Video context and/or feature-specific parameters. message VideoContext { // Video segments to annotate. The segments may overlap and are not required - // to be contiguous or span the whole video. If unspecified, each video - // is treated as a single segment. + // to be contiguous or span the whole video. If unspecified, each video is + // treated as a single segment. repeated VideoSegment segments = 1; // Config for LABEL_DETECTION. @@ -217,26 +217,9 @@ message ExplicitContentAnnotation { repeated ExplicitContentFrame frames = 1; } -// Normalized bounding box. -// The normalized vertex coordinates are relative to the original image. -// Range: [0, 1]. -message NormalizedBoundingBox { - // Left X coordinate. - float left = 1; - - // Top Y coordinate. - float top = 2; - - // Right X coordinate. - float right = 3; - - // Bottom Y coordinate. - float bottom = 4; -} - // Annotation results for a single video. message VideoAnnotationResults { - // Video file location in + // Output only. Video file location in // [Google Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; @@ -261,8 +244,8 @@ message VideoAnnotationResults { // Speech transcription. repeated SpeechTranscription speech_transcriptions = 11; - // If set, indicates an error. Note that for a single `AnnotateVideoRequest` - // some videos may succeed and some may fail. + // Output only. If set, indicates an error. Note that for a single + // `AnnotateVideoRequest` some videos may succeed and some may fail. google.rpc.Status error = 9; } @@ -276,18 +259,18 @@ message AnnotateVideoResponse { // Annotation progress for a single video. message VideoAnnotationProgress { - // Video file location in + // Output only. Video file location in // [Google Cloud Storage](https://cloud.google.com/storage/). string input_uri = 1; - // Approximate percentage processed thus far. - // Guaranteed to be 100 when fully processed. + // Output only. Approximate percentage processed thus far. Guaranteed to be + // 100 when fully processed. int32 progress_percent = 2; - // Time when the request was received. + // Output only. Time when the request was received. google.protobuf.Timestamp start_time = 3; - // Time of the most recent update. + // Output only. Time of the most recent update. google.protobuf.Timestamp update_time = 4; } @@ -324,6 +307,14 @@ message SpeechTranscriptionConfig { // *Optional* A means to provide context to assist the speech recognition. repeated SpeechContext speech_contexts = 4; + // *Optional* If 'true', adds punctuation to recognition result hypotheses. + // This feature is only available in select languages. Setting this for + // requests in other languages has no effect at all. The default 'false' value + // does not add punctuation to result hypotheses. NOTE: "This is currently + // offered as an experimental service, complimentary to all users. In the + // future this may be exclusively available as a premium feature." + bool enable_automatic_punctuation = 5; + // *Optional* For file formats, such as MXF or MKV, supporting multiple audio // tracks, specify up to two tracks. Default: track 0. repeated int32 audio_tracks = 6; diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java index e480501b44a4..20565e2c90c2 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java @@ -177,30 +177,15 @@ public BigtableStub getStub() { * *

    * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
-   *   ApiStreamObserver<ReadRowsResponse> responseObserver =
-   *       new ApiStreamObserver<ReadRowsResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(ReadRowsResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    *   ReadRowsRequest request = ReadRowsRequest.newBuilder()
    *     .setTableName(tableName.toString())
    *     .build();
    *
-   *   baseBigtableDataClient.readRowsCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<ReadRowsResponse> stream = baseBigtableDataClient.readRowsCallable().call(request);
+   *   for (ReadRowsResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -218,30 +203,15 @@ public final ServerStreamingCallable readRows * *

    * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
-   *   ApiStreamObserver<SampleRowKeysResponse> responseObserver =
-   *       new ApiStreamObserver<SampleRowKeysResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(SampleRowKeysResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    *   SampleRowKeysRequest request = SampleRowKeysRequest.newBuilder()
    *     .setTableName(tableName.toString())
    *     .build();
    *
-   *   baseBigtableDataClient.sampleRowKeysCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<SampleRowKeysResponse> stream = baseBigtableDataClient.sampleRowKeysCallable().call(request);
+   *   for (SampleRowKeysResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -386,24 +356,6 @@ public final UnaryCallable mutateRowCallabl * *

    * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
-   *   ApiStreamObserver<MutateRowsResponse> responseObserver =
-   *       new ApiStreamObserver<MutateRowsResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(MutateRowsResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    *   List<MutateRowsRequest.Entry> entries = new ArrayList<>();
    *   MutateRowsRequest request = MutateRowsRequest.newBuilder()
@@ -411,7 +363,10 @@ public final UnaryCallable mutateRowCallabl
    *     .addAllEntries(entries)
    *     .build();
    *
-   *   baseBigtableDataClient.mutateRowsCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<MutateRowsResponse> stream = baseBigtableDataClient.mutateRowsCallable().call(request);
+   *   for (MutateRowsResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java index dc6c9269a088..4375beb6ab71 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java @@ -281,25 +281,8 @@ public final UnaryCallable detectInte * *

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   ApiStreamObserver<StreamingDetectIntentResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingDetectIntentResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingDetectIntentResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       sessionsClient.streamingDetectIntentCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingDetectIntentRequest, StreamingDetectIntentResponse> bidiStream =
+   *       sessionsClient.streamingDetectIntentCallable().call();
    *
    *   String session = "";
    *   QueryInput queryInput = QueryInput.newBuilder().build();
@@ -307,7 +290,10 @@ public final UnaryCallable detectInte
    *     .setSession(session)
    *     .setQueryInput(queryInput)
    *     .build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingDetectIntentResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java index ae7a29bb0cb3..11ae73df9db5 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java @@ -291,25 +291,8 @@ public final UnaryCallable detectInte * *

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   ApiStreamObserver<StreamingDetectIntentResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingDetectIntentResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingDetectIntentResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       sessionsClient.streamingDetectIntentCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingDetectIntentRequest, StreamingDetectIntentResponse> bidiStream =
+   *       sessionsClient.streamingDetectIntentCallable().call();
    *
    *   String session = "";
    *   QueryInput queryInput = QueryInput.newBuilder().build();
@@ -317,7 +300,10 @@ public final UnaryCallable detectInte
    *     .setSession(session)
    *     .setQueryInput(queryInput)
    *     .build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingDetectIntentResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java index 18cc8f851adc..5807966a974a 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java @@ -668,24 +668,6 @@ public final UnaryCallable deleteDocumentCallable( * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   ApiStreamObserver<BatchGetDocumentsResponse> responseObserver =
-   *       new ApiStreamObserver<BatchGetDocumentsResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(BatchGetDocumentsResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   String formattedDatabase = FirestoreClient.formatDatabaseRootName("[PROJECT]", "[DATABASE]");
    *   List<String> documents = new ArrayList<>();
    *   BatchGetDocumentsRequest request = BatchGetDocumentsRequest.newBuilder()
@@ -693,7 +675,10 @@ public final UnaryCallable deleteDocumentCallable(
    *     .addAllDocuments(documents)
    *     .build();
    *
-   *   firestoreClient.batchGetDocumentsCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<BatchGetDocumentsResponse> stream = firestoreClient.batchGetDocumentsCallable().call(request);
+   *   for (BatchGetDocumentsResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -931,30 +916,15 @@ public final UnaryCallable rollbackCallable() { * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   ApiStreamObserver<RunQueryResponse> responseObserver =
-   *       new ApiStreamObserver<RunQueryResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(RunQueryResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   String formattedParent = FirestoreClient.formatAnyPathName("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
    *   RunQueryRequest request = RunQueryRequest.newBuilder()
    *     .setParent(formattedParent)
    *     .build();
    *
-   *   firestoreClient.runQueryCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<RunQueryResponse> stream = firestoreClient.runQueryCallable().call(request);
+   *   for (RunQueryResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -970,31 +940,17 @@ public final ServerStreamingCallable runQuery * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   ApiStreamObserver<WriteResponse> responseObserver =
-   *       new ApiStreamObserver<WriteResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(WriteResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       firestoreClient.writeCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<WriteRequest, WriteResponse> bidiStream =
+   *       firestoreClient.writeCallable().call();
    *
    *   String formattedDatabase = FirestoreClient.formatDatabaseRootName("[PROJECT]", "[DATABASE]");
    *   WriteRequest request = WriteRequest.newBuilder()
    *     .setDatabase(formattedDatabase)
    *     .build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (WriteResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -1010,31 +966,17 @@ public final BidiStreamingCallable writeCallable() * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   ApiStreamObserver<ListenResponse> responseObserver =
-   *       new ApiStreamObserver<ListenResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(ListenResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       firestoreClient.listenCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<ListenRequest, ListenResponse> bidiStream =
+   *       firestoreClient.listenCallable().call();
    *
    *   String formattedDatabase = FirestoreClient.formatDatabaseRootName("[PROJECT]", "[DATABASE]");
    *   ListenRequest request = ListenRequest.newBuilder()
    *     .setDatabase(formattedDatabase)
    *     .build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (ListenResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 8cf94516900c..ebf86902606b 100644 --- a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -68,7 +68,8 @@ // AUTO-GENERATED DOCUMENTATION AND SERVICE /** * Service Description: The service that an application uses to manipulate subscriptions and to - * consume messages from a subscription via the `Pull` method. + * consume messages from a subscription via the `Pull` method or by establishing a bi-directional + * stream using the `StreamingPull` method. * *

To retrieve messages from a subscription, see the Subscriber class. * @@ -194,8 +195,10 @@ public SubscriberStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a subscription to a given topic. If the subscription already exists, returns - * `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. + * Creates a subscription to a given topic. See the <a + * href="/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 @@ -232,9 +235,10 @@ public SubscriberStub getStub() { * and will not be delivered again during that time (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 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. + * `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 @@ -259,8 +263,10 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a subscription to a given topic. If the subscription already exists, returns - * `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. + * Creates a subscription to a given topic. See the <a + * href="/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 @@ -297,9 +303,10 @@ public final Subscription createSubscription( * and will not be delivered again during that time (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 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. + * `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 @@ -321,8 +328,10 @@ public final Subscription createSubscription( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a subscription to a given topic. If the subscription already exists, returns - * `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. + * Creates a subscription to a given topic. See the <a + * href="/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 @@ -353,8 +362,10 @@ public final Subscription createSubscription(Subscription request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a subscription to a given topic. If the subscription already exists, returns - * `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. + * Creates a subscription to a given topic. See the <a + * href="/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 @@ -480,9 +491,7 @@ public final UnaryCallable getSubscription // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates an existing subscription. Note that certain properties of a subscription, such as its - * topic, are not modifiable. NOTE: The style guide requires body: "subscription" instead of body: - * "*". Keeping the latter for internal consistency in V1, however it should be corrected in - * V2. See https://cloud.google.com/apis/design/standard_methods#update for details. + * topic, are not modifiable. * *

Sample code: * @@ -515,9 +524,7 @@ 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. NOTE: The style guide requires body: "subscription" instead of body: - * "*". Keeping the latter for internal consistency in V1, however it should be corrected in - * V2. See https://cloud.google.com/apis/design/standard_methods#update for details. + * topic, are not modifiable. * *

Sample code: * @@ -1185,41 +1192,19 @@ public final UnaryCallable deleteSubscriptionC // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will respond with - * UNIMPLEMENTED errors unless you have been invited to test this feature. Contact - * cloud-pubsub{@literal @}google.com with any questions. - * - *

Establishes a stream with the server, which sends messages down to the client. The client + * Establishes a stream with the server, which sends messages down to the client. The client * streams acknowledgements and ack deadline modifications back to the server. The server will * close the stream and return the status on any error. The server may close the stream with - * status `OK` to reassign server-side resources, in which case, the client should re-establish - * the stream. `UNAVAILABLE` may also be returned in the case of a transient error (e.g., a server - * restart). These should also be retried by the client. Flow control can be achieved by - * configuring the underlying RPC channel. + * status `UNAVAILABLE` to reassign server-side resources, in which case, the client should + * re-establish the stream. Flow control can be achieved by configuring the underlying RPC + * channel. * *

Sample code: * *


    * try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
-   *   ApiStreamObserver<StreamingPullResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingPullResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingPullResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       subscriptionAdminClient.streamingPullCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingPullRequest, StreamingPullResponse> bidiStream =
+   *       subscriptionAdminClient.streamingPullCallable().call();
    *
    *   ProjectSubscriptionName subscription = ProjectSubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]");
    *   int streamAckDeadlineSeconds = 0;
@@ -1227,7 +1212,10 @@ public final UnaryCallable deleteSubscriptionC
    *     .setSubscription(subscription.toString())
    *     .setStreamAckDeadlineSeconds(streamAckDeadlineSeconds)
    *     .build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingPullResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -1260,7 +1248,7 @@ public final UnaryCallable deleteSubscriptionC * @param pushConfig 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` is not called. + * pausing the subscription if `Pull` or `StreamingPull` is not called. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { @@ -1297,7 +1285,7 @@ public final void modifyPushConfig(ProjectSubscriptionName subscription, PushCon * @param pushConfig 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` is not called. + * pausing the subscription if `Pull` or `StreamingPull` is not called. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void modifyPushConfig(String subscription, PushConfig pushConfig) { @@ -1371,7 +1359,9 @@ public final UnaryCallable modifyPushConfigCalla // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the existing snapshots. + * Lists the existing snapshots.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1398,7 +1388,9 @@ public final ListSnapshotsPagedResponse listSnapshots(ProjectName project) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the existing snapshots. + * Lists the existing snapshots.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1422,7 +1414,9 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the existing snapshots. + * Lists the existing snapshots.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1447,7 +1441,9 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the existing snapshots. + * Lists the existing snapshots.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1472,7 +1468,9 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the existing snapshots. + * Lists the existing snapshots.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1503,11 +1501,15 @@ public final UnaryCallable listSnap // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a snapshot from the requested subscription. If the snapshot already exists, returns - * `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. - * - *

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 + * Creates a snapshot from the requested subscription.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed + * in backward-incompatible ways and is not recommended for production use. It is not subject to + * any SLA or deprecation policy. 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/overview#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. @@ -1547,11 +1549,15 @@ public final Snapshot createSnapshot( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a snapshot from the requested subscription. If the snapshot already exists, returns - * `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. - * - *

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 + * Creates a snapshot from the requested subscription.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed + * in backward-incompatible ways and is not recommended for production use. It is not subject to + * any SLA or deprecation policy. 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/overview#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. @@ -1587,11 +1593,15 @@ public final Snapshot createSnapshot(String name, String subscription) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a snapshot from the requested subscription. If the snapshot already exists, returns - * `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. - * - *

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 + * Creates a snapshot from the requested subscription.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed + * in backward-incompatible ways and is not recommended for production use. It is not subject to + * any SLA or deprecation policy. 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/overview#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. @@ -1619,11 +1629,15 @@ public final Snapshot createSnapshot(CreateSnapshotRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a snapshot from the requested subscription. If the snapshot already exists, returns - * `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. - * - *

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 + * Creates a snapshot from the requested subscription.<br><br> + * <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed + * in backward-incompatible ways and is not recommended for production use. It is not subject to + * any SLA or deprecation policy. 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/overview#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. @@ -1650,10 +1664,10 @@ public final UnaryCallable createSnapshotCallab // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates an existing snapshot. Note that certain properties of a snapshot are not modifiable. - * NOTE: The style guide requires body: "snapshot" instead of body: "*". Keeping the latter - * for internal consistency in V1, however it should be corrected in V2. See - * https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing snapshot.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. Note that + * certain properties of a snapshot are not modifiable. * *

Sample code: * @@ -1688,10 +1702,10 @@ public final Snapshot updateSnapshot(UpdateSnapshotRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates an existing snapshot. Note that certain properties of a snapshot are not modifiable. - * NOTE: The style guide requires body: "snapshot" instead of body: "*". Keeping the latter - * for internal consistency in V1, however it should be corrected in V2. See - * https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing snapshot.<br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. Note that + * certain properties of a snapshot are not modifiable. * *

Sample code: * @@ -1725,9 +1739,12 @@ public final UnaryCallable updateSnapshotCallab // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Removes an existing snapshot. 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 + * Removes an existing snapshot. <br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. 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: @@ -1754,9 +1771,12 @@ public final void deleteSnapshot(ProjectSnapshotName snapshot) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Removes an existing snapshot. 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 + * Removes an existing snapshot. <br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. 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: @@ -1781,9 +1801,12 @@ public final void deleteSnapshot(String snapshot) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Removes an existing snapshot. 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 + * Removes an existing snapshot. <br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. 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: @@ -1807,9 +1830,12 @@ private final void deleteSnapshot(DeleteSnapshotRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Removes an existing snapshot. 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 + * Removes an existing snapshot. <br><br> <b>ALPHA:</b> This feature is + * part of an alpha release. This API might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation policy. 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: @@ -1833,7 +1859,9 @@ public final UnaryCallable deleteSnapshotCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided - * in the request. + * in the request.<br><br> <b>ALPHA:</b> This feature is part of an alpha + * release. This API might be changed in backward-incompatible ways and is not recommended for + * production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * @@ -1857,7 +1885,9 @@ public final SeekResponse seek(SeekRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided - * in the request. + * in the request.<br><br> <b>ALPHA:</b> This feature is part of an alpha + * release. This API might be changed in backward-incompatible ways and is not recommended for + * production use. It is not subject to any SLA or deprecation policy. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 7e74041d0949..142fb81abf70 100644 --- a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -177,7 +177,8 @@ public PublisherStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates the given topic with the given name. + * Creates the given topic with the given name. See the <a + * href="/pubsub/docs/admin#resource_names"> resource name rules</a>. * *

Sample code: * @@ -203,7 +204,8 @@ public final Topic createTopic(ProjectTopicName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates the given topic with the given name. + * Creates the given topic with the given name. See the <a + * href="/pubsub/docs/admin#resource_names"> resource name rules</a>. * *

Sample code: * @@ -229,7 +231,8 @@ public final Topic createTopic(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates the given topic with the given name. + * Creates the given topic with the given name. See the <a + * href="/pubsub/docs/admin#resource_names"> resource name rules</a>. * *

Sample code: * @@ -252,7 +255,8 @@ private final Topic createTopic(Topic request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates the given topic with the given name. + * Creates the given topic with the given name. See the <a + * href="/pubsub/docs/admin#resource_names"> resource name rules</a>. * *

Sample code: * @@ -274,10 +278,7 @@ public final UnaryCallable createTopicCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates an existing topic. Note that certain properties of a topic are not modifiable. Options - * settings follow the style guide: NOTE: The style guide requires body: "topic" instead of body: - * "*". Keeping the latter for internal consistency in V1, however it should be corrected in - * V2. See https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing topic. Note that certain properties of a topic are not modifiable. * *

Sample code: * @@ -302,10 +303,7 @@ public final UnaryCallable createTopicCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates an existing topic. Note that certain properties of a topic are not modifiable. Options - * settings follow the style guide: NOTE: The style guide requires body: "topic" instead of body: - * "*". Keeping the latter for internal consistency in V1, however it should be corrected in - * V2. See https://cloud.google.com/apis/design/standard_methods#update for details. + * Updates an existing topic. Note that certain properties of a topic are not modifiable. * *

Sample code: * @@ -679,7 +677,7 @@ public final UnaryCallable listTopicsCall // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the name of the subscriptions for this topic. + * Lists the names of the subscriptions on this topic. * *

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

Sample code: * @@ -731,7 +729,7 @@ public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String t // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the name of the subscriptions for this topic. + * Lists the names of the subscriptions on this topic. * *

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

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

Sample code: * diff --git a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java index 49aea90e7ee3..8e653a185a6b 100644 --- a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java +++ b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java @@ -40,7 +40,8 @@ * ======================= SubscriptionAdminClient ======================= * *

Service Description: The service that an application uses to manipulate subscriptions and to - * consume messages from a subscription via the `Pull` method. + * consume messages from a subscription via the `Pull` method or by establishing a bi-directional + * stream using the `StreamingPull` method. * *

To retrieve messages from a subscription, see the Subscriber class. * diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java index d19596b57778..f34dbc7f4805 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java @@ -692,24 +692,6 @@ public final UnaryCallable executeSqlCallable() { * *


    * try (SpannerClient spannerClient = SpannerClient.create()) {
-   *   ApiStreamObserver<PartialResultSet> responseObserver =
-   *       new ApiStreamObserver<PartialResultSet>() {
-   *         {@literal @}Override
-   *         public void onNext(PartialResultSet response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    *   String sql = "";
    *   ExecuteSqlRequest request = ExecuteSqlRequest.newBuilder()
@@ -717,7 +699,10 @@ public final UnaryCallable executeSqlCallable() {
    *     .setSql(sql)
    *     .build();
    *
-   *   spannerClient.executeStreamingSqlCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<PartialResultSet> stream = spannerClient.executeStreamingSqlCallable().call(request);
+   *   for (PartialResultSet response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ @@ -814,24 +799,6 @@ public final UnaryCallable readCallable() { * *

    * try (SpannerClient spannerClient = SpannerClient.create()) {
-   *   ApiStreamObserver<PartialResultSet> responseObserver =
-   *       new ApiStreamObserver<PartialResultSet>() {
-   *         {@literal @}Override
-   *         public void onNext(PartialResultSet response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *
    *   SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    *   String table = "";
    *   List<String> columns = new ArrayList<>();
@@ -843,7 +810,10 @@ public final UnaryCallable readCallable() {
    *     .setKeySet(keySet)
    *     .build();
    *
-   *   spannerClient.streamingReadCallable().serverStreamingCall(request, responseObserver));
+   *   ServerStream<PartialResultSet> stream = spannerClient.streamingReadCallable().call(request);
+   *   for (PartialResultSet response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java index 0e6000016c7e..4d5815772cb7 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java @@ -149,8 +149,8 @@ public void listDatabasesExceptionTest() throws Exception { @Test @SuppressWarnings("all") public void createDatabaseTest() throws Exception { - String name = "name3373707"; - Database expectedResponse = Database.newBuilder().setName(name).build(); + DatabaseName name = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + Database expectedResponse = Database.newBuilder().setName(name.toString()).build(); Operation resultOperation = Operation.newBuilder() .setName("createDatabaseTest") @@ -199,8 +199,8 @@ public void createDatabaseExceptionTest() throws Exception { @Test @SuppressWarnings("all") public void getDatabaseTest() { - String name2 = "name2-1052831874"; - Database expectedResponse = Database.newBuilder().setName(name2).build(); + DatabaseName name2 = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + Database expectedResponse = Database.newBuilder().setName(name2.toString()).build(); mockDatabaseAdmin.addResponse(expectedResponse); DatabaseName name = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); diff --git a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java index 1949d8c01164..b500ac76b56c 100644 --- a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java +++ b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java @@ -445,28 +445,14 @@ public final UnaryCallable recognizeCallabl * *

    * try (SpeechClient speechClient = SpeechClient.create()) {
-   *   ApiStreamObserver<StreamingRecognizeResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingRecognizeResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingRecognizeResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       speechClient.streamingRecognizeCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingRecognizeRequest, StreamingRecognizeResponse> bidiStream =
+   *       speechClient.streamingRecognizeCallable().call();
    *
    *   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingRecognizeResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1beta1/SpeechClient.java b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1beta1/SpeechClient.java index 2d247831316b..4910aa60bddc 100644 --- a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1beta1/SpeechClient.java +++ b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1beta1/SpeechClient.java @@ -433,28 +433,14 @@ public final UnaryCallable asyncRecognizeCalla * *

    * try (SpeechClient speechClient = SpeechClient.create()) {
-   *   ApiStreamObserver<StreamingRecognizeResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingRecognizeResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingRecognizeResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       speechClient.streamingRecognizeCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingRecognizeRequest, StreamingRecognizeResponse> bidiStream =
+   *       speechClient.streamingRecognizeCallable().call();
    *
    *   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingRecognizeResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/ diff --git a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechClient.java b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechClient.java index 57986e52395e..c29bd2b3d9f0 100644 --- a/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechClient.java +++ b/google-cloud-clients/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechClient.java @@ -445,28 +445,14 @@ public final UnaryCallable recognizeCallabl * *

    * try (SpeechClient speechClient = SpeechClient.create()) {
-   *   ApiStreamObserver<StreamingRecognizeResponse> responseObserver =
-   *       new ApiStreamObserver<StreamingRecognizeResponse>() {
-   *         {@literal @}Override
-   *         public void onNext(StreamingRecognizeResponse response) {
-   *           // Do something when receive a response
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onError(Throwable t) {
-   *           // Add error-handling
-   *         }
-   *
-   *         {@literal @}Override
-   *         public void onCompleted() {
-   *           // Do something when complete.
-   *         }
-   *       };
-   *   ApiStreamObserver<StreamingRecognizeRequest> requestObserver =
-   *       speechClient.streamingRecognizeCallable().bidiStreamingCall(responseObserver));
+   *   BidiStream<StreamingRecognizeRequest, StreamingRecognizeResponse> bidiStream =
+   *       speechClient.streamingRecognizeCallable().call();
    *
    *   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();
-   *   requestObserver.onNext(request);
+   *   bidiStream.send(request);
+   *   for (StreamingRecognizeResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
*/